refactor: use xash3d physics interface to handle with linkents, so do not hook dlopen/dlsym while running under xash3d
add: force set sv_forcesimulating to 1 while running under xash3d
This commit is contained in:
parent
49a1fbbb6b
commit
3205e1253f
10 changed files with 256 additions and 42 deletions
|
|
@ -671,6 +671,17 @@ void Game::checkCvarsBounds () {
|
|||
ctrl.msg ("Bogus value for cvar '%s', min is '%.1f' and max is '%.1f', and we're got '%s', value reverted to default '%.1f'.", var.reg.name, var.min, var.max, str, var.initial);
|
||||
}
|
||||
}
|
||||
|
||||
// special case for xash3d, by default engine is not calling startframe if no players on server, but our quota management and bot adding
|
||||
// mechanism assumes that starframe is called even if no players on server, so, set the xash3d's sv_forcesimulating cvar to 1 in case it's not
|
||||
if (is (GameFlags::Xash3D)) {
|
||||
static cvar_t *sv_forcesimulating = engfuncs.pfnCVarGetPointer ("sv_forcesimulating");
|
||||
|
||||
if (sv_forcesimulating && sv_forcesimulating->value != 1.0f) {
|
||||
game.print ("Force-enable Xash3D sv_forcesimulating cvar.");
|
||||
engfuncs.pfnCVarSetFloat ("sv_forcesimulating", 1.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Game::registerCvars (bool gameVars) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue