Refactoring (#246)
add: yb_chat_percent, yb_camping_time_[min/max], yb_danger_factor[min/max], yb_chat_percent cvars fix: possible crash with difficulty 0 fix: debug_goal should not be used as last history fix: startup on old hlds, because of missing pfnGetFileSize fix: crash with out-bounds read change: again tweaked some aiming code change: player avoidance code so bots will jump less when stuck change: max followers is just /4 of max players refactor: redone distance between vectors refactor: remove magic numbers in graph.add function
This commit is contained in:
parent
6e83258c7d
commit
6f912eb056
10 changed files with 214 additions and 177 deletions
|
|
@ -8,6 +8,7 @@
|
|||
#include <yapb.h>
|
||||
|
||||
ConVar cv_chat ("yb_chat", "1", "Enables or disables bots chat functionality.");
|
||||
ConVar cv_chat_percent ("yb_chat_percent", "30", "Chances bot will send random dead chat when killed.", true, 0.0f, 100.0f);
|
||||
|
||||
void BotSupport::stripTags (String &line) {
|
||||
if (line.empty ()) {
|
||||
|
|
@ -316,7 +317,7 @@ bool Bot::isReplyingToChat () {
|
|||
void Bot::checkForChat () {
|
||||
|
||||
// say a text every now and then
|
||||
if (rg.chance (30) || m_notKilled || !cv_chat.bool_ ()) {
|
||||
if (rg.chance (cv_chat_percent.int_ ()) || m_notKilled || !cv_chat.bool_ ()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue