rcalpistol: only primary is halfautomatic
authorRudolf Polzer <rpolzer@nb-04.(none)>
Mon, 1 Feb 2010 13:46:53 +0000 (14:46 +0100)
committerRudolf Polzer <rpolzer@nb-04.(none)>
Thu, 4 Feb 2010 14:08:09 +0000 (15:08 +0100)
data/qcsrc/server/w_rcalpistol.qc

index f91538a..b818a8e 100644 (file)
@@ -156,6 +156,7 @@ float w_rcalpistol(float req)
                else
                {
                        self.rcalpistol_accumulator = bound(time - cvar("g_balance_rcalpistol_bursttime"), self.rcalpistol_accumulator, time);
+
                        if(self.rcalpistol_release)
                        {
                                if (self.BUTTON_ATCK)
@@ -167,18 +168,18 @@ float w_rcalpistol(float req)
                                        self.rcalpistol_accumulator += cvar("g_balance_rcalpistol_primary_burstcost");
                                        self.rcalpistol_release = 0;
                                }
-                               if (self.BUTTON_ATCK2)
-                               if (time >= self.rcalpistol_accumulator + cvar("g_balance_rcalpistol_secondary_burstcost"))
-                               if (weapon_prepareattack(1, cvar("g_balance_rcalpistol_secondary_refire")))
-                               {
-                                       W_RCalPistol_Attack2();
-                                       weapon_thinkf(WFRAME_FIRE2, cvar("g_balance_rcalpistol_secondary_animtime"), W_RCalPistol_CheckReloadAndReady);
-                                       self.rcalpistol_accumulator += cvar("g_balance_rcalpistol_secondary_burstcost");
-                                       self.rcalpistol_release = 0;
-                               }
                        }
-                       if not(self.BUTTON_ATCK || self.BUTTON_ATCK2)
+                       if not(self.BUTTON_ATCK)
                                self.rcalpistol_release = 1;
+
+                       if (self.BUTTON_ATCK2)
+                       if (time >= self.rcalpistol_accumulator + cvar("g_balance_rcalpistol_secondary_burstcost"))
+                       if (weapon_prepareattack(1, cvar("g_balance_rcalpistol_secondary_refire")))
+                       {
+                               W_RCalPistol_Attack2();
+                               weapon_thinkf(WFRAME_FIRE2, cvar("g_balance_rcalpistol_secondary_animtime"), W_RCalPistol_CheckReloadAndReady);
+                               self.rcalpistol_accumulator += cvar("g_balance_rcalpistol_secondary_burstcost");
+                       }
                }
        }
        else if (req == WR_PRECACHE)