]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/w_rocketlauncher.qc
Merge remote branch 'refs/remotes/origin/mirceakitsune/pickup_crosshair'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_rocketlauncher.qc
index c72179ce2399c263c2db747727cca2d76ddbd077..c109fc796b68afeb88d1b62d683083bd33062c29 100644 (file)
@@ -43,7 +43,7 @@ void W_Rocket_Explode ()
        remove (self);
 }
 
-void W_Rocket_RemoteExplode ()
+void W_Rocket_DoRemoteExplode ()
 {
        W_Rocket_Unregister();
 
@@ -128,7 +128,7 @@ void W_Rocket_RemoteExplode()
                        : (vlen(NearestPointOnBox(self.owner, self.origin) - self.origin) > cvar("g_balance_rocketlauncher_radius")) // safety device
                )
                {
-                       W_Rocket_RemoteExplode();
+                       W_Rocket_DoRemoteExplode();
                }
        }
 }
@@ -291,9 +291,13 @@ void W_Rocket_Think (void)
 
 void W_Rocket_Touch (void)
 {
+       if(WarpZone_Projectile_Touch())
+       {
+               if(wasfreed(self))
+                       W_Rocket_Unregister();
+               return;
+       }
        W_Rocket_Unregister();
-
-       PROJECTILE_TOUCH;
        W_Rocket_Explode ();
 }
 
@@ -363,6 +367,7 @@ void W_Rocket_Attack (void)
        W_AttachToShotorg(flash, '5 0 0');
 
        // common properties
+       other = missile; MUTATOR_CALLHOOK(EditProjectile);
 }
 
 void spawnfunc_weapon_rocketlauncher (void); // defined in t_items.qc
@@ -586,15 +591,15 @@ float w_rlauncher(float req)
                precache_sound("weapons/rocket_impact.wav");
        }
        else if (req == WR_SUICIDEMESSAGE)
-               w_deathtypestring = "exploded";
+               w_deathtypestring = "%s exploded";
        else if (req == WR_KILLMESSAGE)
        {
                if(w_deathtype & HITTYPE_BOUNCE) // (remote detonation)
-                       w_deathtypestring = "got too close to #'s rocket";
+                       w_deathtypestring = "%s got too close to %s's rocket";
                else if(w_deathtype & HITTYPE_SPLASH)
-                       w_deathtypestring = "almost dodged #'s rocket";
+                       w_deathtypestring = "%s almost dodged %s's rocket";
                else
-                       w_deathtypestring = "ate #'s rocket";
+                       w_deathtypestring = "%s ate %s's rocket";
        }
        return TRUE;
 }