refactor: group launched/in_space state

This commit is contained in:
Ilia Denisov
2026-02-08 19:29:38 +02:00
parent 077c0999d2
commit b928bb2976
14 changed files with 43 additions and 62 deletions
+3 -2
View File
@@ -42,8 +42,9 @@ func (c *Cache) moveShipGroup(i int, delta float64) {
var x, y float64
x, y, arrived =
util.NextTravelCoord(c.g.Map.Width, c.g.Map.Height, originX, originY, destPlanet.X.F(), destPlanet.Y.F(), delta)
sg.StateInSpace.X = game.F(x)
sg.StateInSpace.Y = game.F(y)
fx, fy := game.F(x), game.F(y)
sg.StateInSpace.X = &fx
sg.StateInSpace.Y = &fy
if arrived {
sg.StateInSpace = nil
}