Fix oversight on mapthing spawn Z calculation; ONFLOORZ and ONCEILINGZ don't equal to spawning the object at the base plane intersection.

This commit is contained in:
Nev3r 2019-12-12 15:04:48 +01:00
parent d34fd4b755
commit c5d8fe4752
1 changed files with 8 additions and 0 deletions

View File

@ -11609,6 +11609,14 @@ static fixed_t GetMobjSpawnHeight (const mobjtype_t i, const mapthing_t* mthing,
flip = (!!(mobjinfo[i].flags & MF_SPAWNCEILING) ^ !!(mthing->options & MTF_OBJECTFLIP));
}
if (heightoffset + extraoffset == 0) // Snap to the surfaces when there's no offset set.
{
if (flip)
return ONCEILINGZ;
else
return ONFLOORZ;
}
// Establish height.
if (flip)
return (