MCPcopy Create free account
hub / github.com/ddnet/ddnet / Predict

Method Predict

src/game/client/gameclient.cpp:948–965  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

946}
947
948bool CGameClient::Predict() const
949{
950 if(!g_Config.m_ClPredict)
951 return false;
952
953 if(m_Snap.m_pGameInfoObj)
954 {
955 if(m_Snap.m_pGameInfoObj->m_GameStateFlags & (GAMESTATEFLAG_GAMEOVER | GAMESTATEFLAG_PAUSED))
956 {
957 return false;
958 }
959 }
960
961 if(Client()->State() == IClient::STATE_DEMOPLAYBACK)
962 return false;
963
964 return !m_Snap.m_SpecInfo.m_Active && m_Snap.m_pLocalCharacter;
965}
966
967ColorRGBA CGameClient::GetDDTeamColor(int DDTeam, float Lightness) const
968{

Callers 2

RenderProjectileMethod · 0.80
OnRenderMethod · 0.80

Calls 2

ClientFunction · 0.50
StateMethod · 0.45

Tested by

no test coverage detected