shithub: choc

Download patch

ref: ffb95c420a3037021f352fa35268a9750bed37f5
parent: 76d654bb85659ba65cfa843ee24973fba60269cc
author: Samuel Villareal <svkaiser@gmail.com>
date: Sun Sep 19 17:44:34 EDT 2010

+ P_PlayerThink: Inventorydown bug fixed

Subversion-branch: /branches/strife-branch
Subversion-revision: 2123

--- a/src/strife/p_user.c
+++ b/src/strife/p_user.c
@@ -362,31 +362,34 @@
         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)
+                // villsa [STRIFE]
+                if(workparm)
                 {
-                    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");
+                    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");
+                    }
                 }
             }