build: reworked build and package to simplify process

build: reworked build and package to simplify process
build: windows dll is now compiled by clang, msvc build added to extras package
fix: clear all the implicit conversions in the code (also fixed some bugs)
fix: crash on  never xash3d-fwgs engine
fix: fixed bad bot behaviors on aarch64
fix: crash on some maps due to missing previous node
fix: finally removed memset(this) within bot creatin
This commit is contained in:
jeefo 2023-04-02 12:17:12 +03:00 committed by GitHub
commit 53df621dfc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
35 changed files with 1004 additions and 949 deletions

View file

@ -61,12 +61,12 @@ void BotSupport::addChatErrors (String &line) {
// "length / 2" percent of time drop a character
if (rg.chance (percentile)) {
line.erase (rg.get (length / 8, length - length / 8), 1);
line.erase (static_cast <size_t> (rg.get (length / 8, length - length / 8), 1));
}
// "length" / 4 precent of time swap character
if (rg.chance (percentile / 2)) {
size_t pos = rg.get (length / 8, 3 * length / 8); // choose random position in string
size_t pos = static_cast <size_t> (rg.get (length / 8, 3 * length / 8)); // choose random position in string
cr::swap (line[pos], line[pos + 1]);
}
}
@ -190,7 +190,7 @@ void Bot::prepareChatMessage (StringRef message) {
// get bot's victim
auto getMyVictim = [&] () -> String {;
return humanizedName (game.indexOfPlayer (m_lastVictim));
return humanizedName (game.indexOfPlayer (m_lastVictim));
};
// get the game name alias