Get rid of a few mt->options >> ZSHIFT usages in objectplace
This commit is contained in:
parent
b9a276f5aa
commit
32ef930c04
|
@ -1193,14 +1193,14 @@ void OP_NightsObjectplace(player_t *player)
|
||||||
if (cmd->buttons & BT_TOSSFLAG)
|
if (cmd->buttons & BT_TOSSFLAG)
|
||||||
{
|
{
|
||||||
UINT16 vertangle = (UINT16)(player->anotherflyangle % 360);
|
UINT16 vertangle = (UINT16)(player->anotherflyangle % 360);
|
||||||
UINT16 newflags, newz;
|
UINT16 newflags;
|
||||||
|
|
||||||
player->pflags |= PF_ATTACKDOWN;
|
player->pflags |= PF_ATTACKDOWN;
|
||||||
if (!OP_HeightOkay(player, false))
|
if (!OP_HeightOkay(player, false))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mt = OP_CreateNewMapThing(player, (UINT16)mobjinfo[MT_NIGHTSBUMPER].doomednum, false);
|
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
|
// height offset: from P_TouchSpecialThing case MT_NIGHTSBUMPER
|
||||||
|
|
||||||
// clockwise
|
// clockwise
|
||||||
|
@ -1231,7 +1231,7 @@ void OP_NightsObjectplace(player_t *player)
|
||||||
else // forward
|
else // forward
|
||||||
newflags = 0;
|
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
|
// 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.
|
// displays correctly. Backwards movement via the Thing flags is unaffected.
|
||||||
|
@ -1439,7 +1439,7 @@ void OP_ObjectplaceMovement(player_t *player)
|
||||||
else
|
else
|
||||||
P_SpawnMapThing(mt);
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue