]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix resetting of the rifle accumulator
authorMario <mario@smbclan.net>
Sat, 9 Jun 2018 07:22:47 +0000 (17:22 +1000)
committerMario <mario@smbclan.net>
Sat, 9 Jun 2018 07:22:47 +0000 (17:22 +1000)
qcsrc/common/weapons/weapon/rifle.qc

index 1740c45d84c3fc5fe405dc03345c8e4bfd1147ad..d6996042dc56967ebf02c29a946329ea40ce4323 100644 (file)
@@ -159,7 +159,11 @@ METHOD(Rifle, wr_checkammo2, bool(entity thiswep, entity actor, .entity weaponen
 }
 METHOD(Rifle, wr_resetplayer, void(entity thiswep, entity actor))
 {
-    actor.rifle_accumulator = time - WEP_CVAR(rifle, bursttime);
+    for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
+    {
+        .entity weaponentity = weaponentities[slot];
+        actor.(weaponentity).rifle_accumulator = time - WEP_CVAR(rifle, bursttime);
+    }
 }
 METHOD(Rifle, wr_reload, void(entity thiswep, entity actor, .entity weaponentity))
 {