Browse Source

update for api change in vector

master
Stephen McQuay 6 years ago
parent
commit
10373d06d2
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      projectile.go

+ 2
- 2
projectile.go View File

@ -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…
Cancel
Save