fix: remove fleet when deleting last group

This commit is contained in:
IliaDenisov
2026-02-10 21:14:15 +03:00
parent 56998d4c2d
commit 43dc8ab3f9
7 changed files with 29 additions and 18 deletions
+1 -1
View File
@@ -130,7 +130,7 @@ func (c *Cache) SendRoutedGroups() {
if toLoad > sgCapacity {
toLoad = sgCapacity
} else if maxShips := uint(math.Ceil(toLoad / (sgCapacity / float64(ships)))); maxShips < ships {
newGroupIdx := c.breakGroupUnsafe(c.RaceIndex(sg.OwnerID), sgi, maxShips)
newGroupIdx := c.unsafeBreakGroup(c.RaceIndex(sg.OwnerID), sgi, maxShips)
sgi = newGroupIdx
sg = c.ShipGroup(newGroupIdx)
}