about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/client/components/skins.cpp10
-rw-r--r--src/game/client/gameclient.cpp2
2 files changed, 10 insertions, 2 deletions
diff --git a/src/game/client/components/skins.cpp b/src/game/client/components/skins.cpp
index 16135164..d89d0647 100644
--- a/src/game/client/components/skins.cpp
+++ b/src/game/client/components/skins.cpp
@@ -118,6 +118,16 @@ void CSkins::Init()
 	// load skins
 	m_aSkins.clear();
 	Storage()->ListDirectory(IStorage::TYPE_ALL, "skins", SkinScan, this);
+	if(!m_aSkins.size())
+	{
+		Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "gameclient", "failed to load skins. folder='skins/'");
+		CSkin DummySkin;
+		DummySkin.m_OrgTexture = -1;
+		DummySkin.m_ColorTexture = -1;
+		str_copy(DummySkin.m_aName, "dummy", sizeof(DummySkin.m_aName));
+		DummySkin.m_BloodColor = vec3(1.0f, 1.0f, 1.0f);
+		m_aSkins.add(DummySkin);
+	}
 }
 
 int CSkins::Num()
diff --git a/src/game/client/gameclient.cpp b/src/game/client/gameclient.cpp
index 84ca77b1..45bd7ae3 100644
--- a/src/game/client/gameclient.cpp
+++ b/src/game/client/gameclient.cpp
@@ -266,8 +266,6 @@ void CGameClient::OnInit()
 
 	// load skins
 	::gs_Skins.Init();
-	if(!::gs_Skins.Num())
-		Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "gameclient", "failed to load skins. folder='skins/'");
 	
 	// TODO: Refactor: fix threaded loading of sounds again
 	// load sounds