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

Method DetermineInitialState

src/game/client/components/skins.cpp:117–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115}
116
117CSkins::CSkinContainer::EState CSkins::CSkinContainer::DetermineInitialState() const
118{
119 if(m_AlwaysLoaded)
120 {
121 // Load immediately if it should always be loaded
122 return EState::PENDING;
123 }
124 else if((g_Config.m_ClVanillaSkinsOnly && !m_Vanilla) ||
125 (m_Type == EType::DOWNLOAD && !g_Config.m_ClDownloadSkins))
126 {
127 // Fail immediately if it shouldn't be loaded
128 return EState::NOT_FOUND;
129 }
130 else
131 {
132 return EState::UNLOADED;
133 }
134}
135
136void CSkins::CSkinContainer::SetState(EState State)
137{

Callers 3

SkinScanMethod · 0.80
LoadSkinDirectMethod · 0.80
FindContainerImplMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected