bot: disable spray logo task on xash3d engine

fix: crash on aarch64 builds (ref #667)
nav: improved player avoidance
nav: improved handling of short path radii
conf: control min and max cvar values
build: probably fix i386 build when building with cmake (untested)
This commit is contained in:
jeefo 2025-01-31 19:32:24 +03:00
commit e820527703
No known key found for this signature in database
GPG key ID: D696786B81B667C8
12 changed files with 104 additions and 40 deletions

View file

@ -697,6 +697,27 @@ void Game::checkCvarsBounds () {
// notify about that
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.name, var.min, var.max, str, var.initial);
continue;
}
/// prevent min/max problems
if (var.name.contains ("_max")) {
String minVar = String (var.name);
minVar.replace ("_max", "_min");
for (auto &mv : m_cvars) {
if (mv.name == minVar) {
const auto minValue = mv.self->as <float> ();
if (minValue > value) {
var.self->set (minValue);
mv.self->set (value);
// notify about that
ctrl.msg ("Bogus value for min/max cvar '%s' can't be higher than '%s'. Values swapped.", mv.name, var.name);
}
}
}
}
}