]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/t_jumppads.qc
Merge branch 'master' into divVerent/csad
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / t_jumppads.qc
index bf17e3faf0ece436d0508dc64c4a9bc517103566..5a5042b3d48a63dc1a273feff50b33e767a7de8f 100644 (file)
@@ -2,6 +2,7 @@ float PUSH_ONCE                 = 1;
 float PUSH_SILENT              = 2;
 
 .float pushltime;
+.float istypefrag;
 .float height;
 
 void() SUB_UseTargets;
@@ -199,19 +200,15 @@ void trigger_push_touch()
                        else
                                other.lastteleporttime = time;
 
-                       if (!other.animstate_override)
-                       {
-                               if (other.crouch)
-                                       setanim(other, other.anim_duckjump, FALSE, TRUE, TRUE);
-                               else
-                                       setanim(other, other.anim_jump, FALSE, TRUE, TRUE);
-                       }
+                       if (other.deadflag == DEAD_NO)
+                               animdecide_setaction(other, ANIMACTION_JUMP, TRUE);
                }
                else
                        other.jumppadcount = TRUE;
 
                // reset tracking of who pushed you into a hazard (for kill credit)
                other.pushltime = 0;
+               other.istypefrag = 0;
        }
 
        if(self.enemy.target)
@@ -243,7 +240,7 @@ void trigger_push_touch()
 
        if (self.spawnflags & PUSH_ONCE)
        {
-               self.touch = SUB_Null;
+               self.touch = func_null;
                self.think = SUB_Remove;
                self.nextthink = time;
        }
@@ -285,7 +282,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
                {