}
player.lastteleporttime = time;
+ player.lastteleport_origin = from;
}
#endif
}
#ifdef SVQC
pl.oldvelocity = pl.velocity;
#endif
- // reset teleport time tracking too (or multijump can cause insane speeds)
- pl.lastteleporttime = time;
}
}
#ifdef CSQC
.entity realowner;
-.float lastteleporttime;
#endif
void WarpZone_TeleportPlayer(entity teleporter, entity player, vector to, vector to_angles, vector to_velocity)
{
+ player.lastteleport_origin = player.origin;
+ player.lastteleporttime = time;
setorigin(player, to); // NOTE: this also aborts the move, when this is called by touch
#ifdef SVQC
player.oldorigin = to; // for DP's unsticking
if(this.lastteleporttime > 0
&& time - this.lastteleporttime < ((this.goalcurrent.wpflags & WAYPOINTFLAG_PERSONAL) ? 2 : 0.15))
{
- if (this.jumppadcount && !boxesoverlap(this.goalcurrent.absmin, this.goalcurrent.absmax,
+ if (!boxesoverlap(this.goalcurrent.absmin, this.goalcurrent.absmax,
this.lastteleport_origin + STAT(PL_MIN, this), this.lastteleport_origin + STAT(PL_MAX, this)))
{
return removed_goals;
setorigin(this, spot.origin + '0 0 1' * (1 - this.mins.z - 24));
// don't reset back to last position, even if new position is stuck in solid
this.oldorigin = this.origin;
- this.lastteleporttime = time; // prevent insane speeds due to changing origin
if(this.conveyor)
IL_REMOVE(g_conveyed, this);
this.conveyor = NULL; // prevent conveyors at the previous location from moving a freshly spawned player