Bots are now able to destroy random breakables around him, without touching them.

Added cvars descriptions and yapb.cfg generation.
Finally fixed bomb-defuse problems.
Fixed unaligned access in bot compression/decompression.
Fixed low-fps aim code falure.
This commit is contained in:
jeefo 2019-08-24 12:43:42 +03:00
commit 91c4d9ce1f
21 changed files with 523 additions and 293 deletions

View file

@ -9,7 +9,7 @@
#include <yapb.h>
ConVar yb_chat ("yb_chat", "1");
ConVar yb_chat ("yb_chat", "1", "Enables or disables bots chat functionality.");
void BotUtils::stripTags (String &line) {
if (line.empty ()) {
@ -23,9 +23,9 @@ void BotUtils::stripTags (String &line) {
const size_t end = line.find (tag.second, start);
const size_t diff = end - start;
if (end != String::InvalidIndex && end > start && diff < 32 && diff > 2) {
if (end != String::InvalidIndex && end > start && diff < 32 && diff > 1) {
line.erase (start, diff + tag.second.length ());
break;
continue;
}
}
}