chatlib: do not send chat messages to controlled bots
graph: first try more memory friendly bsp size check build: restore ssse3 & ssse3 instructions (use nosmid version if needed) Co-Authored-By: Max <161382234+dyspose@users.noreply.github.com>
This commit is contained in:
parent
54647c7eca
commit
855fb903b6
13 changed files with 76 additions and 41 deletions
|
|
@ -410,6 +410,11 @@ void Bot::sendToChatLegacy (StringRef message, bool teamOnly) {
|
|||
bool dedicatedSend = false;
|
||||
|
||||
auto sendChatMsg = [&] (const Client &client, String chatMsg) {
|
||||
if (game.isDedicated () && !dedicatedSend) {
|
||||
dedicatedSend = true;
|
||||
|
||||
game.print ("%s", chatMsg.trim ());
|
||||
}
|
||||
auto rcv = bots[client.ent];
|
||||
|
||||
if (rcv != nullptr) {
|
||||
|
|
@ -418,6 +423,9 @@ void Bot::sendToChatLegacy (StringRef message, bool teamOnly) {
|
|||
rcv->m_sayTextBuffer.sayText = message;
|
||||
rcv->m_sayTextBuffer.timeNextChat = game.time () + rcv->m_sayTextBuffer.chatDelay;
|
||||
}
|
||||
else {
|
||||
return; // do not send to controlled bots
|
||||
}
|
||||
|
||||
if (((client.flags & ClientFlags::Alive) && m_isAlive)
|
||||
|| (!(client.flags & ClientFlags::Alive) && m_isAlive)
|
||||
|
|
@ -427,11 +435,6 @@ void Bot::sendToChatLegacy (StringRef message, bool teamOnly) {
|
|||
.writeByte (m_index)
|
||||
.writeString (chatMsg.chars ());
|
||||
}
|
||||
|
||||
if (game.isDedicated () && !dedicatedSend) {
|
||||
game.print ("%s", chatMsg.trim ());
|
||||
}
|
||||
dedicatedSend = true;
|
||||
};
|
||||
|
||||
if (teamOnly) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue