Get rid of a few mt->options >> ZSHIFT usages in objectplace

This commit is contained in:
MascaraSnake 2019-12-25 09:40:08 +01:00
parent b9a276f5aa
commit 32ef930c04
1 changed files with 4 additions and 4 deletions

View File

@ -1193,14 +1193,14 @@ void OP_NightsObjectplace(player_t *player)
if (cmd->buttons & BT_TOSSFLAG)
{
UINT16 vertangle = (UINT16)(player->anotherflyangle % 360);
UINT16 newflags, newz;
UINT16 newflags;
player->pflags |= PF_ATTACKDOWN;
if (!OP_HeightOkay(player, false))
return;
mt = OP_CreateNewMapThing(player, (UINT16)mobjinfo[MT_NIGHTSBUMPER].doomednum, false);
newz = min((mt->options >> ZSHIFT) - (mobjinfo[MT_NIGHTSBUMPER].height/4), 0);
mt->z = min(mt->z - (mobjinfo[MT_NIGHTSBUMPER].height/4), 0);
// height offset: from P_TouchSpecialThing case MT_NIGHTSBUMPER
// clockwise
@ -1231,7 +1231,7 @@ void OP_NightsObjectplace(player_t *player)
else // forward
newflags = 0;
mt->options = (newz << ZSHIFT) | newflags;
mt->options = (mt->z << ZSHIFT) | newflags;
// if NiGHTS is facing backwards, orient the Thing angle forwards so that the sprite angle
// displays correctly. Backwards movement via the Thing flags is unaffected.
@ -1439,7 +1439,7 @@ void OP_ObjectplaceMovement(player_t *player)
else
P_SpawnMapThing(mt);
CONS_Printf(M_GetText("Placed object type %d at %d, %d, %d, %d\n"), mt->type, mt->x, mt->y, mt->options>>ZSHIFT, mt->angle);
CONS_Printf(M_GetText("Placed object type %d at %d, %d, %d, %d\n"), mt->type, mt->x, mt->y, mt->z, mt->angle);
}
}