Fix for zoom issue.

This commit is contained in:
Learath2 2011-12-20 22:45:07 +02:00 committed by GreYFoX
parent 1871207bfe
commit 81b34086e2
2 changed files with 7 additions and 2 deletions

View file

@ -73,6 +73,11 @@ void CCamera::OnConsoleInit()
Console()->Register("zoom", "", CFGFLAG_CLIENT, ConZoomReset, this, "Zoom reset");
}
void CCamera::OnReset()
{
m_Zoom = 1.0f;
}
const float ZoomStep = 0.75f;
void CCamera::ConZoomPlus(IConsole::IResult *pResult, void *pUserData)
{
@ -95,6 +100,5 @@ void CCamera::ConZoomReset(IConsole::IResult *pResult, void *pUserData)
CCamera *pSelf = (CCamera *)pUserData;
CServerInfo Info;
pSelf->Client()->GetServerInfo(&Info);
if(g_Config.m_ClDDRaceCheats == 1 && str_find_nocase(Info.m_aGameType, "race"))
((CCamera *)pUserData)->m_Zoom = 1.0f;
((CCamera *)pUserData)->m_Zoom = 1.0f;
}

View file

@ -27,6 +27,7 @@ public:
// DDRace
virtual void OnConsoleInit();
virtual void OnReset();
private:
static void ConZoomPlus(IConsole::IResult *pResult, void *pUserData);
static void ConZoomMinus(IConsole::IResult *pResult, void *pUserData);