mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-14 03:58:18 +00:00
added bw to isddnet
This commit is contained in:
parent
b8730b3653
commit
cd5d69bfc5
|
@ -66,7 +66,6 @@ bool IsRace(const CServerInfo *pInfo);
|
||||||
bool IsFastCap(const CServerInfo *pInfo);
|
bool IsFastCap(const CServerInfo *pInfo);
|
||||||
bool IsDDRace(const CServerInfo *pInfo);
|
bool IsDDRace(const CServerInfo *pInfo);
|
||||||
bool IsDDNet(const CServerInfo *pInfo);
|
bool IsDDNet(const CServerInfo *pInfo);
|
||||||
bool IsBlockWorlds(const CServerInfo *pInfo);
|
|
||||||
|
|
||||||
bool Is64Player(const CServerInfo *pInfo);
|
bool Is64Player(const CServerInfo *pInfo);
|
||||||
bool IsPlus(const CServerInfo *pInfo);
|
bool IsPlus(const CServerInfo *pInfo);
|
||||||
|
|
|
@ -47,13 +47,9 @@ bool IsDDRace(const CServerInfo *pInfo)
|
||||||
bool IsDDNet(const CServerInfo *pInfo)
|
bool IsDDNet(const CServerInfo *pInfo)
|
||||||
{
|
{
|
||||||
return str_find_nocase(pInfo->m_aGameType, "ddracenet")
|
return str_find_nocase(pInfo->m_aGameType, "ddracenet")
|
||||||
|| str_find_nocase(pInfo->m_aGameType, "ddnet");
|
|| str_find_nocase(pInfo->m_aGameType, "ddnet")
|
||||||
}
|
|| ((str_comp_nocase_num(pInfo->m_aGameType, "bw", 2) == 0 && str_length(pInfo->m_aGameType) > 3 && pInfo->m_aGameType[2] == ' ' && pInfo->m_aGameType[3] == ' ')
|
||||||
|
|| str_comp_nocase(pInfo->m_aGameType, "bw") == 0);
|
||||||
bool IsBlockWorlds(const CServerInfo *pInfo)
|
|
||||||
{
|
|
||||||
return (str_comp_nocase_num(pInfo->m_aGameType, "bw", 2) == 0 && str_length(pInfo->m_aGameType) > 3 && pInfo->m_aGameType[2] == ' ' && pInfo->m_aGameType[3] == ' ')
|
|
||||||
|| str_comp_nocase(pInfo->m_aGameType, "bw") == 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// other
|
// other
|
||||||
|
|
|
@ -27,7 +27,7 @@ void CCamera::OnRender()
|
||||||
CServerInfo Info;
|
CServerInfo Info;
|
||||||
Client()->GetServerInfo(&Info);
|
Client()->GetServerInfo(&Info);
|
||||||
|
|
||||||
if(!(m_pClient->m_Snap.m_SpecInfo.m_Active || IsRace(&Info) || IsBlockWorlds(&Info) || Client()->State() == IClient::STATE_DEMOPLAYBACK))
|
if(!(m_pClient->m_Snap.m_SpecInfo.m_Active || IsRace(&Info) || Client()->State() == IClient::STATE_DEMOPLAYBACK))
|
||||||
{
|
{
|
||||||
m_ZoomSet = false;
|
m_ZoomSet = false;
|
||||||
m_Zoom = 1.0;
|
m_Zoom = 1.0;
|
||||||
|
@ -108,7 +108,7 @@ void CCamera::ConZoomPlus(IConsole::IResult *pResult, void *pUserData)
|
||||||
CCamera *pSelf = (CCamera *)pUserData;
|
CCamera *pSelf = (CCamera *)pUserData;
|
||||||
CServerInfo Info;
|
CServerInfo Info;
|
||||||
pSelf->Client()->GetServerInfo(&Info);
|
pSelf->Client()->GetServerInfo(&Info);
|
||||||
if(pSelf->m_pClient->m_Snap.m_SpecInfo.m_Active || IsRace(&Info) || IsBlockWorlds(&Info) || pSelf->Client()->State() == IClient::STATE_DEMOPLAYBACK)
|
if(pSelf->m_pClient->m_Snap.m_SpecInfo.m_Active || IsRace(&Info) || pSelf->Client()->State() == IClient::STATE_DEMOPLAYBACK)
|
||||||
((CCamera *)pUserData)->m_Zoom *= ZoomStep;
|
((CCamera *)pUserData)->m_Zoom *= ZoomStep;
|
||||||
}
|
}
|
||||||
void CCamera::ConZoomMinus(IConsole::IResult *pResult, void *pUserData)
|
void CCamera::ConZoomMinus(IConsole::IResult *pResult, void *pUserData)
|
||||||
|
@ -116,7 +116,7 @@ void CCamera::ConZoomMinus(IConsole::IResult *pResult, void *pUserData)
|
||||||
CCamera *pSelf = (CCamera *)pUserData;
|
CCamera *pSelf = (CCamera *)pUserData;
|
||||||
CServerInfo Info;
|
CServerInfo Info;
|
||||||
pSelf->Client()->GetServerInfo(&Info);
|
pSelf->Client()->GetServerInfo(&Info);
|
||||||
if(pSelf->m_pClient->m_Snap.m_SpecInfo.m_Active || IsRace(&Info) || IsBlockWorlds(&Info) || pSelf->Client()->State() == IClient::STATE_DEMOPLAYBACK)
|
if(pSelf->m_pClient->m_Snap.m_SpecInfo.m_Active || IsRace(&Info) || pSelf->Client()->State() == IClient::STATE_DEMOPLAYBACK)
|
||||||
{
|
{
|
||||||
if(((CCamera *)pUserData)->m_Zoom < 500.0f/ZoomStep)
|
if(((CCamera *)pUserData)->m_Zoom < 500.0f/ZoomStep)
|
||||||
{
|
{
|
||||||
|
|
|
@ -141,7 +141,7 @@ void CEmoticon::OnRender()
|
||||||
|
|
||||||
CServerInfo pServerInfo;
|
CServerInfo pServerInfo;
|
||||||
Client()->GetServerInfo(&pServerInfo);
|
Client()->GetServerInfo(&pServerInfo);
|
||||||
if((IsDDRace(&pServerInfo) || IsDDNet(&pServerInfo) || IsBlockWorlds(&pServerInfo) || IsPlus(&pServerInfo)) && g_Config.m_ClEyeWheel)
|
if((IsDDRace(&pServerInfo) || IsDDNet(&pServerInfo) || IsPlus(&pServerInfo)) && g_Config.m_ClEyeWheel)
|
||||||
{
|
{
|
||||||
Graphics()->TextureSet(-1);
|
Graphics()->TextureSet(-1);
|
||||||
Graphics()->QuadsBegin();
|
Graphics()->QuadsBegin();
|
||||||
|
|
Loading…
Reference in a new issue