]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/w_grenadelauncher.qc
merge some changes from my autocvarizer branch that change nothing but make code...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_grenadelauncher.qc
index 0bc08b8de77f2b2a6d84c9603d571bac6188421e..cab8f49505c927d15a6325879a71c36e35191aa0 100644 (file)
@@ -163,7 +163,7 @@ void W_Grenade_Attack (void)
 
        if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
                self.ammo_rockets = self.ammo_rockets - cvar("g_balance_grenadelauncher_primary_ammo");
-       W_SetupShot_ProjectileSize (self, '-3 -3 -3', '3 3 3', FALSE, 4, "weapons/grenade_fire.wav", cvar("g_balance_grenadelauncher_primary_damage"));
+       W_SetupShot_ProjectileSize (self, '-3 -3 -3', '3 3 3', FALSE, 4, "weapons/grenade_fire.wav", CHAN_WEAPON, cvar("g_balance_grenadelauncher_primary_damage"));
        w_shotdir = v_forward; // no TrueAim for grenades please
 
        pointparticles(particleeffectnum("grenadelauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
@@ -174,8 +174,8 @@ void W_Grenade_Attack (void)
        gren.bot_dodge = TRUE;
        gren.bot_dodgerating = cvar("g_balance_grenadelauncher_primary_damage");
        gren.movetype = MOVETYPE_BOUNCE;
-       gren.bouncefactor = cvar("g_balance_grenadelauncher_primary_bouncefactor");
-       gren.bouncestop = cvar("g_balance_grenadelauncher_primary_bouncestop");
+       gren.bouncefactor = cvar("g_balance_grenadelauncher_bouncefactor");
+       gren.bouncestop = cvar("g_balance_grenadelauncher_bouncestop");
        PROJECTILE_MAKETRIGGER(gren);
        gren.projectiledeathtype = WEP_GRENADE_LAUNCHER;
        setorigin(gren, w_shotorg);
@@ -200,6 +200,8 @@ void W_Grenade_Attack (void)
                CSQCProjectile(gren, TRUE, PROJECTILE_GRENADE, TRUE);
        else
                CSQCProjectile(gren, TRUE, PROJECTILE_GRENADE_BOUNCING, TRUE);
+
+       other = gren; MUTATOR_CALLHOOK(EditProjectile);
 }
 
 void W_Grenade_Attack2 (void)
@@ -208,7 +210,7 @@ void W_Grenade_Attack2 (void)
 
        if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
                self.ammo_rockets = self.ammo_rockets - cvar("g_balance_grenadelauncher_secondary_ammo");
-       W_SetupShot_ProjectileSize (self, '-3 -3 -3', '3 3 3', FALSE, 4, "weapons/grenade_fire.wav", cvar("g_balance_grenadelauncher_secondary_damage"));
+       W_SetupShot_ProjectileSize (self, '-3 -3 -3', '3 3 3', FALSE, 4, "weapons/grenade_fire.wav", CHAN_WEAPON, cvar("g_balance_grenadelauncher_secondary_damage"));
        w_shotdir = v_forward; // no TrueAim for grenades please
 
        pointparticles(particleeffectnum("grenadelauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
@@ -219,8 +221,8 @@ void W_Grenade_Attack2 (void)
        gren.bot_dodge = TRUE;
        gren.bot_dodgerating = cvar("g_balance_grenadelauncher_secondary_damage");
        gren.movetype = MOVETYPE_BOUNCE;
-       gren.bouncefactor = cvar("g_balance_grenadelauncher_secondary_bouncefactor");
-       gren.bouncestop = cvar("g_balance_grenadelauncher_secondary_bouncestop");
+       gren.bouncefactor = cvar("g_balance_grenadelauncher_bouncefactor");
+       gren.bouncestop = cvar("g_balance_grenadelauncher_bouncestop");
        PROJECTILE_MAKETRIGGER(gren);
        gren.projectiledeathtype = WEP_GRENADE_LAUNCHER | HITTYPE_SECONDARY;
        setorigin(gren, w_shotorg);
@@ -244,6 +246,8 @@ void W_Grenade_Attack2 (void)
                CSQCProjectile(gren, TRUE, PROJECTILE_GRENADE, TRUE);
        else
                CSQCProjectile(gren, TRUE, PROJECTILE_GRENADE_BOUNCING, TRUE);
+
+       other = gren; MUTATOR_CALLHOOK(EditProjectile);
 }
 
 void spawnfunc_weapon_grenadelauncher (void)