mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
- disabled parts of EDuke commit 7829 because its side effects are worse than what it tries to fix.
In particular this causes backwards sliding against walls.
This commit is contained in:
parent
c53d9cfc3a
commit
4e58265d21
1 changed files with 2 additions and 1 deletions
|
@ -1439,7 +1439,8 @@ int32_t clipmove(vec3_t * const pos, int16_t * const sectnum, int32_t xvect, int
|
|||
vec2_t const clipr = { clipit[hitwall].x2 - clipit[hitwall].x1, clipit[hitwall].y2 - clipit[hitwall].y1 };
|
||||
int64_t const templl = compat_maybe_truncate_to_int32((int64_t)clipr.x * clipr.x + (int64_t)clipr.y * clipr.y);
|
||||
|
||||
if (templl > 0)
|
||||
if (templl > 0 && templl <= INT32_MAX) // without the upper bounds check this code misbehaves and occasionally makes the player move backwards.
|
||||
// This hints at another overflow problem elsewhere...
|
||||
{
|
||||
int64_t const templl2 = compat_maybe_truncate_to_int32((int64_t)(goal.x-vec.x)*clipr.x + (int64_t)(goal.y-vec.y)*clipr.y);
|
||||
int32_t const i = (enginecompatibility_mode == ENGINECOMPATIBILITY_19950829 || (llabs(templl2)>>11) < templl) ?
|
||||
|
|
Loading…
Reference in a new issue