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:
parent
d34fd4b755
commit
c5d8fe4752
|
@ -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));
|
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.
|
// Establish height.
|
||||||
if (flip)
|
if (flip)
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in a new issue