Make sure flipped things placed directly on ceiling get MFE_ONGROUND

This fixes ceiling springs apparently flying down with you in various scenarios
This commit is contained in:
Monster Iestyn 2016-12-05 22:07:16 +00:00
parent 694bb73ef7
commit 7c07f39019
1 changed files with 4 additions and 0 deletions

View File

@ -7685,6 +7685,10 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
if (mobj->type == MT_UNIDUS)
mobj->z -= FixedMul(mobj->info->mass, mobj->scale);
// defaults onground
if (mobj->z + mobj->height == mobj->ceilingz)
mobj->eflags |= MFE_ONGROUND;
}
else
mobj->z = z;