aim: verify camp angles from nav data before using them
aim: tweaked a bit grenade handling, so bots should use them more aim: reduce time between selecting grenade and throwing it away aim: removed hacks in look angles code, due to removing yb_whoose_your_daddy cvar aim: use direct enemy origin from visibility check, and not re-calculate it aim: update enemy prediction, so it now depends on frame interval for a bot aim: additional height offset are tweaked, and now used only for difficulty 4 nav: tweaked a bit player avoidance code, and it's not preventing bot from checking terrain nav: do not check banned nodes, when bucket sizes re too low nav: cover nodes are now selected depending on total bots on server nav: let bot enter pause task after long jump nav: extend velocity by a little for a jump, like it was in first versions of bot nav: stuck checking is now taken in account lower minimal speed if bot is ducking fix: navigation reachability timers, so bots will have correct current node index while camping fix: bots are unable to finish pickup or destroy breakable task, if target is not reachable fix: cover nodes are now calculated as they should fix: manual calling bots add_[t/ct] now ignores yb_join_team cvar bot: tweaked a little difficulty levels, so level 4 is now nightmare level, and 3 is very heard bot: minor refactoring and moving functions to correct source file bot: add yb_economics_disrespect_percent, so bots can ignore economics and buy more different guns bot: add yb_check_darkness that allows to disable darkness checks for bot, thus disallowing usage of flashlight bot: camp buttons are now lightly depends on bot health chat: welcome chat message from bots is now sent during first freeze time period crlib: switch over to stdint.h and remove crlib-own types crlib: fixed alignment in sse code
This commit is contained in:
parent
722e4eda93
commit
29c00565dc
31 changed files with 1395 additions and 1305 deletions
|
|
@ -158,7 +158,7 @@ void BotConfig::loadWeaponsConfig () {
|
|||
}
|
||||
};
|
||||
|
||||
auto addIntEntries = [] (SmallArray <int32> &to, StringRef name, const StringArray &data) {
|
||||
auto addIntEntries = [] (SmallArray <int32_t> &to, StringRef name, const StringArray &data) {
|
||||
if (data.length () != to.length ()) {
|
||||
logger.error ("%s entry in weapons config is not valid or malformed (%d/%d).", name, data.length (), to.length ());
|
||||
return;
|
||||
|
|
@ -334,9 +334,9 @@ void BotConfig::loadChatterConfig () {
|
|||
for (const auto &event : chatterEventMap) {
|
||||
if (event.str == items[0]) {
|
||||
// this does common work of parsing comma-separated chatter line
|
||||
auto sounds = items[1].split (",");
|
||||
auto sentences = items[1].split (",");
|
||||
|
||||
for (auto &sound : sounds) {
|
||||
for (auto &sound : sentences) {
|
||||
sound.trim ().trim ("\"");
|
||||
auto duration = game.getWaveLen (sound.chars ());
|
||||
|
||||
|
|
@ -344,7 +344,7 @@ void BotConfig::loadChatterConfig () {
|
|||
m_chatter[event.code].emplace (cr::move (sound), event.repeat, duration);
|
||||
}
|
||||
}
|
||||
sounds.clear ();
|
||||
sentences.clear ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -553,10 +553,10 @@ void BotConfig::loadDifficultyConfig () {
|
|||
};
|
||||
|
||||
// currently, mindelay, maxdelay, headprob, seenthruprob, heardthruprob
|
||||
constexpr uint32 kMaxDifficultyValues = 5;
|
||||
constexpr uint32_t kMaxDifficultyValues = 5;
|
||||
|
||||
// helper for parsing each level
|
||||
auto parseLevel = [&] (int32 level, StringRef data) {
|
||||
auto parseLevel = [&] (int32_t level, StringRef data) {
|
||||
auto values = data.split <String> (",");
|
||||
|
||||
if (values.length () != kMaxDifficultyValues) {
|
||||
|
|
@ -796,14 +796,14 @@ const char *BotConfig::translate (StringRef input) {
|
|||
}
|
||||
|
||||
void BotConfig::showCustomValues () {
|
||||
game.print ("Current values for custom config items:");
|
||||
ctrl.msg ("Current values for custom config items:");
|
||||
|
||||
m_custom.foreach ([&] (const String &key, const String &val) {
|
||||
game.print (" %s = %s", key, val);
|
||||
ctrl.msg (" %s = %s", key, val);
|
||||
});
|
||||
}
|
||||
|
||||
uint32 BotConfig::hashLangString (StringRef str) {
|
||||
uint32_t BotConfig::hashLangString (StringRef str) {
|
||||
auto test = [] (const char ch) {
|
||||
return (ch >= '0' && ch <= '9') || (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z');
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue