update for api change in vector

This commit is contained in:
Stephen McQuay 2014-01-07 21:17:41 -08:00
parent cf3c7e8629
commit 10373d06d2
1 changed files with 2 additions and 2 deletions

View File

@ -28,7 +28,7 @@ func (p *Projectile) Tick(g *game) {
continue continue
} }
player_rect := v.RectFromPoint(r.Position, 3) player_rect := v.AASquareAtPoint(r.Position, 3)
collision, _, _ := v.RectIntersection(player_rect, p.Position, v_scaled) collision, _, _ := v.RectIntersection(player_rect, p.Position, v_scaled)
if collision { if collision {
hit_player = true hit_player = true
@ -45,7 +45,7 @@ func (p *Projectile) Tick(g *game) {
} }
// Are we going to intersect the destination zone in this tick? // Are we going to intersect the destination zone in this tick?
r_dest := v.RectFromPoint(p.MoveTo, 3.0) r_dest := v.AASquareAtPoint(p.MoveTo, 3.0)
travel := newPos.Sub(p.Position) travel := newPos.Sub(p.Position)
arrived, _, pos := v.RectIntersection(r_dest, p.Position, travel) arrived, _, pos := v.RectIntersection(r_dest, p.Position, travel)