]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sv_move.c
add sv_gameplayfix_nostepmoveonsteepslopes which prevents MOVETYPE_STEP monsters...
[xonotic/darkplaces.git] / sv_move.c
index 507f51c3aefabd2624b86e64ab7d7548eb0423c7..f8a1cfb6cabe0da5e392ae062a7f850f4fe0d007 100644 (file)
--- a/sv_move.c
+++ b/sv_move.c
@@ -216,6 +216,16 @@ 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