Merge pull request #14911 from Putnam3145/euclidean-diagonals
Makes diagonal movement euclidean
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
|
||||
#define NUM_E 2.71828183
|
||||
|
||||
#define SQRT_2 1.414214
|
||||
|
||||
#define PI 3.1416
|
||||
#define INFINITY 1e31 //closer then enough
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user