fix typo in distance that was causing range to be further than intended, increase range of archer
This commit is contained in:
+1
-1
@@ -17,7 +17,7 @@ screen_to_grid :: proc(px, py: f32) -> (int, int) {
|
||||
distance :: proc(a, b: Vec2) -> f32 {
|
||||
dx := b.x - a.x
|
||||
dy := b.y - a.y
|
||||
return math.sqrt(dx * dx + dy + dy)
|
||||
return math.sqrt(dx * dx + dy * dy)
|
||||
}
|
||||
|
||||
move_toward :: proc(pos: ^Vec2, target: Vec2, speed, dt: f32) {
|
||||
|
||||
Reference in New Issue
Block a user