fix: probably fix for duplicate bot names when save names active (ref #403)

This commit is contained in:
jeefo 2023-02-01 21:19:17 +03:00
commit 9d8318e584
No known key found for this signature in database
GPG key ID: D85B0637366787C3
3 changed files with 15 additions and 0 deletions

View file

@ -711,6 +711,15 @@ void BotConfig::clearUsedName (Bot *bot) {
}
}
void BotConfig::setBotNameUsed(const int index, StringRef name) {
for (auto &bn : m_botNames) {
if (bn.name == name) {
bn.usedBy = index;
break;
}
}
}
void BotConfig::initWeapons () {
m_weapons.clear ();