ci: enable continuous builds for repository

aim: do not add aim errors if too close to enemy
conf: do not spam with unknown custom variables if config doesn't define one
This commit is contained in:
jeefo 2024-01-22 08:50:03 +03:00
commit bcb5b954cb
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED
3 changed files with 66 additions and 6 deletions

View file

@ -649,14 +649,20 @@ void BotConfig::loadCustomConfig () {
String line;
MemFile file;
m_custom["C4ModelName"] = "c4.mdl";
m_custom["AMXParachuteCvar"] = "sv_parachute";
m_custom["CustomCSDMSpawnPoint"] = "view_spawn";
auto setDefaults = [&] () {
m_custom["C4ModelName"] = "c4.mdl";
m_custom["AMXParachuteCvar"] = "sv_parachute";
m_custom["CustomCSDMSpawnPoint"] = "view_spawn";
};
setDefaults ();
// custom initialization
if (openConfig ("custom", "Custom config file not found. Loading defaults.", &file)) {
m_custom.clear ();
// set defaults anyway
setDefaults ();
while (file.getLine (line)) {
line.trim ();