From dc1c6976e25c583aad00ae589ff8f00ab305ad48 Mon Sep 17 00:00:00 2001
From: Christoph Oelckers <coelckers@users.noreply.github.com>
Date: Wed, 12 Oct 2022 22:08:10 +0200
Subject: [PATCH] - removed OSD_StripColors.

This was handling color control sequences in EDuke32 format which are totally irrelevant for Raze.
---
 source/core/gamecvars.cpp | 37 -------------------------------------
 1 file changed, 37 deletions(-)

diff --git a/source/core/gamecvars.cpp b/source/core/gamecvars.cpp
index 4dcc037a8..f6946f366 100644
--- a/source/core/gamecvars.cpp
+++ b/source/core/gamecvars.cpp
@@ -268,47 +268,10 @@ CVARD(Bool, r_precache, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "enable/disable th
 CVARD(Bool, r_voxels, true, CVAR_ARCHIVE, "enable/disable automatic sprite->voxel rendering")
 
 
-// color code format is as follows:
-// ^## sets a color, where ## is the palette number
-// ^S# sets a shade, range is 0-7 equiv to shades 0-14
-// ^O resets formatting to defaults
-
-static const char* OSD_StripColors(char* outBuf, const char* inBuf)
-{
-	const char* ptr = outBuf;
-
-	while (*inBuf)
-	{
-		if (*inBuf == '^')
-		{
-			if (isdigit(*(inBuf + 1)))
-			{
-				inBuf += 2 + !!isdigit(*(inBuf + 2));
-				continue;
-			}
-			else if ((toupper(*(inBuf + 1)) == 'O'))
-			{
-				inBuf += 2;
-				continue;
-			}
-			else if ((toupper(*(inBuf + 1)) == 'S') && isdigit(*(inBuf + 2)))
-			{
-				inBuf += 3;
-				continue;
-			}
-		}
-		*(outBuf++) = *(inBuf++);
-	}
-
-	*outBuf = '\0';
-	return ptr;
-}
-
 CVAR(Bool, adult_lockout, false, CVAR_ARCHIVE)
 CUSTOM_CVAR(String, playername, "Player", CVAR_ARCHIVE | CVAR_USERINFO)
 {
 	TArray<char> buffer(strlen(self)+1, 1);
-	OSD_StripColors(buffer.Data(), self);
 	if (buffer.Size() < strlen(self))
 	{
 		self = buffer.Data();