refactor: planet owner
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user