about summary refs log tree commit diff
path: root/src/game
diff options
context:
space:
mode:
authorChoupom <andycootlapin@hotmail.fr>2010-09-12 13:06:43 +0200
committeroy <Tom_Adams@web.de>2010-09-12 16:58:10 +0200
commit901427809fe6aeee7b3b820f5447f59955269ff9 (patch)
tree309fd607c9f0ce322e3c34c9a1fba65ae2b83f07 /src/game
parentfe9e3f47a8f3206f1d5d4952fe8c26e68ec1fa9c (diff)
downloadzcatch-901427809fe6aeee7b3b820f5447f59955269ff9.tar.gz
zcatch-901427809fe6aeee7b3b820f5447f59955269ff9.zip
fixed so "reset tunning due to pure server" appears after "x changed to y"
Diffstat (limited to 'src/game')
-rw-r--r--src/game/server/gamecontext.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp
index 61d04d4d..4300bc2e 100644
--- a/src/game/server/gamecontext.cpp
+++ b/src/game/server/gamecontext.cpp
@@ -815,15 +815,15 @@ void CGameContext::ConTuneParam(IConsole::IResult *pResult, void *pUserData)
 	const char *pParamName = pResult->GetString(0);
 	float NewValue = pResult->GetFloat(1);
 
-	char aBuf[256];
 	if(pSelf->Tuning()->Set(pParamName, NewValue))
 	{
+		char aBuf[256];
 		str_format(aBuf, sizeof(aBuf), "%s changed to %.2f", pParamName, NewValue);
+		pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "tuning", aBuf);
 		pSelf->SendTuningParams(-1);
 	}
 	else
-		str_format(aBuf, sizeof(aBuf), "No such tuning parameter");
-	pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "tuning", aBuf);
+		pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "tuning", "No such tuning parameter");
 }
 
 void CGameContext::ConTuneReset(IConsole::IResult *pResult, void *pUserData)