]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/weapons/weaponsystem.qc
Remove IT_AMMO
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / weapons / weaponsystem.qc
index 2efea3ff5ee3da4c36bde9914ebe0b98615304e6..ad479824ec76f654a21877f546b0c273a4fff525 100644 (file)
@@ -3,15 +3,16 @@
 #include "selection.qh"
 
 #include "../command/common.qh"
-#include "../mutators/all.qh"
+#include "../mutators/_mod.qh"
 #include "../round_handler.qh"
 #include <common/t_items.qh>
 #include <common/animdecide.qh>
 #include <common/constants.qh>
-#include <common/monsters/all.qh>
+#include <common/net_linked.qh>
+#include <common/monsters/_mod.qh>
 #include <common/notifications/all.qh>
 #include <common/util.qh>
-#include <common/weapons/all.qh>
+#include <common/weapons/_all.qh>
 #include <common/state.qh>
 #include <lib/csqcmodel/sv_model.qh>
 
@@ -21,7 +22,9 @@
 
 float W_WeaponRateFactor(entity this)
 {
-       float t = 1.0 / g_weaponratefactor;
+       float t = 1;
+       if(g_weaponratefactor > 0)
+               t = 1.0 / g_weaponratefactor;
 
        MUTATOR_CALLHOOK(WeaponRateFactor, t, this);
        t = M_ARGV(0, float);
@@ -64,7 +67,7 @@ vector CL_Weapon_GetShotOrg(int wpn)
 void CL_Weaponentity_Think(entity this)
 {
        this.nextthink = time;
-       if (intermission_running) this.frame = this.anim_idle.x;
+       if (gameover) this.frame = this.anim_idle.x;
        .entity weaponentity = this.weaponentity_fld;
        if (this.owner.(weaponentity) != this)
        {
@@ -150,7 +153,7 @@ void CL_ExteriorWeaponentity_Think(entity this)
        else this.alpha = 1;
 
     Weapon wep = PS(this.owner).m_weapon;
-       if (wep) this.glowmod = weaponentity_glowmod(wep, this.owner.clientcolors);
+       if (wep) this.glowmod = weaponentity_glowmod(wep, this.owner, this.owner.clientcolors);
        this.colormap = this.owner.colormap;
 
        CSQCMODEL_AUTOUPDATE(this);
@@ -444,7 +447,6 @@ void W_WeaponFrame(Player actor, .entity weaponentity)
                PS(actor).m_switchingweapon = WEP_Null;
                this.state = WS_CLEAR;
                actor.weaponname = "";
-               // actor.items &= ~IT_AMMO;
                return;
        }