//============================================================================
+extern void SV_Phys_Init (void);
+
/*
===============
SV_Init
Cvar_RegisterVariable (&sv_cullentities_trace);
Cvar_RegisterVariable (&sv_cullentities_stats);
+ SV_Phys_Init();
+
for (i = 0;i < MAX_MODELS;i++)
sprintf (localmodels[i], "*%i", i);
// serverflags are for cross level information (sigils)
pr_global_struct->serverflags = svs.serverflags;
-
+
ED_LoadFromFile (sv.worldmodel->entities);
// LordHavoc: clear world angles (to fix e3m3.bsp)
VectorClear(sv.edicts->v.angles);
cvar_t sv_gravity = {CVAR_NOTIFY, "sv_gravity","800"};
cvar_t sv_maxvelocity = {0, "sv_maxvelocity","2000"};
cvar_t sv_nostep = {0, "sv_nostep","0"};
+cvar_t sv_stepheight = {0, "sv_stepheight", "18"};
#define MOVE_EPSILON 0.01
void SV_Physics_Toss (edict_t *ent);
+void SV_Phys_Init (void)
+{
+ Cvar_RegisterVariable(&sv_stepheight);
+}
+
/*
================
SV_CheckAllEnts
SV_LinkEdict (ent, true);
return;
}
-
+
for (z=0 ; z< 18 ; z++)
for (i=-1 ; i <= 1 ; i++)
for (j=-1 ; j <= 1 ; j++)
Only used by players
======================
*/
-#define STEPSIZE 18
void SV_WalkMove (edict_t *ent)
{
vec3_t upmove, downmove;
VectorClear (upmove);
VectorClear (downmove);
- upmove[2] = STEPSIZE;
- downmove[2] = -STEPSIZE + oldvel[2]*sv.frametime;
+ upmove[2] = sv_stepheight.value;
+ downmove[2] = -sv_stepheight.value + oldvel[2]*sv.frametime;
// move up
SV_PushEntity (ent, upmove, vec3_origin); // FIXME: don't link?
groundentity = PROG_TO_EDICT(ent->v.groundentity);
if (groundentity != NULL && groundentity->v.solid == SOLID_BSP)
ent->suspendedinairflag = true;
- else if (ent->suspendedinairflag && (groundentity == NULL || groundentity->v.solid != SOLID_BSP))
+ else if (ent->suspendedinairflag && (groundentity == NULL || groundentity->free))
{
// leave it suspended in the air
ent->v.groundentity = 0;
+ ent->suspendedinairflag = false;
return;
}
}