update for api change in vector
This commit is contained in:
parent
cf3c7e8629
commit
10373d06d2
@ -28,7 +28,7 @@ func (p *Projectile) Tick(g *game) {
|
||||
continue
|
||||
}
|
||||
|
||||
player_rect := v.RectFromPoint(r.Position, 3)
|
||||
player_rect := v.AASquareAtPoint(r.Position, 3)
|
||||
collision, _, _ := v.RectIntersection(player_rect, p.Position, v_scaled)
|
||||
if collision {
|
||||
hit_player = true
|
||||
@ -45,7 +45,7 @@ func (p *Projectile) Tick(g *game) {
|
||||
}
|
||||
|
||||
// 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)
|
||||
arrived, _, pos := v.RectIntersection(r_dest, p.Position, travel)
|
||||
|
Loading…
Reference in New Issue
Block a user