]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Divide the attack rate by the maximum weapon slots instead of halving it
authorMario <mario@smbclan.net>
Mon, 15 Oct 2018 14:22:00 +0000 (00:22 +1000)
committerMario <mario@smbclan.net>
Mon, 15 Oct 2018 14:22:00 +0000 (00:22 +1000)
qcsrc/server/weapons/weaponsystem.qc

index 52a1934e5dba06ddfebe425e167983d10ee9574c..c4b91b3b3931f759f02feae9ee107cee13039b18 100644 (file)
@@ -335,7 +335,7 @@ void weapon_prepareattack_do(entity actor, .entity weaponentity, bool secondary,
                                                continue; // still cooling down!
                                        if (ATTACK_FINISHED(actor, wepslot) < time - actor.(wepent).weapon_frametime * 1.5)
                                                ATTACK_FINISHED(actor, wepslot) = time;
-                                       ATTACK_FINISHED(actor, wepslot) = ATTACK_FINISHED(actor, wepslot) + (attacktime * arate) * 0.5;
+                                       ATTACK_FINISHED(actor, wepslot) = ATTACK_FINISHED(actor, wepslot) + (attacktime * arate) / MAX_WEAPONSLOTS;
                                }
                        }
                }