]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/t_jumppads.qc
Fix kill/teamchange/spectate not working in vehicles
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / t_jumppads.qc
index abb0c306d6175a9d594f7bf759e604f8f082796f..8923c19f18300e1f742acd0586e61539744c3c15 100644 (file)
@@ -2,6 +2,7 @@ float PUSH_ONCE                 = 1;
 float PUSH_SILENT              = 2;
 
 .float pushltime;
+.float istypefrag;
 .float height;
 
 void() SUB_UseTargets;
@@ -200,6 +201,7 @@ void trigger_push_touch()
                                other.lastteleporttime = time;
 
                        if (!other.animstate_override)
+                       if (other.deadflag == DEAD_NO)
                        {
                                if (other.crouch)
                                        setanim(other, other.anim_duckjump, FALSE, TRUE, TRUE);
@@ -212,6 +214,7 @@ void trigger_push_touch()
 
                // reset tracking of who pushed you into a hazard (for kill credit)
                other.pushltime = 0;
+               other.istypefrag = 0;
        }
 
        if(self.enemy.target)
@@ -247,7 +250,7 @@ void trigger_push_touch()
                self.think = SUB_Remove;
                self.nextthink = time;
        }
-};
+}
 
 .vector dest;
 void trigger_push_findtarget()
@@ -285,7 +288,7 @@ void trigger_push_findtarget()
                else if(n == 1)
                {
                        // exactly one dest - bots love that
-                       self.enemy = find(e, targetname, self.target);
+                       self.enemy = find(world, targetname, self.target);
                }
                else
                {
@@ -303,7 +306,7 @@ void trigger_push_findtarget()
                waypoint_spawnforteleporter(self, trace_endpos, vlen(trace_endpos - org) / vlen(e.velocity));
                remove(e);
        }
-};
+}
 
 /*
  * ENTITY PARAMETERS:
@@ -338,8 +341,8 @@ void spawnfunc_trigger_push()
 
        // this must be called to spawn the teleport waypoints for bots
        InitializeEntity(self, trigger_push_findtarget, INITPRIO_FINDTARGET);
-};
+}
 
-void spawnfunc_target_push() {};
-void spawnfunc_info_notnull() {};
-void spawnfunc_target_position() {};
+void spawnfunc_target_push() {}
+void spawnfunc_info_notnull() {}
+void spawnfunc_target_position() {}