]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/w_rocketlauncher.qc
merge some changes from my autocvarizer branch that change nothing but make code...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_rocketlauncher.qc
index c29fda3a2af78575b5d18b9acfbe5db1ce57a425..cbc458f5b91fd780d7625d4095353dea20c57976 100644 (file)
@@ -196,17 +196,6 @@ void W_Rocket_Think (void)
                        desiredorigin = WarpZone_RefSys_TransformOrigin(self.owner, self, self.owner.origin + self.owner.view_ofs);
                        olddir = normalize(self.velocity);
 
-#if 0
-                       // disabled this code because it doesn't do what I want it to do :P
-                       cosminang = cos(cvar("g_balance_rocketlauncher_guidefadeangle") * DEG2RAD);
-                       cosmaxang = cos(cvar("g_balance_rocketlauncher_guidemaxangle") * DEG2RAD);
-                       cosang = desireddir * normalize(self.origin - desiredorigin);
-                       if(cosminang == cosmaxang)
-                               f *= (cosang >= cosminang);
-                       else
-                               f *= bound(0, (cosang - cosmaxang) / (cosminang - cosmaxang), 1);
-#endif
-
                        // now it gets tricky... we want to move like some curve to approximate the target direction
                        // but we are limiting the rate at which we can turn!
                        goal = desiredorigin + ((self.origin - desiredorigin) * desireddir + cvar("g_balance_rocketlauncher_guidegoal")) * desireddir;
@@ -262,7 +251,7 @@ void W_Rocket_Attack (void)
        if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
                self.ammo_rockets = self.ammo_rockets - cvar("g_balance_rocketlauncher_ammo");
 
-       W_SetupShot_ProjectileSize (self, '-3 -3 -3', '3 3 3', FALSE, 5, "weapons/rocket_fire.wav", cvar("g_balance_rocketlauncher_damage"));
+       W_SetupShot_ProjectileSize (self, '-3 -3 -3', '3 3 3', FALSE, 5, "weapons/rocket_fire.wav", CHAN_WEAPON, cvar("g_balance_rocketlauncher_damage"));
        pointparticles(particleeffectnum("rocketlauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
 
        missile = WarpZone_RefSys_SpawnSameRefSys(self);