refactor: break some very long conditions
This commit is contained in:
parent
375a64b861
commit
c662f4a08f
11 changed files with 463 additions and 91 deletions
|
|
@ -348,7 +348,11 @@ void Bot::checkForChat () {
|
|||
}
|
||||
|
||||
// bot chatting turned on?
|
||||
if (rg.chance (cv_chat_percent.int_ ()) && m_lastChatTime + rg.get (6.0f, 10.0f) < game.time () && bots.getLastChatTimestamp () + rg.get (2.5f, 5.0f) < game.time () && !isReplyingToChat ()) {
|
||||
if (rg.chance (cv_chat_percent.int_ ())
|
||||
&& m_lastChatTime + rg.get (6.0f, 10.0f) < game.time ()
|
||||
&& bots.getLastChatTimestamp () + rg.get (2.5f, 5.0f) < game.time ()
|
||||
&& !isReplyingToChat ()) {
|
||||
|
||||
if (conf.hasChatBank (Chat::Dead)) {
|
||||
StringRef phrase = conf.pickRandomFromChatBank (Chat::Dead);
|
||||
bool sayBufferExists = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue