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:
parent
ed46e3238d
commit
075bff2988
21 changed files with 533 additions and 404 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue