- use proper math instead of crash-prone libdivide here.

This commit is contained in:
Christoph Oelckers 2020-01-08 00:06:24 +01:00
parent 42f16a7b30
commit df7c5a7067

View file

@ -207,7 +207,8 @@ static void getclosestpointonwall_internal(vec2_t const p, int32_t const dawall,
return; return;
} }
i = tabledivide64((i << 15), j) << 15; i = ((i << 15) / j) << 15;
//i = tabledivide64((i << 15), j) << 15;
*closest = { (int32_t)(w.x + ((d.x * i) >> 30)), (int32_t)(w.y + ((d.y * i) >> 30)) }; *closest = { (int32_t)(w.x + ((d.x * i) >> 30)), (int32_t)(w.y + ((d.y * i) >> 30)) };
} }