]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix laser setting the last used ammo to 1 when reloading it after having switched...
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 30 Jan 2011 20:56:30 +0000 (22:56 +0200)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 30 Jan 2011 20:56:30 +0000 (22:56 +0200)
qcsrc/server/defs.qh
qcsrc/server/w_laser.qc

index 0c7b0e86ec24387e3ab1cf9f64e45b6892f3cf1e..d37af0d12a95a5a1e9cf4cd50f173dfb27b033c3 100644 (file)
@@ -613,6 +613,7 @@ float client_cefc_accumulatortime;
 #endif
 
 .float weapon_load[WEP_MAXCOUNT]; FTEQCC_YOU_SUCK_THIS_IS_NOT_UNREFERENCED(weapon_load);
+.float zero_ammo; // used by the reloading system, must always be 0
 .float clip_load;
 .float old_clip_load;
 .float clip_size;
index 3f902ac948b3aa1a9a33cd38ba28d50c82bf5c78..1b5dfcb1ca53517b604ff12fbef2272a6de14d34 100644 (file)
@@ -6,7 +6,7 @@ void(float imp) W_SwitchWeapon;
 
 void W_Laser_Reload()
 {
-       self.(self.reload_ammo_player) = 1;
+       self.reload_ammo_player = zero_ammo;
        self.reload_ammo_min = 0;
        self.reload_ammo_amount = autocvar_g_balance_laser_reload_ammo;
        self.reload_time = autocvar_g_balance_laser_reload_time;