This commit is contained in:
root
2026-10-01 22:16:48 +02:00
parent b6d1909d7f
commit 9dfdf79fa7
39 changed files with 4560 additions and 181 deletions
+8 -3
View File
@@ -34,11 +34,16 @@ func (s *State) Hash() [32]byte {
w(sh.ID, sh.Owner, alive, int64(sh.Pos.X), int64(sh.Pos.Y), int64(sh.Pos.Z),
int64(sh.Vel.X), int64(sh.Vel.Y), int64(sh.Vel.Z),
int64(sh.Fuel), sh.Earned, int64(sh.Throttle), int64(sh.Azimuth), int64(sh.Pitch), sh.Target)
for _, c := range sh.Cargo {
w(c)
}
h.Write(sh.CPU.MarshalState())
}
w(int64(len(s.Containers)), s.NextContainer)
for _, c := range s.Containers {
w(c.ID, c.OrderedBy, int64(c.Pos.X), int64(c.Pos.Y), int64(c.Pos.Z),
int64(c.Vel.X), int64(c.Vel.Y), int64(c.Vel.Z), c.Towed, c.Dropped, c.ExpiresAt)
for _, o := range c.Ore {
w(o)
}
}
owners := make([]int64, 0, len(s.Credits))
for o := range s.Credits {
owners = append(owners, o)