//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CWeaponStriderBuster::Precache( void )
{
	PrecacheScriptSound( "Weapon_StriderBuster.StickToEntity" );
	PrecacheScriptSound( "Weapon_StriderBuster.Detonate" );
	PrecacheScriptSound( "Weapon_StriderBuster.Dud_Detonate" );
	PrecacheScriptSound( "Weapon_StriderBuster.Ping" );

	PrecacheModel("sprites/orangeflare1.vmt");

	UTIL_PrecacheOther( "env_citadel_energy_core" );
	UTIL_PrecacheOther( "sparktrail" );

	m_nRingTexture = PrecacheModel( "sprites/lgtning.vmt" );

	PrecacheParticleSystem( "striderbuster_attach" );
	PrecacheParticleSystem( "striderbuster_attached_pulse" );
	PrecacheParticleSystem( "striderbuster_explode_core" );
	PrecacheParticleSystem( "striderbuster_explode_dummy_core" );
	PrecacheParticleSystem( "striderbuster_break_flechette" );
	PrecacheParticleSystem( "striderbuster_trail" );
	PrecacheParticleSystem( "striderbuster_shotdown_trail" );
	PrecacheParticleSystem( "striderbuster_break" );
	PrecacheParticleSystem( "striderbuster_flechette_attached" );

	SetModelName( AllocPooledString("models/magnusson_device.mdl") );
	BaseClass::Precache();
}
Exemplo n.º 2
0
//-----------------------------------------------------------------------------
// Purpose:
// Input  :
// Output :
//-----------------------------------------------------------------------------
void CNPC_CombineS::Precache()
{
	const char *pModelName = STRING( GetModelName() );

	if( !Q_stricmp( pModelName, "models/combine_super_soldier.mdl" ) )
	{
		m_fIsElite = true;
	}
	else
	{
		m_fIsElite = false;
	}

	if( !GetModelName() )
	{
		SetModelName( MAKE_STRING( "models/combine_soldier.mdl" ) );
	}

	PrecacheModel( STRING( GetModelName() ) );

	UTIL_PrecacheOther( "item_healthvial" );
	UTIL_PrecacheOther( "weapon_frag" );
	UTIL_PrecacheOther( "item_ammo_ar2_altfire" );

	BaseClass::Precache();
}
//=========================================================
// Guardar los objetos necesarios en caché.
//=========================================================
void CDirectorHealthSpawn::Precache()
{
	UTIL_PrecacheOther("item_healthkit");
	UTIL_PrecacheOther("item_healthvial");

	BaseClass::Precache();
}
//=========================================================
// Guardar los objetos necesarios en caché.
//=========================================================
void CDirectorSpawn::Precache()
{
	BaseClass::Precache();

	// NPC's
	int pNpcs = ARRAYSIZE(iNpcs) - 1;
	for ( int i = 0; i < pNpcs; ++i )
	{
		if ( iNpcs[i] == NULL_STRING )
			continue;

		// Buscamos si hay una plantilla con este nombre.
		string_t NpcData = Templates_FindByTargetName(STRING(iNpcs[i]));
			
		// No, se trata de una clase.
		if ( NpcData == NULL_STRING )
			UTIL_PrecacheOther(STRING(iNpcs[i]));
		else
		{
			// Guardamos en caché la plantilla.
			CBaseEntity *pEntity = NULL;
			MapEntity_ParseEntity(pEntity, STRING(NpcData), NULL);

			if ( pEntity != NULL )
			{
				pEntity->Precache();
				UTIL_RemoveImmediate(pEntity);
			}
		}
	}

	// JEFES
	int pBoss = ARRAYSIZE(iBoss) - 1;
	for ( int i = 0; i < pBoss; ++i )
	{
		if ( iBoss[i] == NULL_STRING )
			continue;

		// Buscamos si hay una plantilla con este nombre.
		string_t NpcData = Templates_FindByTargetName(STRING(iBoss[i]));
			
		// No, se trata de una clase.
		if ( NpcData == NULL_STRING )
			UTIL_PrecacheOther(STRING(iBoss[i]));
		else
		{
			// Guardamos en caché la plantilla.
			CBaseEntity *pEntity = NULL;
			MapEntity_ParseEntity(pEntity, STRING(NpcData), NULL);

			if ( pEntity != NULL )
			{
				pEntity->Precache();
				UTIL_RemoveImmediate(pEntity);
			}
		}
	}
}
Exemplo n.º 5
0
void CRope::Precache()
{
	BaseClass::Precache();

	UTIL_PrecacheOther( "rope_segment" );
	UTIL_PrecacheOther( "rope_sample" );

	PRECACHE_SOUND_ARRAY( g_pszCreakSounds );
}
Exemplo n.º 6
0
void CWeaponAR2::Precache( void )
{
	BaseClass::Precache();

#ifndef CLIENT_DLL

	UTIL_PrecacheOther( "prop_combine_ball" );
	UTIL_PrecacheOther( "env_entity_dissolver" );
#endif
	
}
Exemplo n.º 7
0
void CWeapon_Manhack::Precache( void )
{
	BaseClass::Precache();

	UTIL_PrecacheOther( "npc_manhack" );
	UTIL_PrecacheOther( "vehicle_manhack" );

	//if panel:
	PrecacheMaterial( SCREEN_OVERLAY_MATERIAL );
	PrecacheMaterial( "vgui/screens/manhack_back" );
}
Exemplo n.º 8
0
void CWeapon_SLAM::Precache( void )
{
	BaseClass::Precache();

#ifndef CLIENT_DLL
	UTIL_PrecacheOther( "npc_tripmine" );
	UTIL_PrecacheOther( "npc_satchel" );
#endif

	PrecacheScriptSound( "Weapon_SLAM.TripMineMode" );
	PrecacheScriptSound( "Weapon_SLAM.SatchelDetonate" );
	PrecacheScriptSound( "Weapon_SLAM.SatchelThrow" );
}
//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CItem_DynamicResupply::Precache( void )
{
	// Precache all the items potentially spawned
	int i;
	for ( i = 0; i < NUM_HEALTH_ITEMS; i++ )
	{
		UTIL_PrecacheOther( g_DynamicResupplyHealthItems[i].sEntityName );
	}

	for ( i = 0; i < NUM_AMMO_ITEMS; i++ )
	{
		UTIL_PrecacheOther( g_DynamicResupplyAmmoItems[i].sEntityName );
	}
}
Exemplo n.º 10
0
//=========================================================
// Precache - precaches all resources this monster needs
//=========================================================
void CController :: Precache()
{
	PRECACHE_MODEL("models/controller.mdl");

	PRECACHE_SOUND_ARRAY( pAttackSounds );
	PRECACHE_SOUND_ARRAY( pIdleSounds );
	PRECACHE_SOUND_ARRAY( pAlertSounds );
	PRECACHE_SOUND_ARRAY( pPainSounds );
	PRECACHE_SOUND_ARRAY( pDeathSounds );

	PRECACHE_MODEL( "sprites/xspark4.spr");

	UTIL_PrecacheOther( "controller_energy_ball" );
	UTIL_PrecacheOther( "controller_head_ball" );
}	
Exemplo n.º 11
0
void CWeapon_SLAM::Precache( void )
{
	BaseClass::Precache();

	UTIL_PrecacheOther( "npc_tripmine" );
	UTIL_PrecacheOther( "npc_satchel" );

	PrecacheScriptSound( "Weapon_SLAM.ThrowMode" );
	PrecacheScriptSound( "Weapon_SLAM.TripMineMode" );
	PrecacheScriptSound( "Weapon_SLAM.SatchelDetonate" );
	PrecacheScriptSound( "Weapon_SLAM.TripMineAttach" );
	PrecacheScriptSound( "Weapon_SLAM.SatchelThrow" );
	PrecacheScriptSound( "Weapon_SLAM.SatchelAttach" );

}
Exemplo n.º 12
0
void CRpg::Precache( void )
{
	PRECACHE_MODEL("models/w_rpg.mdl");
	PRECACHE_MODEL("models/v_rpg.mdl");
	PRECACHE_MODEL("models/p_rpg.mdl");

	PRECACHE_SOUND("items/9mmclip1.wav");

	UTIL_PrecacheOther( "laser_spot" );
	UTIL_PrecacheOther( "rpg_rocket" );

	PRECACHE_SOUND("weapons/rocketfire1.wav");
	PRECACHE_SOUND("weapons/glauncher.wav"); // alternative fire sound

	m_usRpg = PRECACHE_EVENT ( 1, "events/rpg.sc" );
}
Exemplo n.º 13
0
void CApache::Precache( void )
{
	PRECACHE_MODEL("models/apache.mdl");

	PRECACHE_SOUND("apache/ap_rotor1.wav");
	PRECACHE_SOUND("apache/ap_rotor2.wav");
	PRECACHE_SOUND("apache/ap_rotor3.wav");
	PRECACHE_SOUND("apache/ap_whine1.wav");

	PRECACHE_SOUND("weapons/mortarhit.wav");

	m_iSpriteTexture = PRECACHE_MODEL( "sprites/white.spr" );

	PRECACHE_SOUND("turret/tu_fire1.wav");

	PRECACHE_MODEL("sprites/lgtning.spr");

	m_iExplode	= PRECACHE_MODEL( "sprites/fexplo.spr" );
	m_iBodyGibs = PRECACHE_MODEL( "models/metalplategibs_green.mdl" );

	UTIL_PrecacheOther( "hvr_rocket" );

	//modif de Julien
	PRECACHE_MODEL("models/hg_gibs.mdl");
	PRECACHE_MODEL("sprites/spot01.spr");
	PRECACHE_MODEL("sprites/lensflare01.spr");
	PRECACHE_MODEL("sprites/lensflare02.spr");
	PRECACHE_MODEL("sprites/lensflare03.spr");
	PRECACHE_MODEL("sprites/lensflare04.spr");
	PRECACHE_MODEL("sprites/lensflare05.spr");

}
Exemplo n.º 14
0
//=========================================================
// Precache - precaches all resources this monster needs
//=========================================================
void CAGrunt :: Precache()
{
	int i;

	PRECACHE_MODEL("models/agrunt.mdl");

	for ( i = 0; i < ARRAYSIZE( pAttackHitSounds ); i++ )
		PRECACHE_SOUND((char *)pAttackHitSounds[i]);

	for ( i = 0; i < ARRAYSIZE( pAttackMissSounds ); i++ )
		PRECACHE_SOUND((char *)pAttackMissSounds[i]);

	for ( i = 0; i < ARRAYSIZE( pIdleSounds ); i++ )
		PRECACHE_SOUND((char *)pIdleSounds[i]);

	for ( i = 0; i < ARRAYSIZE( pDieSounds ); i++ )
		PRECACHE_SOUND((char *)pDieSounds[i]);

	for ( i = 0; i < ARRAYSIZE( pPainSounds ); i++ )
		PRECACHE_SOUND((char *)pPainSounds[i]);

	for ( i = 0; i < ARRAYSIZE( pAttackSounds ); i++ )
		PRECACHE_SOUND((char *)pAttackSounds[i]);

	for ( i = 0; i < ARRAYSIZE( pAlertSounds ); i++ )
		PRECACHE_SOUND((char *)pAlertSounds[i]);


	PRECACHE_SOUND( "hassault/hw_shoot1.wav" );

	iAgruntMuzzleFlash = PRECACHE_MODEL( "sprites/muz4.spr" );

	UTIL_PrecacheOther( "hornet" );
}	
//-----------------------------------------------------------------------------
// Purpose: Precache the target NPC
//-----------------------------------------------------------------------------
void CNPCMakerXenInvasion::Precache(void)
{
	BaseClass::Precache();

	int i;

	int nNPCsPrecache = ARRAYSIZE(g_charNPCSXenInvasionSupport);

	for (i = 0; i < nNPCsPrecache; ++i)
	{
		UTIL_PrecacheOther(g_charNPCSXenInvasionSupport[nNPCsPrecache]);
	}

	/*
	const char *pszNPCName = STRING(m_iszNPCClassname);
	if (!pszNPCName || !pszNPCName[0])
	{
		Warning("npc_maker_firefight %s has no specified NPC-to-spawn classname.\n", STRING(GetEntityName()));
	}
	else
	{
		UTIL_PrecacheOther(pszNPCName);
	}
	*/
}
void CApache::Precache( void )
{
	if (pev->model)
		PRECACHE_MODEL((char*)STRING(pev->model)); //LRC
	else
		PRECACHE_MODEL("models/apache.mdl");

	PRECACHE_SOUND("apache/ap_rotor1.wav");
	PRECACHE_SOUND("apache/ap_rotor2.wav");
	PRECACHE_SOUND("apache/ap_rotor3.wav");
	PRECACHE_SOUND("apache/ap_whine1.wav");

	PRECACHE_SOUND("weapons/mortarhit.wav");

	m_iSpriteTexture = PRECACHE_MODEL( "sprites/white.spr" );

	PRECACHE_SOUND("turret/tu_fire1.wav");

	PRECACHE_MODEL("sprites/lgtning.spr");

	m_iExplode	= PRECACHE_MODEL( "sprites/fexplo.spr" );
	m_iBodyGibs = PRECACHE_MODEL( "models/metalplategibs_green.mdl" );

	UTIL_PrecacheOther( "hvr_rocket" );
}
Exemplo n.º 17
0
void CASW_Weapon_Mines::Precache()
{
	BaseClass::Precache();	
#ifndef CLIENT_DLL
	UTIL_PrecacheOther( "asw_mine" );
#endif
}
Exemplo n.º 18
0
void CTank::Precache( void )
{
	UTIL_PrecacheOther( "info_tank_camera" );

	PRECACHE_MODEL("models/tank.mdl");

	PRECACHE_MODEL( (char *)SPRITE_SMOKE );
	PRECACHE_MODEL( (char *)SPRITE_MUZ );
	PRECACHE_MODEL( (char *)SPRITE_SMOKEBALL );
	PRECACHE_MODEL( (char *)SPRITE_FEU );

	PRECACHE_MODEL( "models/mechgibs.mdl" );

	PRECACHE_SOUND(MITRAILLEUSE_SOUND);
	PRECACHE_SOUND(TIR_SOUND);
	PRECACHE_SOUND(TANK_SOUND);
	PRECACHE_SOUND(CHOC_SOUND);
	PRECACHE_SOUND(CHENILLES_SOUND);
	PRECACHE_SOUND(ACCELERE_SOUND1);
	PRECACHE_SOUND(ACCELERE_SOUND2);
	PRECACHE_SOUND(ACCELERE_SOUND3);
	PRECACHE_SOUND(DECCELERE_SOUND);
	PRECACHE_SOUND(TANK_EXPLO_SOUND1);
	PRECACHE_SOUND(TANK_EXPLO_SOUND2);


	m_usAdjustPitch = PRECACHE_EVENT( 1, "events/train.sc" );

}
//-----------------------------------------------------------------------------
// Purpose:
// Input  :
// Output :
//-----------------------------------------------------------------------------
void CNPC_CombineShot::Precache()
{
	PrecacheModel( "models/combine_soldier_shotgunner.mdl" );
	PrecacheModel("models/gibs/combine_shotgunner_beheaded.mdl");
	PrecacheModel("models/gibs/pgib_p3.mdl");
	PrecacheModel("models/gibs/pgib_p4.mdl");

	PrecacheParticleSystem("headshotspray");

	UTIL_PrecacheOther( "item_healthvial" );
	UTIL_PrecacheOther( "weapon_frag" );

	PrecacheScriptSound("Gore.Headshot");

	BaseClass::Precache();
}
Exemplo n.º 20
0
void CASW_Weapon_Tesla_Trap::Precache()
{
	BaseClass::Precache();	
#ifndef CLIENT_DLL
	UTIL_PrecacheOther( "asw_tesla_trap" );
#endif
}
Exemplo n.º 21
0
void CASW_Weapon_T75::Precache()
{
	BaseClass::Precache();	
#ifndef CLIENT_DLL
	UTIL_PrecacheOther( "asw_t75" );
#endif
}
//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CWeaponCombatGrenadeEMP::Precache( void )
{
	BaseClass::Precache();
#if !defined( CLIENT_DLL )
	UTIL_PrecacheOther( "grenade_emp" );
#endif
}
//=========================================================
// Precache - precaches all resources this monster needs
//=========================================================
void CNPC_Controller::Precache()
{
	PrecacheModel("models/controller.mdl");

	PrecacheModel( "sprites/xspark4.vmt");

	UTIL_PrecacheOther( "controller_energy_ball" );	
	UTIL_PrecacheOther( "controller_head_ball" );

	PrecacheScriptSound( "Controller.Pain" );
	PrecacheScriptSound( "Controller.Alert" );
	PrecacheScriptSound( "Controller.Die" );
	PrecacheScriptSound( "Controller.Idle" );
	PrecacheScriptSound( "Controller.Attack" );

}	
Exemplo n.º 24
0
void CASW_Weapon_Buff_Grenade::Precache()
{
	BaseClass::Precache();	
#ifndef CLIENT_DLL
	UTIL_PrecacheOther( "asw_buffgrenade_projectile" );
#endif
}
Exemplo n.º 25
0
//=========================================================
// Precache - precaches all resources this monster needs
//=========================================================
void CISlave::Precache()
{
	int i;

	PRECACHE_MODEL("models/islave.mdl");
	PRECACHE_MODEL("sprites/lgtning.spr");
	PRECACHE_SOUND("debris/zap1.wav");
	PRECACHE_SOUND("debris/zap4.wav");
	PRECACHE_SOUND("weapons/electro4.wav");
	PRECACHE_SOUND("hassault/hw_shoot1.wav");
	PRECACHE_SOUND("zombie/zo_pain2.wav");
	PRECACHE_SOUND("headcrab/hc_headbite.wav");
	PRECACHE_SOUND("weapons/cbar_miss1.wav");

	for(i = 0; i < ARRAYSIZE(pAttackHitSounds); i++)
		PRECACHE_SOUND((char *)pAttackHitSounds[i]);

	for(i = 0; i < ARRAYSIZE(pAttackMissSounds); i++)
		PRECACHE_SOUND((char *)pAttackMissSounds[i]);

	for(i = 0; i < ARRAYSIZE(pPainSounds); i++)
		PRECACHE_SOUND((char *)pPainSounds[i]);

	for(i = 0; i < ARRAYSIZE(pDeathSounds); i++)
		PRECACHE_SOUND((char *)pDeathSounds[i]);

	UTIL_PrecacheOther("test_effect");
}
Exemplo n.º 26
0
//-----------------------------------------------------------------------------
// Purpose: 
//
//
//-----------------------------------------------------------------------------
void CNPC_Blob::Precache( void )
{
	PrecacheModel( NPC_BLOB_MODEL );
	UTIL_PrecacheOther( "blob_element" );

	BaseClass::Precache();
}
Exemplo n.º 27
0
//=========================================================
// Precache - precaches all resources this monster needs
//=========================================================
void CBigMomma :: Precache()
{
	PRECACHE_MODEL("models/big_mom.mdl");

	PRECACHE_SOUND_ARRAY( pChildDieSounds );
	PRECACHE_SOUND_ARRAY( pSackSounds );
	PRECACHE_SOUND_ARRAY( pDeathSounds );
	PRECACHE_SOUND_ARRAY( pAttackSounds );
	PRECACHE_SOUND_ARRAY( pAttackHitSounds );
	PRECACHE_SOUND_ARRAY( pBirthSounds );
	PRECACHE_SOUND_ARRAY( pAlertSounds );
	PRECACHE_SOUND_ARRAY( pPainSounds );
	PRECACHE_SOUND_ARRAY( pFootSounds );

	UTIL_PrecacheOther( BIG_CHILDCLASS );

	// TEMP: Squid
	PRECACHE_MODEL("sprites/mommaspit.spr");// spit projectile.
	gSpitSprite = PRECACHE_MODEL("sprites/mommaspout.spr");// client side spittle.
	gSpitDebrisSprite = PRECACHE_MODEL("sprites/mommablob.spr" );

	PRECACHE_SOUND( "bullchicken/bc_acid1.wav" );
	PRECACHE_SOUND( "bullchicken/bc_spithit1.wav" );
	PRECACHE_SOUND( "bullchicken/bc_spithit2.wav" );
}	
void CRpg::Precache(void)
{
	PRECACHE_MODEL("models/w_rpg.mdl");
	PRECACHE_MODEL("models/v_rpg.mdl");
	PRECACHE_MODEL("models/p_rpg.mdl");

	PRECACHE_SOUND("items/9mmclip1.wav");

	UTIL_PrecacheOther("laser_spot");
	UTIL_PrecacheOther("rpg_rocket");

	PRECACHE_SOUND("weapons/rocketfire1.wav");
	PRECACHE_SOUND("weapons/glauncher.wav"); // alternative fire sound
	PRECACHE_SOUND("weapons/beep.wav");
	PRECACHE_SOUND("weapons/spot_on.wav");
	PRECACHE_SOUND("weapons/spot_off.wav");
}
Exemplo n.º 29
0
void CTripmine::Precache( void )
{
	PRECACHE_MODEL ("models/v_tripmine.mdl");
	PRECACHE_MODEL ("models/p_tripmine.mdl");
	UTIL_PrecacheOther( "monster_tripmine" );

	m_usTripFire = PRECACHE_EVENT( 1, "events/tripfire.sc" );
}
Exemplo n.º 30
0
void CNihilanth::Precache( void )
{
	PRECACHE_MODEL("models/nihilanth.mdl");
	PRECACHE_MODEL("sprites/lgtning.spr");
	UTIL_PrecacheOther( "nihilanth_energy_ball" );
	UTIL_PrecacheOther( "monster_alien_controller" );
	UTIL_PrecacheOther( "monster_alien_slave" );

	PRECACHE_SOUND_ARRAY( pAttackSounds );
	PRECACHE_SOUND_ARRAY( pBallSounds );
	PRECACHE_SOUND_ARRAY( pShootSounds );
	PRECACHE_SOUND_ARRAY( pRechargeSounds );
	PRECACHE_SOUND_ARRAY( pLaughSounds );
	PRECACHE_SOUND_ARRAY( pPainSounds );
	PRECACHE_SOUND_ARRAY( pDeathSounds );
	PRECACHE_SOUND("debris/beamstart7.wav");
}