Fixed displaying of flags of loaded game.

Fixed incorrect usage  of setsockopt ().
Fixed chat preparation doesn't replace all placeholders.
This commit is contained in:
Dmitry 2019-07-28 21:30:33 +03:00 committed by jeefo
commit 7a6e3febf2
3 changed files with 14 additions and 9 deletions

View file

@ -231,13 +231,13 @@ void Bot::prepareChatMessage (const String &message) {
return humanizedName (game.indexOfPlayer (client.ent));
}
}
return "UnknowPA";
return getHighfragPlayer ();
};
size_t replaceCounter = 0;
while (replaceCounter < 6 && (pos = m_chatBuffer.find ('%')) != String::kInvalidIndex) {
// found one, let's do replace
switch (message[pos + 1]) {
switch (m_chatBuffer[pos + 1]) {
// the highest frag player
case 'f':