:( compile code before committing Fraser

This commit is contained in:
Fraser Graham 2013-11-17 08:23:11 -08:00
parent 4c4c0d4e67
commit cacb8b547d
1 changed files with 4 additions and 4 deletions

View File

@ -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 {