Set default physics cvars up on init, as the engine has some set to "" and

thus renders our autocvar definitions useless.
This commit is contained in:
Marco Cawthorne 2021-08-14 09:13:27 +02:00
parent f562991ada
commit 62b5e300d7
1 changed files with 13 additions and 0 deletions

View File

@ -115,6 +115,19 @@ var float autocvar_sv_maxspeed = PMOVE_MAXSPEED;
void
PMove_Init(void)
{
#ifdef SERVER
cvar_set("sv_stepheight", ftos(PMOVE_STEPHEIGHT));
cvar_set("sv_airstepheight", ftos(PMOVE_AIRSTEPHEIGHT));
cvar_set("sv_friction", ftos(PMOVE_FRICTION));
cvar_set("sv_edgefrictio", ftos(PMOVE_EDGEFRICTION));
cvar_set("sv_stopspeed", ftos(PMOVE_STOPSPEED));
cvar_set("sv_gravity", ftos(PMOVE_GRAVITY));
cvar_set("sv_airaccelerate", ftos(PMOVE_AIRACCELERATE));
cvar_set("sv_wateraccelerate", ftos(PMOVE_WATERACCELERATE));
cvar_set("sv_accelerat", ftos(PMOVE_ACCELERATE));
cvar_set("sv_maxspeed", ftos(PMOVE_MAXSPEED));
#endif
#ifdef CUSTOMPLAYERPHYSICS
PMoveCustom_Init();
#endif