diff --git a/projectile.go b/projectile.go index bda363f..174844b 100644 --- a/projectile.go +++ b/projectile.go @@ -51,15 +51,15 @@ func (p *Projectile) Tick(g *game) { arrived, _, pos := v.RectIntersection(r_dest, p.Position, travel) if !arrived { - for i, obj := range g.obstacles { + for _, obj := range g.obstacles { collision, _, pos := v.RectIntersection(obj.Bounds, p.Position, travel) if collision { arrived = true p.Position = pos obj.Hp -= p.Damage - if obj.Hp < 0 { - delete(g.obstacles, i) - } + // if obj.Hp < 0 { + // delete(g.obstacles, i) + // } } } } else {