]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/shotgun.qc
Deprecate weapon_func
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / shotgun.qc
index d61a2521dd2894f87e61c620e6d902cc650baa7b..d2e58836f3e8f17014c538bbd47857c045195d4e 100644 (file)
@@ -74,7 +74,7 @@ void W_Shotgun_Attack(float isprimary)
 
        // muzzle flash for 1st person view
        flash = spawn();
-       setmodel(flash, "models/uziflash.md3"); // precision set below
+       setmodel(flash, MDL_SHOTGUN_MUZZLEFLASH); // precision set below
        flash.think = SUB_Remove;
        flash.nextthink = time + 0.06;
        flash.effects = EF_ADDITIVE | EF_FULLBRIGHT | EF_LOWPRECISION;
@@ -195,7 +195,7 @@ void W_Shotgun_Attack2(void)
 // alternate secondary weapon frames
 void W_Shotgun_Attack3_Frame2()
 {SELFPARAM();
-       if (!WEP_ACTION(self.weapon, WR_CHECKAMMO2))
+       if (!_WEP_ACTION(self.weapon, WR_CHECKAMMO2))
        if (!(self.items & IT_UNLIMITED_WEAPON_AMMO))
        {
                W_SwitchWeapon_Force(self, w_getbestweapon(self));
@@ -209,7 +209,7 @@ void W_Shotgun_Attack3_Frame2()
 }
 void W_Shotgun_Attack3_Frame1()
 {SELFPARAM();
-       if (!WEP_ACTION(self.weapon, WR_CHECKAMMO2))
+       if (!_WEP_ACTION(self.weapon, WR_CHECKAMMO2))
        if (!(self.items & IT_UNLIMITED_WEAPON_AMMO))
        {
                W_SwitchWeapon_Force(self, w_getbestweapon(self));
@@ -223,7 +223,7 @@ void W_Shotgun_Attack3_Frame1()
 
 .float shotgun_primarytime;
 
-float W_Shotgun(float req)
+float W_Shotgun(entity thiswep, float req)
 {SELFPARAM();
        float ammo_amount;
        switch(req)
@@ -243,7 +243,7 @@ float W_Shotgun(float req)
                        {
                                // don't force reload an empty shotgun if its melee attack is active
                                if(WEP_CVAR(shotgun, secondary) < 2)
-                                       WEP_ACTION(self.weapon, WR_RELOAD);
+                                       _WEP_ACTION(self.weapon, WR_RELOAD);
                        }
                        else
                        {
@@ -286,10 +286,6 @@ float W_Shotgun(float req)
                }
                case WR_INIT:
                {
-                       precache_model("models/uziflash.md3");
-                       precache_model(W_Model("g_shotgun.md3"));
-                       precache_model(W_Model("v_shotgun.md3"));
-                       precache_model(W_Model("h_shotgun.iqm"));
                        precache_sound("misc/itempickup.wav");
                        precache_sound(W_Sound("shotgun_fire"));
                        precache_sound(W_Sound("shotgun_melee"));
@@ -351,7 +347,7 @@ float W_Shotgun(float req)
 #endif
 #ifdef CSQC
 .float prevric;
-float W_Shotgun(float req)
+float W_Shotgun(entity thiswep, float req)
 {SELFPARAM();
        switch(req)
        {