- eliminated several pointless string copies in network code.
This commit is contained in:
parent
46473b45da
commit
b695e845e1
2 changed files with 26 additions and 40 deletions
|
|
@ -374,14 +374,13 @@ static void ShoveChatStr (const char *str, uint8_t who)
|
|||
Net_WriteByte (DEM_SAY);
|
||||
Net_WriteByte (who);
|
||||
|
||||
if (!chat_substitution || !DoSubstitution (substBuff, str))
|
||||
if (chat_substitution && DoSubstitution (substBuff, str))
|
||||
{
|
||||
Net_WriteString(MakeUTF8(str));
|
||||
}
|
||||
else
|
||||
{
|
||||
Net_WriteString(MakeUTF8(substBuff));
|
||||
str = substBuff.GetChars();
|
||||
}
|
||||
|
||||
Net_WriteString(CleanseString(const_cast<char*>(MakeUTF8(str))));
|
||||
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue