diff --git a/player.go b/player.go index 6ba81d5..f896486 100644 --- a/player.go +++ b/player.go @@ -190,6 +190,7 @@ func (p *player) Tick(g *game) { } } + // We only self repair when we're stopped if math.Abs(float64(p.Robot.Speed)) < v.Epsilon && p.Robot.RepairCounter > 0 { p.Robot.RepairCounter -= delta if p.Robot.RepairCounter < 0 { @@ -231,7 +232,7 @@ func (p *player) scan(g *game) { } for proj, _ := range g.projectiles { - if proj.Owner.Robot.Id == p.Robot.Id { + if proj.Owner == p { continue }