diff --git a/src/p_mobj.c b/src/p_mobj.c index ff7aa597a..eb676f660 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -12111,6 +12111,7 @@ void P_MovePlayerToStarpost(INT32 playernum) fixed_t P_GetMobjSpawnHeight(const mobjtype_t mobjtype, const fixed_t x, const fixed_t y, const fixed_t dz, const fixed_t offset, const boolean flip, const fixed_t scale) { + const fixed_t finalScale = FixedMul(scale, mapobjectscale); const subsector_t *ss = R_PointInSubsector(x, y); // Axis objects snap to the floor. @@ -12119,9 +12120,9 @@ fixed_t P_GetMobjSpawnHeight(const mobjtype_t mobjtype, const fixed_t x, const f // Establish height. if (flip) - return P_GetSectorCeilingZAt(ss->sector, x, y) - dz - FixedMul(scale, offset + mobjinfo[mobjtype].height); + return P_GetSectorCeilingZAt(ss->sector, x, y) - dz - FixedMul(finalScale, offset + mobjinfo[mobjtype].height); else - return P_GetSectorFloorZAt(ss->sector, x, y) + dz + FixedMul(scale, offset); + return P_GetSectorFloorZAt(ss->sector, x, y) + dz + FixedMul(finalScale, offset); } fixed_t P_GetMapThingSpawnHeight(const mobjtype_t mobjtype, const mapthing_t* mthing, const fixed_t x, const fixed_t y)