SV_LinkEdict (pusher, false);
return;
default:
- Con_DPrintf("SV_PushMove: unrecognized solid type %f\n", pusher->v->solid);
+ Con_Printf("SV_PushMove: unrecognized solid type %f\n", pusher->v->solid);
return;
}
index = (int) pusher->v->modelindex;
if (index < 1 || index >= MAX_MODELS)
{
- Con_DPrintf("SV_PushMove: invalid modelindex %f\n", pusher->v->modelindex);
+ Con_Printf("SV_PushMove: invalid modelindex %f\n", pusher->v->modelindex);
return;
}
pushermodel = sv.models[index];
if (clip & 2 && sv_wallfriction.integer)
SV_WallFriction (ent, stepnormal);
}
- else if (!sv_gameplayfix_stepdown.integer || !oldonground || start_velocity[2] > 0 || ((int)ent->v->flags & FL_ONGROUND) || ent->v->waterlevel >= 2)
+ // skip out if stepdown is enabled, moving downward, not in water, and the move started onground and ended offground
+ else if (!(sv_gameplayfix_stepdown.integer && ent->v->waterlevel < 2 && start_velocity[2] < (1.0 / 32.0) && oldonground && !((int)ent->v->flags & FL_ONGROUND)))
return;
// move down
if (!SV_RunThink (ent))
return;
+ // don't stick to ground if onground and moving upward
+ if (ent->v->velocity[2] >= (1.0 / 32.0) && ((int)ent->v->flags & FL_ONGROUND))
+ ent->v->flags = (int)ent->v->flags & ~FL_ONGROUND;
+
// if onground, return without moving
if ((int)ent->v->flags & FL_ONGROUND)
{
*/
void SV_Physics_Step (edict_t *ent)
{
+ // don't stick to ground if onground and moving upward
+ if (ent->v->velocity[2] >= (1.0 / 32.0) && ((int)ent->v->flags & FL_ONGROUND))
+ ent->v->flags = (int)ent->v->flags & ~FL_ONGROUND;
+
// freefall if not onground/fly/swim
if (!((int)ent->v->flags & (FL_ONGROUND | FL_FLY | FL_SWIM)))
{
if (pr_global_struct->force_retouch)
SV_LinkEdict (ent, true); // force retouch even for stationary
- if (i <= svs.maxclients)
+ if (i >= 1 && i <= svs.maxclients && svs.clients[i-1].spawned)
{
- if (i > 0)
- {
- if (!svs.clients[i-1].spawned)
- continue;
- // connected slot
- // call standard client pre-think
- SV_CheckVelocity (ent);
- pr_global_struct->time = sv.time;
- pr_global_struct->self = EDICT_TO_PROG(ent);
- PR_ExecuteProgram (pr_global_struct->PlayerPreThink, "QC function PlayerPreThink is missing");
- SV_CheckVelocity (ent);
- }
+ // connected slot
+ // call standard client pre-think
+ SV_CheckVelocity (ent);
+ pr_global_struct->time = sv.time;
+ pr_global_struct->self = EDICT_TO_PROG(ent);
+ PR_ExecuteProgram (pr_global_struct->PlayerPreThink, "QC function PlayerPreThink is missing");
+ SV_CheckVelocity (ent);
}
else if (sv_freezenonclients.integer)
continue;
break;
}
- if (i <= svs.maxclients && i > 0 && !ent->e->free)
+ if (i >= 1 && i <= svs.maxclients && svs.clients[i-1].spawned)
{
SV_CheckVelocity (ent);