void Spawner::CacheFiles() { ILTServer* pServerDE = GetServerDE(); if (!pServerDE) return; char* pFile = LTNULL; if (m_hstrSpawnSound) { pFile = pServerDE->GetStringData(m_hstrSpawnSound); if (pFile) { pServerDE->CacheFile(FT_SOUND, pFile); } } }
void SecurityCamera::CacheFiles() { ILTServer* pServerDE = GetServerDE(); if (!pServerDE) return; // Cache sounds... pServerDE->CacheFile(FT_SOUND, DETECT_SOUND); pServerDE->CacheFile(FT_SOUND, LOOP_SOUND); pServerDE->CacheFile(FT_SOUND, FOCUSING_SOUND); // Cache the light sprites... char buf[128]; buf[0] = '\0'; g_pServerButeMgr->GetSecurityCameraString("GreenLight", buf, ARRAY_LEN(buf)); if (buf[0]) { pServerDE->CacheFile(FT_SPRITE, buf); } buf[0] = '\0'; g_pServerButeMgr->GetSecurityCameraString("YellowLight", buf, ARRAY_LEN(buf)); if (buf[0]) { pServerDE->CacheFile(FT_SPRITE, buf); } buf[0] = '\0'; g_pServerButeMgr->GetSecurityCameraString("RedLight", buf, ARRAY_LEN(buf)); if (buf[0]) { pServerDE->CacheFile(FT_SPRITE, buf); } }