refactor: planet owner

This commit is contained in:
Ilia Denisov
2026-02-04 19:26:17 +02:00
parent 6a603ea9ad
commit c1d397c993
17 changed files with 170 additions and 183 deletions
+2 -2
View File
@@ -83,10 +83,10 @@ func (c *Cache) votesByRace() map[int]float64 {
result := make(map[int]float64)
for i := range c.g.Map.Planet {
p := &c.g.Map.Planet[i]
if p.Owner == uuid.Nil {
if !p.Owned() {
continue
}
ri := c.RaceIndex(p.Owner)
ri := c.RaceIndex(*p.Owner)
planetVotes := p.Votes()
result[ri] += planetVotes
}