foxygit / doom Log in
commit ffb95c420a3037021f352fa35268a9750bed37f5
Author:     Samuel Villareal <svkaiser@gmail.com>
AuthorDate: Sun Sep 19 21:44:34 2010 +0000
Commit:     Samuel Villareal <svkaiser@gmail.com>
CommitDate: Sun Sep 19 21:44:34 2010 +0000

    + 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(-)

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");
+                    }
                 }
             }