Makes diagonal movement euclidean

This commit is contained in:
Putnam3145
2021-07-01 12:09:39 -07:00
parent 06406f0d11
commit f1bcbc2573
2 changed files with 3 additions and 1 deletions

View File

@@ -4,6 +4,8 @@
#define NUM_E 2.71828183
#define SQRT_2 1.414214
#define PI 3.1416
#define INFINITY 1e31 //closer then enough

View File

@@ -95,7 +95,7 @@
. = ..()
if((direction & (direction - 1)) && mob.loc == n) //moved diagonally successfully
add_delay *= 2
add_delay *= SQRT_2
mob.set_glide_size(DELAY_TO_GLIDE_SIZE(add_delay), FALSE)
move_delay += add_delay
if(.) // If mob is null here, we deserve the runtime