[Logger] Only filter out coloured strings were needed (#450)

This commit is contained in:
Edo 2022-08-22 18:28:57 +02:00 committed by GitHub
parent 28653a0e8d
commit 0a6d0e1b5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,7 +28,7 @@ namespace Components
{
std::string out = msg;
// Filter out coloured strings
// Filter out coloured strings for stdout
if (out[0] == '^' && out[1] != '\0')
{
out = out.substr(2);
@ -48,11 +48,11 @@ namespace Components
if (!Game::Sys_IsMainThread())
{
Logger::EnqueueMessage(out);
Logger::EnqueueMessage(msg);
}
else
{
Game::Com_PrintMessage(channel, out.data(), 0);
Game::Com_PrintMessage(channel, msg.data(), 0);
}
}