mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Zooming in demo player
This commit is contained in:
parent
44d479330e
commit
b1d2d4f59e
|
@ -84,7 +84,7 @@ void CCamera::ConZoomPlus(IConsole::IResult *pResult, void *pUserData)
|
|||
CCamera *pSelf = (CCamera *)pUserData;
|
||||
CServerInfo Info;
|
||||
pSelf->Client()->GetServerInfo(&Info);
|
||||
if(pSelf->m_pClient->m_Snap.m_SpecInfo.m_Active || (str_find_nocase(Info.m_aGameType, "race") || str_find_nocase(Info.m_aGameType, "fastcap")))
|
||||
if(pSelf->m_pClient->m_Snap.m_SpecInfo.m_Active || (str_find_nocase(Info.m_aGameType, "race") || str_find_nocase(Info.m_aGameType, "fastcap")) || pSelf->Client()->State() == IClient::STATE_DEMOPLAYBACK)
|
||||
((CCamera *)pUserData)->m_Zoom *= ZoomStep;
|
||||
}
|
||||
void CCamera::ConZoomMinus(IConsole::IResult *pResult, void *pUserData)
|
||||
|
@ -92,7 +92,7 @@ void CCamera::ConZoomMinus(IConsole::IResult *pResult, void *pUserData)
|
|||
CCamera *pSelf = (CCamera *)pUserData;
|
||||
CServerInfo Info;
|
||||
pSelf->Client()->GetServerInfo(&Info);
|
||||
if(pSelf->m_pClient->m_Snap.m_SpecInfo.m_Active || (str_find_nocase(Info.m_aGameType, "race") || str_find_nocase(Info.m_aGameType, "fastcap")))
|
||||
if(pSelf->m_pClient->m_Snap.m_SpecInfo.m_Active || (str_find_nocase(Info.m_aGameType, "race") || str_find_nocase(Info.m_aGameType, "fastcap")) || pSelf->Client()->State() == IClient::STATE_DEMOPLAYBACK)
|
||||
((CCamera *)pUserData)->m_Zoom *= 1/ZoomStep;
|
||||
}
|
||||
void CCamera::ConZoomReset(IConsole::IResult *pResult, void *pUserData)
|
||||
|
|
Loading…
Reference in a new issue