X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=sv_move.c;h=f8a1cfb6cabe0da5e392ae062a7f850f4fe0d007;hb=52bda2e01c2fe584bb98477d158be3ef68dfb210;hp=fa5518758378143576e7c7a00f5fe6e56d341661;hpb=fc3e761aed3d3f464d133120b02d4ec14144de0c;p=xonotic%2Fdarkplaces.git diff --git a/sv_move.c b/sv_move.c index fa551875..f8a1cfb6 100644 --- a/sv_move.c +++ b/sv_move.c @@ -148,7 +148,10 @@ qboolean SV_movestep (prvm_edict_t *ent, vec3_t move, qboolean relink, qboolean VectorCopy (traceendpos, ent->fields.server->origin); if (relink) - SV_LinkEdict (ent, true); + { + SV_LinkEdict(ent); + SV_LinkEdict_TouchAreaGrid(ent); + } return true; } @@ -180,7 +183,10 @@ qboolean SV_movestep (prvm_edict_t *ent, vec3_t move, qboolean relink, qboolean { VectorAdd (ent->fields.server->origin, move, ent->fields.server->origin); if (relink) - SV_LinkEdict (ent, true); + { + SV_LinkEdict(ent); + SV_LinkEdict_TouchAreaGrid(ent); + } ent->fields.server->flags = (int)ent->fields.server->flags & ~FL_ONGROUND; return true; } @@ -197,7 +203,10 @@ qboolean SV_movestep (prvm_edict_t *ent, vec3_t move, qboolean relink, qboolean { // entity had floor mostly pulled out from underneath it // and is trying to correct if (relink) - SV_LinkEdict (ent, true); + { + SV_LinkEdict(ent); + SV_LinkEdict_TouchAreaGrid(ent); + } return true; } VectorCopy (oldorg, ent->fields.server->origin); @@ -207,11 +216,24 @@ qboolean SV_movestep (prvm_edict_t *ent, vec3_t move, qboolean relink, qboolean if ( (int)ent->fields.server->flags & FL_PARTIALGROUND ) ent->fields.server->flags = (int)ent->fields.server->flags & ~FL_PARTIALGROUND; +// gameplayfix: check if reached pretty steep plane and bail + if ( ! ( (int)ent->fields.server->flags & (FL_SWIM | FL_FLY) ) && sv_gameplayfix_nostepmoveonsteepslopes.integer ) + { + if (trace.plane.normal[ 2 ] < 0.5) + { + VectorCopy (oldorg, ent->fields.server->origin); + return false; + } + } + ent->fields.server->groundentity = PRVM_EDICT_TO_PROG(trace.ent); // the move is ok if (relink) - SV_LinkEdict (ent, true); + { + SV_LinkEdict(ent); + SV_LinkEdict_TouchAreaGrid(ent); + } return true; } @@ -249,10 +271,12 @@ qboolean SV_StepDirection (prvm_edict_t *ent, float yaw, float dist) { // not turned far enough, so don't take the step VectorCopy (oldorigin, ent->fields.server->origin); } - SV_LinkEdict (ent, true); + SV_LinkEdict(ent); + SV_LinkEdict_TouchAreaGrid(ent); return true; } - SV_LinkEdict (ent, true); + SV_LinkEdict(ent); + SV_LinkEdict_TouchAreaGrid(ent); return false; }