From ffb95c420a3037021f352fa35268a9750bed37f5 Mon Sep 17 00:00:00 2001 From: Samuel Villareal Date: Sun, 19 Sep 2010 21:44:34 +0000 Subject: + P_PlayerThink: Inventorydown bug fixed Subversion-branch: /branches/strife-branch Subversion-revision: 2123 --- src/strife/p_user.c | 45 ++++++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 21 deletions(-) (limited to 'src/strife/p_user.c') diff --git a/src/strife/p_user.c b/src/strife/p_user.c index 0de9699c..9704f788 100644 --- a/src/strife/p_user.c +++ b/src/strife/p_user.c @@ -362,31 +362,34 @@ void P_PlayerThink (player_t* player) P_PlayerInSpecialSector (player); // villsa [STRIFE] handle inventory input - if(!player->inventorydown) + if(cmd->buttons2 & (BT2_HEALTH|BT2_INVUSE|BT2_INVDROP)) { - if(cmd->buttons2 & BT2_HEALTH) - P_UseInventoryItem(player, SPR_FULL); - else if(cmd->buttons2 & BT2_INVUSE) - P_UseInventoryItem(player, cmd->inventory); - else if(cmd->buttons2 & BT2_INVDROP) - P_DropInventoryItem(player, cmd->inventory); - else + if(!player->inventorydown) { - // villsa [STRIFE] - if(workparm) + if(cmd->buttons2 & BT2_HEALTH) + P_UseInventoryItem(player, SPR_FULL); + else if(cmd->buttons2 & BT2_INVUSE) + P_UseInventoryItem(player, cmd->inventory); + else if(cmd->buttons2 & BT2_INVDROP) + P_DropInventoryItem(player, cmd->inventory); + else { - int cheat = player->cheats ^ 1; - player->cheats ^= CF_NOCLIP; - - if(cheat & CF_NOCLIP) - { - player->message = DEH_String("No Clipping Mode ON"); - player->mo->flags |= MF_NOCLIP; - } - else + // villsa [STRIFE] + if(workparm) { - player->mo->flags &= ~MF_NOCLIP; - player->message = DEH_String("No Clipping Mode OFF"); + int cheat = player->cheats ^ 1; + player->cheats ^= CF_NOCLIP; + + if(cheat & CF_NOCLIP) + { + player->message = DEH_String("No Clipping Mode ON"); + player->mo->flags |= MF_NOCLIP; + } + else + { + player->mo->flags &= ~MF_NOCLIP; + player->message = DEH_String("No Clipping Mode OFF"); + } } } -- cgit v1.2.3