void CHL2MP_Player::Precache( void ) { BaseClass::Precache(); PrecacheModel ( "sprites/glow01.vmt" ); //Precache Citizen models int nHeads = ARRAYSIZE( g_ppszRandomCitizenModels ); int i; for ( i = 0; i < nHeads; ++i ) PrecacheModel( g_ppszRandomCitizenModels[i] ); //Precache Combine Models nHeads = ARRAYSIZE( g_ppszRandomCombineModels ); for ( i = 0; i < nHeads; ++i ) PrecacheModel( g_ppszRandomCombineModels[i] ); PrecacheFootStepSounds(); PrecacheScriptSound( "NPC_MetroPolice.Die" ); PrecacheScriptSound( "NPC_CombineS.Die" ); PrecacheScriptSound( "NPC_Citizen.die" ); }
void CHL2MP_Player::Precache( void ) { BaseClass::Precache(); PrecacheModel ( "sprites/glow01.vmt" ); FileFindHandle_t findHandle = NULL; const char *pszFilename = g_pFullFileSystem->FindFirst("models/player/playermodels/*.mdl", &findHandle); while (pszFilename) { //"models/player/playermodels/" + pszFilename; char szModelName[2048]; Q_snprintf(szModelName, sizeof(szModelName), "models/player/playermodels/%s", pszFilename); PrecacheModel(szModelName); pszFilename = g_pFullFileSystem->FindNext(findHandle); } g_pFullFileSystem->FindClose(findHandle); PrecacheFootStepSounds(); PrecacheScriptSound( "NPC_MetroPolice.Die" ); PrecacheScriptSound( "NPC_CombineS.Die" ); PrecacheScriptSound( "NPC_Citizen.die" ); PrecacheScriptSound("Player.IronSightIn"); PrecacheScriptSound("Player.IronSightOut"); PrecacheModel("models/weapons/v_kick.mdl"); PrecacheScriptSound("HL2Player.kick_fire"); PrecacheScriptSound("HL2Player.kick_body"); PrecacheScriptSound("HL2Player.kick_wall"); PrecacheScriptSound("HL2Player.Jetpack"); }