]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sv_phys.c
Fixed the sliders and the toggles in the options menu
[xonotic/darkplaces.git] / sv_phys.c
index 628591e23ec569a575412974df229e04a44b1052..909dbb4cbfc8c38e51c0fa6de53a9d3a9d1a9896 100644 (file)
--- a/sv_phys.c
+++ b/sv_phys.c
@@ -575,11 +575,15 @@ void SV_PushMove (edict_t *pusher, float movetime)
                SV_LinkEdict (pusher, false);
                return;
        default:
-               Host_Error("SV_PushMove: unrecognized solid type %f\n", pusher->v->solid);
+               Con_DPrintf("SV_PushMove: unrecognized solid type %f\n", pusher->v->solid);
+               return;
        }
        index = (int) pusher->v->modelindex;
        if (index < 1 || index >= MAX_MODELS)
-               Host_Error("SV_PushMove: invalid modelindex %f\n", pusher->v->modelindex);
+       {
+               Con_DPrintf("SV_PushMove: invalid modelindex %f\n", pusher->v->modelindex);
+               return;
+       }
        pushermodel = sv.models[index];
 
        movetime2 = movetime;
@@ -1010,7 +1014,7 @@ void SV_WalkMove (edict_t *ent)
 
        if (ent->v->movetype != MOVETYPE_FLY)
        {
-               if (!oldonground && ent->v->waterlevel == 0 && !sv_jumpstep.integer)
+               if (!oldonground && ent->v->waterlevel == 0 && (!sv_jumpstep.integer || !sv_gameplayfix_stepwhilejumping.integer))
                        // don't stair up while jumping
                        return;
 
@@ -1201,6 +1205,8 @@ void SV_Physics_Toss (edict_t *ent)
 // if onground, return without moving
        if ((int)ent->v->flags & FL_ONGROUND)
        {
+               if (!sv_gameplayfix_noairborncorpse.integer)
+                       return;
                if (ent->v->groundentity == 0)
                        return;
                // if ent was supported by a brush model on previous frame,
@@ -1248,16 +1254,31 @@ void SV_Physics_Toss (edict_t *ent)
                        float d;
                        ClipVelocity (ent->v->velocity, trace.plane.normal, ent->v->velocity, 1.5);
                        // LordHavoc: fixed grenades not bouncing when fired down a slope
-                       d = DotProduct(trace.plane.normal, ent->v->velocity);
-                       if (trace.plane.normal[2] > 0.7 && fabs(d) < 60)
+                       if (sv_gameplayfix_grenadebouncedownslopes.integer)
                        {
-                               ent->v->flags = (int)ent->v->flags | FL_ONGROUND;
-                               ent->v->groundentity = EDICT_TO_PROG(trace.ent);
-                               VectorClear (ent->v->velocity);
-                               VectorClear (ent->v->avelocity);
+                               d = DotProduct(trace.plane.normal, ent->v->velocity);
+                               if (trace.plane.normal[2] > 0.7 && fabs(d) < 60)
+                               {
+                                       ent->v->flags = (int)ent->v->flags | FL_ONGROUND;
+                                       ent->v->groundentity = EDICT_TO_PROG(trace.ent);
+                                       VectorClear (ent->v->velocity);
+                                       VectorClear (ent->v->avelocity);
+                               }
+                               else
+                                       ent->v->flags = (int)ent->v->flags & ~FL_ONGROUND;
                        }
                        else
-                               ent->v->flags = (int)ent->v->flags & ~FL_ONGROUND;
+                       {
+                               if (trace.plane.normal[2] > 0.7 && ent->v->velocity[2] < 60)
+                               {
+                                       ent->v->flags = (int)ent->v->flags | FL_ONGROUND;
+                                       ent->v->groundentity = EDICT_TO_PROG(trace.ent);
+                                       VectorClear (ent->v->velocity);
+                                       VectorClear (ent->v->avelocity);
+                               }
+                               else
+                                       ent->v->flags = (int)ent->v->flags & ~FL_ONGROUND;
+                       }
                }
                else
                {