fix: logos config not initialized (resolves #691)
bot: make sure rescue zone icon blinking to consider bot reached rescue zone when escorting hostages (ref #688) bot: remove hardcoded radio communication randoms, so they're now depends on bots personality refactor: some refactoring of code
This commit is contained in:
parent
d6d76e136d
commit
6dfb09f110
26 changed files with 180 additions and 141 deletions
|
|
@ -17,7 +17,7 @@ int BotControl::cmdAddBot () {
|
|||
|
||||
// this is duplicate error as in main bot creation code, but not to be silent
|
||||
if (!graph.length () || graph.hasChanged ()) {
|
||||
ctrl.msg ("There is no graph found or graph is changed. Cannot create bot.");
|
||||
msg ("There is no graph found or graph is changed. Cannot create bot.");
|
||||
return BotCommandResult::Handled;
|
||||
}
|
||||
|
||||
|
|
@ -91,7 +91,7 @@ int BotControl::cmdKillBots () {
|
|||
bots.killAllBots (Team::Terrorist, silentKill);
|
||||
}
|
||||
else {
|
||||
bots.killAllBots (-1, silentKill);
|
||||
bots.killAllBots (Team::Invalid, silentKill);
|
||||
}
|
||||
return BotCommandResult::Handled;
|
||||
}
|
||||
|
|
@ -204,6 +204,9 @@ int BotControl::cmdCvars () {
|
|||
|
||||
auto match = arg <StringRef> (pattern);
|
||||
|
||||
// stop printing if executed once more
|
||||
flushPrintQueue ();
|
||||
|
||||
// revert all the cvars to their default values
|
||||
if (match == "defaults") {
|
||||
msg ("Bots cvars has been reverted to their default values.");
|
||||
|
|
@ -244,7 +247,7 @@ int BotControl::cmdCvars () {
|
|||
cfg.puts ("// Configuration file for %s\n\n", product.name);
|
||||
}
|
||||
else {
|
||||
ctrl.setRapidOutput (true);
|
||||
setRapidOutput (true);
|
||||
}
|
||||
|
||||
for (const auto &cvar : game.getCvars ()) {
|
||||
|
|
@ -303,7 +306,7 @@ int BotControl::cmdCvars () {
|
|||
msg (" ");
|
||||
}
|
||||
}
|
||||
ctrl.setRapidOutput (false);
|
||||
setRapidOutput (false);
|
||||
|
||||
if (isSave) {
|
||||
if (!cfg) {
|
||||
|
|
@ -2172,13 +2175,13 @@ void BotControl::maintainAdminRights () {
|
|||
}
|
||||
else if (password != engfuncs.pfnInfoKeyValue (engfuncs.pfnGetInfoKeyBuffer (ent), key.chars ())) {
|
||||
client.flags &= ~ClientFlags::Admin;
|
||||
ctrl.msg ("Player %s had lost remote access to %s.", ent->v.netname.chars (), product.name);
|
||||
msg ("Player %s had lost remote access to %s.", ent->v.netname.chars (), product.name);
|
||||
}
|
||||
}
|
||||
else if (!(client.flags & ClientFlags::Admin) && !key.empty () && !password.empty ()) {
|
||||
if (password == engfuncs.pfnInfoKeyValue (engfuncs.pfnGetInfoKeyBuffer (ent), key.chars ())) {
|
||||
client.flags |= ClientFlags::Admin;
|
||||
ctrl.msg ("Player %s had gained full remote access to %s.", ent->v.netname.chars (), product.name);
|
||||
msg ("Player %s had gained full remote access to %s.", ent->v.netname.chars (), product.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue