]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/miscfunctions.qc
some fixes to what can be pushed, teleported, trigger_impulsed
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / miscfunctions.qc
index 8b7806e566e91968bf6cc1211fa759aa4d27ac02..241dc3a99a1e921d853a6f90f1c99e296f2a5487 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)
@@ -3123,3 +3127,24 @@ float LostMovetypeFollow(entity ent)
        }
        return 0;
 }
+
+float isPushable(entity e)
+{
+       if(e.iscreature)
+               return TRUE;
+       switch(e.classname)
+       {
+               case "body":
+               case "corpse":
+               case "droppedweapon":
+               case "keepawayball":
+               case "nexball_basketball":
+               case "nexball_football":
+                       return TRUE;
+               case "bullet":
+                       return FALSE;
+       }
+       if (e.projectiledeathtype)
+               return TRUE;
+       return FALSE;
+}