]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
fix hook throwing through warpzone
authorRudolf Polzer <divverent@xonotic.org>
Sun, 26 Jun 2011 18:31:32 +0000 (20:31 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Sun, 26 Jun 2011 18:31:32 +0000 (20:31 +0200)
qcsrc/server/g_hook.qc
qcsrc/server/miscfunctions.qc

index f03f78473f82dfd8e5cfad64ac38720e90221419..7eeb8e22558452fb65deeeb8404812efe097495b 100644 (file)
@@ -247,13 +247,6 @@ void GrapplingHookThink()
 
 void GrapplingHookTouch (void)
 {
-       if(SUB_OwnerCheck())
-               return;
-       if(SUB_NoImpactCheck())
-       {
-               RemoveGrapplingHook(self.realowner);
-               return;
-       }
        PROJECTILE_TOUCH;
 
        GrapplingHook_Stop();
index 8b7806e566e91968bf6cc1211fa759aa4d27ac02..c34941e23f030d278b93caa4d913f85dce101474 100644 (file)
@@ -2014,13 +2014,17 @@ float SUB_NoImpactCheck()
 
 #define SUB_OwnerCheck() (other && (other == self.owner))
 
+void RemoveGrapplingHook(entity pl);
 float WarpZone_Projectile_Touch_ImpactFilter_Callback()
 {
        if(SUB_OwnerCheck())
                return TRUE;
        if(SUB_NoImpactCheck())
        {
-               remove(self);
+               if(self.classname == "grapplinghook")
+                       RemoveGrapplingHook(self.realowner);
+               else
+                       remove(self);
                return TRUE;
        }
        if(trace_ent && trace_ent.solid > SOLID_TRIGGER)