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

@ -262,6 +262,14 @@ int BotControl::cmdCvars () {
return BotCommandResult::Handled;
}
int BotControl::cmdShowCustom () {
enum args { alias = 1 };
conf.showCustomValues ();
return BotCommandResult::Handled;
}
int BotControl::cmdNode () {
enum args { root, alias, cmd, cmd2 };
@ -1895,6 +1903,7 @@ BotControl::BotControl () {
m_cmds.emplace ("list/listbots", "list [noarguments]", "Lists the bots currently playing on server.", &BotControl::cmdList);
m_cmds.emplace ("graph/g/wp/wpt/waypoint", "graph [help]", "Handles graph operations.", &BotControl::cmdNode);
m_cmds.emplace ("cvars", "cvars [save|cvar]", "Display all the cvars with their descriptions.", &BotControl::cmdCvars);
m_cmds.emplace ("show_custom", "show_custom [noarguments]", "Show's the curent values from custom.cfg.", &BotControl::cmdShowCustom);
// declare the menus
createMenus ();