Custom.cfg (#213)

Added custom configs.

These are used for replacing some hardcoded strings inside bot code, currently custom cvar for parachute detection is available, as well as custom c4 model names.

Added editorconfig, and fixed CRLF for files (was a mix between LF & CRLF).
Fixed use-after-free sanitizer error with chatlib.
Fixed configs files loaded with memory-loader does not process last line in config files.
This commit is contained in:
jeefo 2020-12-15 15:28:58 +03:00 committed by GitHub
commit 075bff2988
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 533 additions and 404 deletions

View file

@ -1628,10 +1628,13 @@ void BotManager::updateActiveGrenade () {
}
m_activeGrenades.clear (); // clear previously stored grenades
// need to ignore bomb model in active grenades...
auto bombModel = conf.getBombModelName ();
// search the map for any type of grenade
game.searchEntities ("classname", "grenade", [&] (edict_t *e) {
// do not count c4 as a grenade
if (strcmp (e->v.model.chars (9), "c4.mdl") != 0) {
if (!util.isModel (e, bombModel)) {
m_activeGrenades.push (e);
}
return EntitySearchResult::Continue; // continue iteration