1 = floor
2 = wall / step
4 = dead stop
+8 = teleported by touch method
If stepnormal is not NULL, the plane normal of any vertical wall hit will be stored
============
*/
{
// we got teleported by a touch function
// let's abort the move
+ blocked |= 8;
break;
}
*/
// LordHavoc: this came from QW and allows you to get out of water more easily
- if (sv_gameplayfix_easierwaterjump.integer && ((int)ent->fields.server->flags & FL_WATERJUMP))
+ if (sv_gameplayfix_easierwaterjump.integer && ((int)ent->fields.server->flags & FL_WATERJUMP) && !(blocked & 8))
VectorCopy(primal_velocity, ent->fields.server->velocity);
if (applygravity && !((int)ent->fields.server->flags & FL_ONGROUND))
ent->fields.server->velocity[2] -= gravity;
SV_CheckVelocity(ent);
SV_LinkEdict (ent, true);
- VectorCopy(ent->fields.server->origin, originalmove_origin);
- VectorCopy(ent->fields.server->velocity, originalmove_velocity);
- originalmove_clip = clip;
- originalmove_flags = (int)ent->fields.server->flags;
- originalmove_groundentity = ent->fields.server->groundentity;
+ if(clip & 8) // teleport
+ return;
if ((int)ent->fields.server->flags & FL_WATERJUMP)
return;
if (sv_nostep.integer)
return;
+ VectorCopy(ent->fields.server->origin, originalmove_origin);
+ VectorCopy(ent->fields.server->velocity, originalmove_velocity);
+ originalmove_clip = clip;
+ originalmove_flags = (int)ent->fields.server->flags;
+ originalmove_groundentity = ent->fields.server->groundentity;
+
// if move didn't block on a step, return
if (clip & 2)
{