Weapon rings are limited in how fast they can scroll, so I guess it's okay if objectplace is too - and makes it less awkward for people who do just use normal keys for weapon up/down for some reason.

This commit is contained in:
toasterbabe 2016-09-30 20:14:23 +01:00
parent a2560c5217
commit 0d3ee9a109

View file

@ -1165,7 +1165,7 @@ void OP_ObjectplaceMovement(player_t *player)
if (player->pflags & PF_ATTACKDOWN)
{
// Are ANY objectplace buttons pressed? If no, remove flag.
if (!(cmd->buttons & (BT_ATTACK|BT_TOSSFLAG)))
if (!(cmd->buttons & (BT_ATTACK|BT_TOSSFLAG|BT_WEAPONNEXT|BT_WEAPONPREV)))
player->pflags &= ~PF_ATTACKDOWN;
// Do nothing.
@ -1173,9 +1173,16 @@ void OP_ObjectplaceMovement(player_t *player)
}
if (cmd->buttons & BT_WEAPONPREV)
{
OP_CycleThings(-1);
else if (cmd->buttons & BT_WEAPONNEXT)
player->pflags |= PF_ATTACKDOWN;
}
if (cmd->buttons & BT_WEAPONNEXT)
{
OP_CycleThings(1);
player->pflags |= PF_ATTACKDOWN;
}
// Place an object and add it to the maplist
if (cmd->buttons & BT_ATTACK)