Prevent overflow when attempting to calculate the space between floor and ceiling. (I didn't notice any bugs as a result of the previous behvaiour, but you never know.)

This commit is contained in:
toasterbabe 2016-09-22 12:01:13 +01:00
parent fa16abf7ae
commit 0568712a5e
1 changed files with 2 additions and 2 deletions

View File

@ -994,7 +994,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
if (tmthing->player && tmthing->z + tmthing->height > topz
&& tmthing->z + tmthing->height < tmthing->ceilingz)
{
tmceilingz = INT32_MIN; // block while in air
tmfloorz = tmceilingz = INT32_MIN; // block while in air
#ifdef ESLOPE
tmceilingslope = NULL;
#endif
@ -1037,7 +1037,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
if (tmthing->player && tmthing->z < topz
&& tmthing->z > tmthing->floorz)
{
tmfloorz = INT32_MAX; // block while in air
tmfloorz = tmceilingz = INT32_MAX; // block while in air
#ifdef ESLOPE
tmfloorslope = NULL;
#endif