]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove the wish_reload system. WR_RELOAD can replace it
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 22 Jan 2011 23:04:47 +0000 (01:04 +0200)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 22 Jan 2011 23:04:47 +0000 (01:04 +0200)
17 files changed:
qcsrc/server/cl_weapons.qc
qcsrc/server/defs.qh
qcsrc/server/w_crylink.qc
qcsrc/server/w_electro.qc
qcsrc/server/w_fireball.qc
qcsrc/server/w_grenadelauncher.qc
qcsrc/server/w_hagar.qc
qcsrc/server/w_hlac.qc
qcsrc/server/w_laser.qc
qcsrc/server/w_minelayer.qc
qcsrc/server/w_minstanex.qc
qcsrc/server/w_nex.qc
qcsrc/server/w_rocketlauncher.qc
qcsrc/server/w_seeker.qc
qcsrc/server/w_shotgun.qc
qcsrc/server/w_sniperrifle.qc
qcsrc/server/w_uzi.qc

index 864dd77fce788cc1696e7bbdee82ac3309748a89..db53b01810328067a3a47a3de9c3b51a302262ae 100644 (file)
@@ -1,6 +1,6 @@
 void W_Reload()
 {
-    self.wish_reload = 1;
+    weapon_action(self.switchweapon, WR_RELOAD);
 }
 
 // switch between weapons
index 06d0a3bf5714459a5518c5b90d6c3a12d48e8d45..10f6763fb530eb199c8394b1edf2c52306abd44f 100644 (file)
@@ -615,7 +615,6 @@ float client_cefc_accumulatortime;
 .float clip_load;
 .float old_clip_load;
 .float clip_size;
-.float wish_reload;
 
 // weapon load persistence, for weapons that support reloading
 .float laser_load;
index 74b6e92736dd426792fe2a827dbe2bda973e7c3a..21f3790fa5bef1bd4549debd90d9394fbdab7115 100644 (file)
@@ -650,17 +650,6 @@ float w_crylink(float req)
                                }
                        }
                }
-        if(self.wish_reload)
-        {
-            if(self.switchweapon == self.weapon)
-            {
-                if(self.weaponentity.state == WS_READY)
-                {
-                    self.wish_reload = 0;
-                    W_Crylink_Reload();
-                }
-            }
-        }
        }
        else if (req == WR_PRECACHE)
        {
index 01da65d83861435646edd2cb6a1d418ebbb66ed8..44a1a916727d636c4752d76d20a3634f123e5c4e 100644 (file)
@@ -525,18 +525,6 @@ float w_electro(float req)
                                }
                        }
                }
-
-        if(self.wish_reload)
-        {
-            if(self.switchweapon == self.weapon)
-            {
-                if(self.weaponentity.state == WS_READY)
-                {
-                    self.wish_reload = 0;
-                    W_Electro_Reload();
-                }
-            }
-        }
        }
        else if (req == WR_PRECACHE)
        {
index e3b9e334293d562c4e7dd390b4938ec2ed221a6f..dfb3605b00c174aac0072475b976c97cab0f6529 100644 (file)
@@ -420,17 +420,6 @@ float w_fireball(float req)
                                weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_fireball_secondary_animtime, w_ready);
                        }
                }
-        if(self.wish_reload)
-        {
-            if(self.switchweapon == self.weapon)
-            {
-                if(self.weaponentity.state == WS_READY)
-                {
-                    self.wish_reload = 0;
-                    W_Fireball_Reload();
-                }
-            }
-        }
        }
        else if (req == WR_PRECACHE)
        {
index 5e5f9616351c0466bdef1941b3e3bde089e00c5f..2a26eeae51f39941fa4c36724b219b213166c6ee 100644 (file)
@@ -388,17 +388,6 @@ float w_glauncher(float req)
                                weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_grenadelauncher_secondary_animtime, w_ready);
                        }
                }
-        if(self.wish_reload)
-        {
-            if(self.switchweapon == self.weapon)
-            {
-                if(self.weaponentity.state == WS_READY)
-                {
-                    self.wish_reload = 0;
-                    W_GrenadeLauncher_Reload();
-                }
-            }
-        }
        }
        else if (req == WR_PRECACHE)
        {
index 907db356cd49030034814de35ef915bba47263a6..0d4c38765dc89a28cc9a49a79cda96f88c03a51b 100644 (file)
@@ -219,17 +219,6 @@ float w_hagar(float req)
                                weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_hagar_secondary_refire, w_ready);
                        }
                }
-        if(self.wish_reload)
-        {
-            if(self.switchweapon == self.weapon)
-            {
-                if(self.weaponentity.state == WS_READY)
-                {
-                    self.wish_reload = 0;
-                    W_Hagar_Reload();
-                }
-            }
-        }
        }
        else if (req == WR_PRECACHE)
        {
index c87baf2162dd59eb3b65ea918e976ff92d37a650..08cfd69af5c182c57c965c1cfc37c07d03bde0fd 100644 (file)
@@ -257,17 +257,6 @@ float w_hlac(float req)
                                weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_hlac_secondary_animtime, w_ready);
                        }
                }
-        if(self.wish_reload)
-        {
-            if(self.switchweapon == self.weapon)
-            {
-                if(self.weaponentity.state == WS_READY)
-                {
-                    self.wish_reload = 0;
-                    W_HLAC_Reload();
-                }
-            }
-        }
        }
        else if (req == WR_PRECACHE)
        {
index f3bd6e0b1371245ac7e89f3b1b54529c06172311..ac79e9c5f6d918e86e24207ee1dbb8cd22f07f7b 100644 (file)
@@ -317,17 +317,6 @@ float w_laser(float req)
                                        W_SwitchWeapon (self.cnt);
                        }
                }
-        if(self.wish_reload)
-        {
-            if(self.switchweapon == self.weapon)
-            {
-                if(self.weaponentity.state == WS_READY)
-                {
-                    self.wish_reload = 0;
-                    W_Laser_Reload();
-                }
-            }
-        }
        }
        else if (req == WR_PRECACHE)
        {
index 1b35ab4efd8d5a89f157da9cdbeb359e687c4a98..50f392f9bc0cfe3fff601e4be5e2be054e3bf942 100644 (file)
@@ -453,18 +453,6 @@ float w_minelayer(float req)
                        if(minfound)
                                sound (self, CHAN_WEAPON2, "weapons/mine_det.wav", VOL_BASE, ATTN_NORM);
                }
-
-        if(self.wish_reload)
-        {
-            if(self.switchweapon == self.weapon)
-            {
-                if(self.weaponentity.state == WS_READY)
-                {
-                    self.wish_reload = 0;
-                    W_MineLayer_Reload();
-                }
-            }
-        }
        }
        else if (req == WR_PRECACHE)
        {
index 81c1987fabb6ec17b2950399b9fd2e6b4b84bc03..e5c9a1ed83eefab5f40aeeb6089e974ff9f08767 100644 (file)
@@ -293,17 +293,6 @@ float w_minstanex(float req)
                                self.weapon = w;
                        }
                }
-        if(self.wish_reload)
-        {
-            if(self.switchweapon == self.weapon)
-            {
-                if(self.weaponentity.state == WS_READY)
-                {
-                    self.wish_reload = 0;
-                    W_Minstanex_Reload();
-                }
-            }
-        }
        }
        else if (req == WR_PRECACHE)
        {
index d3e1b07d6b28d6c41338f1faba8b3e428ba63f58..49c4d3887693ec5b9b2fac9b22f967bb710abc75 100644 (file)
@@ -264,18 +264,6 @@ float w_nex(float req)
                                self.weaponentity_glowmod_z = self.weaponentity_glowmod_z + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_blue_full * (self.nex_charge - autocvar_g_balance_nex_charge_limit) / (1 - autocvar_g_balance_nex_charge_limit);
                        }
                }
-
-        if(self.wish_reload)
-        {
-            if(self.switchweapon == self.weapon)
-            {
-                if(self.weaponentity.state == WS_READY)
-                {
-                    self.wish_reload = 0;
-                    W_Nex_Reload();
-                }
-            }
-        }
        }
        else if (req == WR_PRECACHE)
        {
index 3dec2732a6a4c680e16c0f6164bafe510f1ad9dc..168e9d2bdc0d5e4619e7f07d8de593dd1f1a905d 100644 (file)
@@ -495,17 +495,6 @@ float w_rlauncher(float req)
                                        sound (self, CHAN_WEAPON2, "weapons/rocket_det.wav", VOL_BASE, ATTN_NORM);
                        }
                }
-        if(self.wish_reload)
-        {
-            if(self.switchweapon == self.weapon)
-            {
-                if(self.weaponentity.state == WS_READY)
-                {
-                    self.wish_reload = 0;
-                    W_RocketLauncher_Reload();
-                }
-            }
-        }
        }
        else if (req == WR_PRECACHE)
        {
index 42f0ec34957fddba9e091616a27efefe9f044b81..cda5bcbf104de293d8992df37adb23b2ba05866b 100644 (file)
@@ -517,18 +517,6 @@ float w_seeker(float req)
                                weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_seeker_flac_animtime, w_ready);
                        }
                }
-
-        if(self.wish_reload)
-        {
-            if(self.switchweapon == self.weapon)
-            {
-                if(self.weaponentity.state == WS_READY)
-                {
-                    self.wish_reload = 0;
-                    W_Seeker_Reload();
-                }
-            }
-        }
        }
        else if (req == WR_PRECACHE)
        {
index 48ef90e1b49b5417977dff2f3a95af8ddf26d335..5fa5fa4c92306cca9201d96bbbc8e5bcc490e6e0 100644 (file)
@@ -194,17 +194,6 @@ float w_shotgun(float req)
                                weapon_thinkf(WFRAME_FIRE1, 0, W_Shotgun_Attack2);
                        }
                }
-        if(self.wish_reload)
-        {
-            if(self.switchweapon == self.weapon)
-            {
-                if(self.weaponentity.state == WS_READY)
-                {
-                    self.wish_reload = 0;
-                    W_Shotgun_Reload();
-                }
-            }
-        }
        }
        else if (req == WR_PRECACHE)
        {
index 01326774f3012701563064e870c2549dc32fa5e4..1ef0c92a7380cd1616abf65af0b51dbfb96fb967 100644 (file)
@@ -227,17 +227,6 @@ float w_sniperrifle(float req)
                                }
                        }
                }
-        if(self.wish_reload)
-        {
-            if(self.switchweapon == self.weapon)
-            {
-                if(self.weaponentity.state == WS_READY)
-                {
-                    self.wish_reload = 0;
-                    W_SniperRifle_Reload();
-                }
-            }
-        }
        }
        else if (req == WR_PRECACHE)
        {
index 3ec7019e6858e8c01916a3b43562112015f091fc..3b43d52043d339bcd612a88ff9835db7e3108b30 100644 (file)
@@ -321,17 +321,6 @@ float w_uzi(float req)
                                weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_uzi_first_refire, w_ready);
                        }
                }
-        if(self.wish_reload)
-        {
-            if(self.switchweapon == self.weapon)
-            {
-                if(self.weaponentity.state == WS_READY)
-                {
-                    self.wish_reload = 0;
-                    W_UZI_Reload();
-                }
-            }
-        }
        }
        else if (req == WR_PRECACHE)
        {