about summary refs log tree commit diff
path: root/src/game/client/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/client/components')
-rw-r--r--src/game/client/components/binds.cpp18
-rw-r--r--src/game/client/components/chat.cpp6
-rw-r--r--src/game/client/components/menus_browser.cpp2
-rw-r--r--src/game/client/components/menus_settings.cpp2
-rw-r--r--src/game/client/components/skins.cpp6
5 files changed, 21 insertions, 13 deletions
diff --git a/src/game/client/components/binds.cpp b/src/game/client/components/binds.cpp
index 1fb5ecc5..4b0db425 100644
--- a/src/game/client/components/binds.cpp
+++ b/src/game/client/components/binds.cpp
@@ -30,10 +30,12 @@ void CBinds::Bind(int KeyId, const char *pStr)
 		return;
 		
 	str_copy(m_aaKeyBindings[KeyId], pStr, sizeof(m_aaKeyBindings[KeyId]));
+	char aBuf[256];
 	if(!m_aaKeyBindings[KeyId][0])
-		dbg_msg("binds", "unbound %s (%d)", Input()->KeyName(KeyId), KeyId);
+		str_format(aBuf, sizeof(aBuf), "unbound %s (%d)", Input()->KeyName(KeyId), KeyId);
 	else
-		dbg_msg("binds", "bound %s (%d) = %s", Input()->KeyName(KeyId), KeyId, m_aaKeyBindings[KeyId]);
+		str_format(aBuf, sizeof(aBuf), "bound %s (%d) = %s", Input()->KeyName(KeyId), KeyId, m_aaKeyBindings[KeyId]);
+	Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "binds", aBuf);
 }
 
 
@@ -136,7 +138,9 @@ void CBinds::ConBind(IConsole::IResult *pResult, void *pUserData)
 	
 	if(!id)
 	{
-		dbg_msg("binds", "key %s not found", pKeyName);
+		char aBuf[256];
+		str_format(aBuf, sizeof(aBuf), "key %s not found", pKeyName);
+		pBinds->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "binds", aBuf);
 		return;
 	}
 	
@@ -152,7 +156,9 @@ void CBinds::ConUnbind(IConsole::IResult *pResult, void *pUserData)
 	
 	if(!id)
 	{
-		dbg_msg("binds", "key %s not found", pKeyName);
+		char aBuf[256];
+		str_format(aBuf, sizeof(aBuf), "key %s not found", pKeyName);
+		pBinds->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "binds", aBuf);
 		return;
 	}
 	
@@ -175,8 +181,8 @@ void CBinds::ConDumpBinds(IConsole::IResult *pResult, void *pUserData)
 	{
 		if(pBinds->m_aaKeyBindings[i][0] == 0)
 			continue;
-		str_format(aBuf, sizeof(aBuf), "[binds] %s (%d) = %s", pBinds->Input()->KeyName(i), i, pBinds->m_aaKeyBindings[i]);
-		pBinds->Console()->Print(aBuf);
+		str_format(aBuf, sizeof(aBuf), "%s (%d) = %s", pBinds->Input()->KeyName(i), i, pBinds->m_aaKeyBindings[i]);
+		pBinds->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "binds", aBuf);
 	}
 }
 
diff --git a/src/game/client/components/chat.cpp b/src/game/client/components/chat.cpp
index 7b64aac7..21fa0e00 100644
--- a/src/game/client/components/chat.cpp
+++ b/src/game/client/components/chat.cpp
@@ -61,7 +61,7 @@ void CChat::ConChat(IConsole::IResult *pResult, void *pUserData)
 	else if(str_comp(pMode, "team") == 0)
 		((CChat*)pUserData)->EnableMode(1);
 	else
-		dbg_msg("console", "expected all or team as mode");
+		((CChat*)pUserData)->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "console", "expected all or team as mode");
 }
 
 void CChat::ConShowChat(IConsole::IResult *pResult, void *pUserData)
@@ -165,8 +165,8 @@ void CChat::AddLine(int ClientId, int Team, const char *pLine)
 		}
 		
 		char aBuf[1024];
-		str_format(aBuf, sizeof(aBuf), "[chat]%s%s", m_aLines[m_CurrentLine].m_aName, m_aLines[m_CurrentLine].m_aText);
-		Console()->Print(aBuf);
+		str_format(aBuf, sizeof(aBuf), "%s%s", m_aLines[m_CurrentLine].m_aName, m_aLines[m_CurrentLine].m_aText);
+		Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "chat", aBuf);
 	}
 
 	// play sound
diff --git a/src/game/client/components/menus_browser.cpp b/src/game/client/components/menus_browser.cpp
index c1ad18f2..bd643a3c 100644
--- a/src/game/client/components/menus_browser.cpp
+++ b/src/game/client/components/menus_browser.cpp
@@ -699,7 +699,7 @@ void CMenus::RenderServerbrowser(CUIRect MainView)
 		static int s_JoinButton = 0;
 		if(DoButton_Menu(&s_JoinButton, Localize("Connect"), 0, &Button) || m_EnterPressed)
 		{
-			dbg_msg("", "%s", g_Config.m_UiServerAddress);
+			//dbg_msg("", "%s", g_Config.m_UiServerAddress);
 			Client()->Connect(g_Config.m_UiServerAddress);
 			m_EnterPressed = false;
 		}
diff --git a/src/game/client/components/menus_settings.cpp b/src/game/client/components/menus_settings.cpp
index 364d0b82..3a97e3ec 100644
--- a/src/game/client/components/menus_settings.cpp
+++ b/src/game/client/components/menus_settings.cpp
@@ -706,7 +706,7 @@ void CMenus::RenderSettingsGeneral(CUIRect MainView)
 	if(OldSelected != s_SelectedLanguage)
 	{
 		str_copy(g_Config.m_ClLanguagefile, s_Languages[s_SelectedLanguage].m_FileName, sizeof(g_Config.m_ClLanguagefile));
-		g_Localization.Load(s_Languages[s_SelectedLanguage].m_FileName);
+		g_Localization.Load(s_Languages[s_SelectedLanguage].m_FileName, Console());
 	}
 }
 
diff --git a/src/game/client/components/skins.cpp b/src/game/client/components/skins.cpp
index 582adb10..73cf954d 100644
--- a/src/game/client/components/skins.cpp
+++ b/src/game/client/components/skins.cpp
@@ -29,7 +29,8 @@ void CSkins::SkinScan(const char *pName, int IsDir, void *pUser)
 	CImageInfo Info;
 	if(!pSelf->Graphics()->LoadPNG(&Info, aBuf))
 	{
-		dbg_msg("game", "failed to load skin from %s", pName);
+		str_format(aBuf, sizeof(aBuf), "failed to load skin from %s", pName);
+		pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_ADDINFO, "game", aBuf);
 		return;
 	}
 	
@@ -111,7 +112,8 @@ void CSkins::SkinScan(const char *pName, int IsDir, void *pUser)
 
 	// set skin data	
 	str_copy(pSelf->m_aSkins[pSelf->m_NumSkins].m_aName, pName, min((int)sizeof(pSelf->m_aSkins[pSelf->m_NumSkins].m_aName),l-3));
-	dbg_msg("game", "load skin %s", pSelf->m_aSkins[pSelf->m_NumSkins].m_aName);
+	str_format(aBuf, sizeof(aBuf), "load skin %s", pSelf->m_aSkins[pSelf->m_NumSkins].m_aName);
+	pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_ADDINFO, "game", aBuf);
 	pSelf->m_NumSkins++;
 }