]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/w_machinegun.qc
s/WEP_(ID)/WEP_$1.m_id/
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / w_machinegun.qc
index 7e2cc5278ea8a96bfac6d5335ea635b704623b19..92629a0bd7116a5f40c5c0e5d059914d0089749c 100644 (file)
@@ -60,10 +60,10 @@ void spawnfunc_weapon_machinegun(void)
        if(autocvar_sv_q3acompat_machineshotgunswap)
        if(self.classname != "droppedweapon")
        {
-               weapon_defaultspawnfunc(WEP_SHOCKWAVE);
+               weapon_defaultspawnfunc(WEP_SHOCKWAVE.m_id);
                return;
        }
-       weapon_defaultspawnfunc(WEP_MACHINEGUN);
+       weapon_defaultspawnfunc(WEP_MACHINEGUN.m_id);
 }
 void spawnfunc_weapon_uzi(void) { spawnfunc_weapon_machinegun(); }
 
@@ -152,7 +152,7 @@ void W_MachineGun_Attack_Frame(void)
                        return;
                }
                self.misc_bulletcounter = self.misc_bulletcounter + 1;
-               W_MachineGun_Attack(WEP_MACHINEGUN);
+               W_MachineGun_Attack(WEP_MACHINEGUN.m_id);
                weapon_thinkf(WFRAME_FIRE1, WEP_CVAR(machinegun, sustained_refire), W_MachineGun_Attack_Frame);
        }
        else
@@ -188,7 +188,7 @@ void W_MachineGun_Attack_Auto(void)
        }
 
        machinegun_spread = bound(WEP_CVAR(machinegun, spread_min), WEP_CVAR(machinegun, spread_min) + (WEP_CVAR(machinegun, spread_add) * self.misc_bulletcounter), WEP_CVAR(machinegun, spread_max));
-       fireBullet(w_shotorg, w_shotdir, machinegun_spread, WEP_CVAR(machinegun, solidpenetration), WEP_CVAR(machinegun, sustained_damage), WEP_CVAR(machinegun, sustained_force), WEP_MACHINEGUN, 0);
+       fireBullet(w_shotorg, w_shotdir, machinegun_spread, WEP_CVAR(machinegun, solidpenetration), WEP_CVAR(machinegun, sustained_damage), WEP_CVAR(machinegun, sustained_force), WEP_MACHINEGUN.m_id, 0);
 
        self.misc_bulletcounter = self.misc_bulletcounter + 1;
 
@@ -213,7 +213,7 @@ void W_MachineGun_Attack_Burst(void)
                self.punchangle_y = random() - 0.5;
        }
 
-       fireBullet(w_shotorg, w_shotdir, WEP_CVAR(machinegun, burst_speed), WEP_CVAR(machinegun, solidpenetration), WEP_CVAR(machinegun, sustained_damage), WEP_CVAR(machinegun, sustained_force), WEP_MACHINEGUN, 0);
+       fireBullet(w_shotorg, w_shotdir, WEP_CVAR(machinegun, burst_speed), WEP_CVAR(machinegun, solidpenetration), WEP_CVAR(machinegun, sustained_damage), WEP_CVAR(machinegun, sustained_force), WEP_MACHINEGUN.m_id, 0);
 
        pointparticles(particleeffectnum("uzi_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
 
@@ -287,7 +287,7 @@ bool W_MachineGun(int req)
                                if(weapon_prepareattack(0, 0))
                                {
                                        self.misc_bulletcounter = 1;
-                                       W_MachineGun_Attack(WEP_MACHINEGUN); // sets attack_finished
+                                       W_MachineGun_Attack(WEP_MACHINEGUN.m_id); // sets attack_finished
                                        weapon_thinkf(WFRAME_FIRE1, WEP_CVAR(machinegun, sustained_refire), W_MachineGun_Attack_Frame);
                                }
 
@@ -295,7 +295,7 @@ bool W_MachineGun(int req)
                                if(weapon_prepareattack(1, 0))
                                {
                                        self.misc_bulletcounter = 1;
-                                       W_MachineGun_Attack(WEP_MACHINEGUN | HITTYPE_SECONDARY); // sets attack_finished
+                                       W_MachineGun_Attack(WEP_MACHINEGUN.m_id | HITTYPE_SECONDARY); // sets attack_finished
                                        weapon_thinkf(WFRAME_FIRE2, WEP_CVAR(machinegun, first_refire), w_ready);
                                }
                        }
@@ -322,9 +322,9 @@ bool W_MachineGun(int req)
                        if(WEP_CVAR(machinegun, reload_ammo))
                        {
                                if(WEP_CVAR(machinegun, mode) == 1)
-                                       ammo_amount += self.(weapon_load[WEP_MACHINEGUN]) >= WEP_CVAR(machinegun, sustained_ammo);
+                                       ammo_amount += self.(weapon_load[WEP_MACHINEGUN.m_id]) >= WEP_CVAR(machinegun, sustained_ammo);
                                else
-                                       ammo_amount += self.(weapon_load[WEP_MACHINEGUN]) >= WEP_CVAR(machinegun, first_ammo);
+                                       ammo_amount += self.(weapon_load[WEP_MACHINEGUN.m_id]) >= WEP_CVAR(machinegun, first_ammo);
                        }
                        return ammo_amount;
                }
@@ -338,9 +338,9 @@ bool W_MachineGun(int req)
                        if(WEP_CVAR(machinegun, reload_ammo))
                        {
                                if(WEP_CVAR(machinegun, mode) == 1)
-                                       ammo_amount += self.(weapon_load[WEP_MACHINEGUN]) >= WEP_CVAR(machinegun, burst_ammo);
+                                       ammo_amount += self.(weapon_load[WEP_MACHINEGUN.m_id]) >= WEP_CVAR(machinegun, burst_ammo);
                                else
-                                       ammo_amount += self.(weapon_load[WEP_MACHINEGUN]) >= WEP_CVAR(machinegun, first_ammo);
+                                       ammo_amount += self.(weapon_load[WEP_MACHINEGUN.m_id]) >= WEP_CVAR(machinegun, first_ammo);
                        }
                        return ammo_amount;
                }