mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix for zoom issue.
This commit is contained in:
parent
1871207bfe
commit
81b34086e2
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue