]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sv_move.c
change DPSOFTRAST default texture filter to linear, it hurts fps some
[xonotic/darkplaces.git] / sv_move.c
index fa5518758378143576e7c7a00f5fe6e56d341661..f8a1cfb6cabe0da5e392ae062a7f850f4fe0d007 100644 (file)
--- 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;
 }