cfg: updated yapb.cfg to reflect changes.
cfg: made yb_quota 9 by default. linux: fixed bots connection times remains static on linux or osx. crlib: fix security issues.
This commit is contained in:
parent
61ce4d548c
commit
30a112fd71
10 changed files with 110 additions and 54 deletions
|
|
@ -38,14 +38,12 @@ void BotConfig::loadConfigs () {
|
|||
loadDifficultyConfig ();
|
||||
}
|
||||
|
||||
void BotConfig::loadMainConfig () {
|
||||
void BotConfig::loadMainConfig (bool isFirstLoad) {
|
||||
if (game.is (GameFlags::Legacy) && !game.is (GameFlags::Xash3D)) {
|
||||
util.setNeedForWelcome (true);
|
||||
}
|
||||
setupMemoryFiles ();
|
||||
|
||||
static bool firstLoad = true;
|
||||
|
||||
auto needsToIgnoreVar = [](StringArray &list, const char *needle) {
|
||||
for (const auto &var : list) {
|
||||
if (var == needle) {
|
||||
|
|
@ -66,7 +64,7 @@ void BotConfig::loadMainConfig () {
|
|||
continue;
|
||||
}
|
||||
|
||||
if (firstLoad) {
|
||||
if (isFirstLoad) {
|
||||
game.serverCommand (line.chars ());
|
||||
continue;
|
||||
}
|
||||
|
|
@ -104,7 +102,6 @@ void BotConfig::loadMainConfig () {
|
|||
}
|
||||
file.close ();
|
||||
}
|
||||
firstLoad = false;
|
||||
|
||||
// android is abit hard to play, lower the difficulty by default
|
||||
if (plat.android && cv_difficulty.int_ () > 3) {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
ConVar cv_display_menu_text ("yb_display_menu_text", "1", "Enables or disables display menu text, when players asks for menu. Useful only for Android.");
|
||||
ConVar cv_password ("yb_password", "", "The value (password) for the setinfo key, if user set's correct password, he's gains access to bot commands and menus.", false, 0.0f, 0.0f, Var::Password);
|
||||
ConVar cv_password_key ("yb_password_key", "_ubpw", "The name of setinfo key used to store password to bot commands and menus.", false);
|
||||
ConVar cv_password_key ("yb_password_key", "_ybpw", "The name of setinfo key used to store password to bot commands and menus.", false);
|
||||
|
||||
int BotControl::cmdAddBot () {
|
||||
enum args { alias = 1, difficulty, personality, team, model, name, max };
|
||||
|
|
|
|||
|
|
@ -745,6 +745,9 @@ bool Game::postload () {
|
|||
// set out user agent for http stuff
|
||||
http.setUserAgent (strings.format ("%s/%s", product.name, product.version));
|
||||
|
||||
// set the app name
|
||||
plat.setAppName (product.name.chars ());
|
||||
|
||||
// register bot cvars
|
||||
game.registerCvars ();
|
||||
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ CR_EXPORT int GetEntityAPI (gamefuncs_t *table, int) {
|
|||
// to register by the engine side the server commands we need to administrate our bots.
|
||||
|
||||
// execute main config
|
||||
conf.loadMainConfig ();
|
||||
conf.loadMainConfig (true);
|
||||
conf.adjustWeaponPrices ();
|
||||
|
||||
if (game.is (GameFlags::Metamod)) {
|
||||
|
|
@ -448,7 +448,7 @@ CR_EXPORT int GetEntityAPI (gamefuncs_t *table, int) {
|
|||
}
|
||||
|
||||
CR_LINKAGE_C int GetEntityAPI_Post (gamefuncs_t *table, int) {
|
||||
// this function is called right after GiveFnptrsToDll() by the engine in the game DLL (or
|
||||
// this function is called right after ssToDll() by the engine in the game DLL (or
|
||||
// what it BELIEVES to be the game DLL), in order to copy the list of MOD functions that can
|
||||
// be called by the engine, into a memory block pointed to by the functionTable pointer
|
||||
// that is passed into this function (explanation comes straight from botman). This allows
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
ConVar cv_autovacate ("yb_autovacate", "1", "Kick bots to automatically make room for human players.");
|
||||
|
||||
ConVar cv_quota ("yb_quota", "0", "Specifies the number bots to be added to the game.", true, 0.0f, static_cast <float> (kGameMaxPlayers));
|
||||
ConVar cv_quota ("yb_quota", "9", "Specifies the number bots to be added to the game.", true, 0.0f, static_cast <float> (kGameMaxPlayers));
|
||||
ConVar cv_quota_mode ("yb_quota_mode", "normal", "Specifies the type of quota.\nAllowed values: 'normal', 'fill', and 'match'.\nIf 'fill', the server will adjust bots to keep N players in the game, where N is yb_quota.\nIf 'match', the server will maintain a 1:N ratio of humans to bots, where N is yb_quota_match.", false);
|
||||
ConVar cv_quota_match ("yb_quota_match", "0", "Number of players to match if yb_quota_mode set to 'match'", true, 0.0f, static_cast <float> (kGameMaxPlayers));
|
||||
ConVar cv_think_fps ("yb_think_fps", "30.0", "Specifies how many times per second bot code will run.", true, 30.0f, 90.0f);
|
||||
|
|
@ -37,8 +37,8 @@ ConVar cv_difficulty_auto ("yb_difficulty_auto", "0", "Enables each bot balances
|
|||
ConVar cv_show_avatars ("yb_show_avatars", "1", "Enables or disabels displaying bot avatars in front of their names in scoreboard. Note, that is currently you can see only avatars of your steam friends.");
|
||||
ConVar cv_show_latency ("yb_show_latency", "2", "Enables latency display in scoreboard.\nAllowed values: '0', '1', '2'.\nIf '0', there is nothing displayed.\nIf '1', there is a 'BOT' is displayed.\nIf '2' fake ping is displayed.", true, 0.0f, 2.0f);
|
||||
|
||||
ConVar cv_botskin_t ("yb_botskin_t", "0", "Specifies the bots wanted skin for Terrorist team", true, 0.0f, 5.0f);
|
||||
ConVar cv_botskin_ct ("yb_botskin_ct", "0", "Specifies the bots wanted skin for CT team", true, 0.0f, 5.0f);
|
||||
ConVar cv_botskin_t ("yb_botskin_t", "0", "Specifies the bots wanted skin for Terrorist team.", true, 0.0f, 5.0f);
|
||||
ConVar cv_botskin_ct ("yb_botskin_ct", "0", "Specifies the bots wanted skin for CT team.", true, 0.0f, 5.0f);
|
||||
|
||||
ConVar cv_ping_base_min ("yb_ping_base_min", "7", "Lower bound for base bot ping shown in scoreboard upon creation.", true, 0.0f, 100.0f);
|
||||
ConVar cv_ping_base_max ("yb_ping_base_max", "34", "Upper bound for base bot ping shown in scoreboard upon creation.", true, 0.0f, 100.0f);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue