X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Ft_jumppads.qc;h=0b6f7fc4cd9488357ccb0b0110adf3adf87a18ec;hb=15a449780e666b73d76cef39230b15ade1daf45f;hp=cce0aab32bb5f062ca66a853f2a7996dfafef5c4;hpb=7e0864d035fea38e3127a0728909641536c1a99d;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/t_jumppads.qc b/qcsrc/server/t_jumppads.qc index cce0aab32..0b6f7fc4c 100644 --- a/qcsrc/server/t_jumppads.qc +++ b/qcsrc/server/t_jumppads.qc @@ -2,6 +2,7 @@ float PUSH_ONCE = 1; float PUSH_SILENT = 2; .float pushltime; +.float istypefrag; .float height; void() SUB_UseTargets; @@ -36,6 +37,8 @@ vector trigger_push_calculatevelocity(vector org, entity tgt, float ht) torg = tgt.origin + (tgt.mins + tgt.maxs) * 0.5; grav = autocvar_sv_gravity; + if(other.gravity) + grav *= other.gravity; zdist = torg_z - org_z; sdist = vlen(torg - org - zdist * '0 0 1'); @@ -199,20 +202,15 @@ void trigger_push_touch() else other.lastteleporttime = time; - if (!other.animstate_override) if (other.deadflag == DEAD_NO) - { - if (other.crouch) - setanim(other, other.anim_duckjump, FALSE, TRUE, TRUE); - else - setanim(other, other.anim_jump, FALSE, TRUE, TRUE); - } + 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) @@ -244,7 +242,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; } @@ -286,7 +284,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 {