//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CResourceChunk::Precache( void )
{
	PrecacheModel( sResourceChunkModel );
	PrecacheModel( sProcessedResourceChunkModel );
	PrecacheModel( "sprites/redglow1.vmt" );

	PrecacheScriptSound( "ResourceChunk.Pickup" );

}
//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CFlare::Precache( void )
{
	PrecacheModel("models/weapons/flare.mdl" );

	PrecacheScriptSound( "Weapon_FlareGun.Burn" );

  	// FIXME: needed to precache the fire model.  Shouldn't have to do this.
  	UTIL_PrecacheOther( "_firesmoke" );
}
Example #3
0
void CNPC_Hydra::Precache()
{
	PrecacheModel( "models/Hydra.mdl" );
	UTIL_PrecacheOther( "hydra_impale" );

	PrecacheScriptSound( "NPC_Hydra.ExtendTentacle" );

	BaseClass::Precache();
}
Example #4
0
void CPhysicsCannister::Precache( void )
{
	PropBreakablePrecacheAll( GetModelName() );
	if ( m_gasSound != NULL_STRING )
	{
		PrecacheScriptSound( STRING(m_gasSound) );
	}
	BaseClass::Precache();
}
void CFlechette::Precache( void )
{
	PrecacheModel( BOLT_MODEL );
	PrecacheScriptSound("Tranqu.Heal");
	PrecacheModel("sprites/grenade/grenade_laser.vmt");
	PrecacheParticleSystem( "gasgrenade_pink" );
	PrecacheParticleSystem( "gasgrenade_green" );
	PrecacheParticleSystem( "gasgrenade_red" );
}
Example #6
0
//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CPropAPC::Precache( void )
{
	BaseClass::Precache();

	int i;
	for ( i = 0; i < APC_MAX_CHUNKS; ++i )
	{
		PrecacheModel( s_pChunkModelName[i] );
	}

	for ( i = 0; i < APC_MAX_GIBS; ++i )
	{
		PrecacheModel( s_pGibModelName[i] );
	}

	PrecacheScriptSound( "Weapon_AR2.Single" );
	PrecacheScriptSound( "PropAPC.FireRocket" );
	PrecacheScriptSound( "combine.door_lock" );
}
//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CVehicleMortar::Precache()
{
	PrecacheModel( MORTAR_MODEL );

	PrecacheVGuiScreen( MORTAR_SCREEN_NAME );

	PrecacheScriptSound( "VehicleMortar.FireSound" );

	BaseClass::Precache();
}
Example #8
0
//=========================================================
// Precache - precaches all resources this monster needs
//=========================================================
void CNPC_AlienGrunt::Precache()
{
	PrecacheModel("models/agrunt.mdl");

	iAgruntMuzzleFlash = PrecacheModel( "sprites/muz4.vmt" );

	UTIL_PrecacheOther( "hornet" );

	PrecacheScriptSound( "Weapon_Hornetgun.Single" );
	PrecacheScriptSound( "AlienGrunt.LeftFoot" );
	PrecacheScriptSound( "AlienGrunt.RightFoot" );
	PrecacheScriptSound( "AlienGrunt.AttackHit" );
	PrecacheScriptSound( "AlienGrunt.AttackMiss" );
	PrecacheScriptSound( "AlienGrunt.Die" );
	PrecacheScriptSound( "AlienGrunt.Alert" );
	PrecacheScriptSound( "AlienGrunt.Attack" );
	PrecacheScriptSound( "AlienGrunt.Pain" );
	PrecacheScriptSound( "AlienGrunt.Idle" );
}	
void CGrenade_Molotov::Precache( void )
{
	BaseClass::Precache();

	PrecacheModel("models/weapons/w_bb_bottle.mdl");

	UTIL_PrecacheOther("_firesmoke");

	PrecacheScriptSound( "Grenade_Molotov.Detonate" );
}
Example #10
0
void CNPC_MiniTurret::Precache()
{
	CNPC_BaseTurret::Precache( );

	m_iAmmoType = GetAmmoDef()->Index("9mmRound");

	PrecacheScriptSound( "Turret.Shoot" );

	PrecacheModel ("models/miniturret.mdl");	
}
Example #11
0
//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CWeaponMedigun::Precache()
{
	BaseClass::Precache();
	PrecacheScriptSound( "WeaponMedigun.NoTarget" );
	PrecacheScriptSound( "WeaponMedigun.Healing" );
	PrecacheScriptSound( "WeaponMedigun.Charged" );
	PrecacheParticleSystem( "medicgun_invulnstatus_fullcharge_blue" );
	PrecacheParticleSystem( "medicgun_invulnstatus_fullcharge_red" );
	PrecacheParticleSystem("medicgun_invulnstatus_fullcharge_green");
	PrecacheParticleSystem("medicgun_invulnstatus_fullcharge_yellow");
	PrecacheParticleSystem( "medicgun_beam_red_invun" );
	PrecacheParticleSystem( "medicgun_beam_red" );
	PrecacheParticleSystem( "medicgun_beam_blue_invun" );
	PrecacheParticleSystem( "medicgun_beam_blue" );
	PrecacheParticleSystem("medicgun_beam_green_invun");
	PrecacheParticleSystem("medicgun_beam_green");
	PrecacheParticleSystem("medicgun_beam_yellow_invun");
	PrecacheParticleSystem("medicgun_beam_yellow");
}
void CWeaponGrenade::Precache( void )
{
    BaseClass::Precache();

    PrecacheScriptSound( "Weapon_Grenade.Throw" );

#ifndef CLIENT_DLL
    UTIL_PrecacheOther( "npc_grenade_frag" );
#endif
}
//------------------------------------------------------------------------------
// Purpose :
// Input   :
// Output  :
//------------------------------------------------------------------------------
void CFuncTankPulseLaser::Precache(void)
{
	UTIL_PrecacheOther( "grenade_beam" );

	if ( m_sPulseFireSound != NULL_STRING )
	{
		PrecacheScriptSound( STRING(m_sPulseFireSound) );
	}
	BaseClass::Precache();
}
Example #14
0
//-----------------------------------------------------------------------------
// Spawn
//-----------------------------------------------------------------------------
void CRagdollBoogie::Precache()
{
	BaseClass::Precache();

	PrecacheEffect( "TeslaHitboxes" );

#ifdef HL2_EPISODIC
	PrecacheScriptSound( "RagdollBoogie.Zap" );
#endif
}
//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CTeamControlPoint::Precache( void )
{
	for ( int i = 0; i < m_TeamData.Count(); i++ )
	{
		// Skip over spectator
		if ( i == TEAM_SPECTATOR )
			continue;

		if ( m_TeamData[i].iszCapSound != NULL_STRING )
		{
			PrecacheScriptSound( STRING(m_TeamData[i].iszCapSound) );
		}

		if ( m_TeamData[i].iszModel != NULL_STRING )
		{
			PrecacheModel( STRING(m_TeamData[i].iszModel) );
		}

		if ( m_TeamData[i].iszIcon != NULL_STRING )
		{
			PrecacheMaterial( STRING( m_TeamData[i].iszIcon ) );
			m_TeamData[i].iIcon = GetMaterialIndex( STRING( m_TeamData[i].iszIcon ) );
			Assert( m_TeamData[i].iIcon != 0 );
		}

		if ( !m_TeamData[i].iIcon )
		{
			Warning( "Invalid hud icon material for team %d in control point '%s' ( point index %d )\n", i, GetDebugName(), GetPointIndex() );
		}

		if ( m_TeamData[i].iszOverlay != NULL_STRING )
		{
			PrecacheMaterial( STRING( m_TeamData[i].iszOverlay ) );
			m_TeamData[i].iOverlay = GetMaterialIndex( STRING( m_TeamData[i].iszOverlay ) );
			Assert( m_TeamData[i].iOverlay != 0 );

			if ( !m_TeamData[i].iOverlay )
			{
				Warning( "Invalid hud overlay material for team %d in control point '%s' ( point index %d )\n", i, GetDebugName(), GetPointIndex() );
			}
		}
	}

	PrecacheScriptSound( STRING( m_iszCaptureStartSound ) );
	PrecacheScriptSound( STRING( m_iszCaptureEndSound ) );
	PrecacheScriptSound( STRING( m_iszCaptureInProgress ) );
	PrecacheScriptSound( STRING( m_iszCaptureInterrupted ) );

	if ( m_iszWarnSound != NULL_STRING )
	{
		PrecacheScriptSound( STRING( m_iszWarnSound ) );
	}

#ifdef TF_DLL
	PrecacheScriptSound( "Announcer.ControlPointContested" );
#endif
}
Example #16
0
//=========================================================
// Precache - precaches all resources this monster needs
//=========================================================
void CNPC_Gargantua::Precache()
{
	PrecacheModel("models/garg.mdl");
	PrecacheModel( GARG_EYE_SPRITE_NAME );
	PrecacheModel( GARG_BEAM_SPRITE_NAME );
	PrecacheModel( GARG_BEAM_SPRITE2 );
	//gStompSprite = PRECACHE_MODEL( GARG_STOMP_SPRITE_NAME );
	gGargGibModel = PrecacheModel( GARG_GIB_MODEL );

	PrecacheScriptSound( "Garg.AttackHit" );
	PrecacheScriptSound( "Garg.AttackMiss" );
	PrecacheScriptSound( "Garg.Footstep" );
	PrecacheScriptSound( "Garg.Breath" );
	PrecacheScriptSound( "Garg.Attack" );
	PrecacheScriptSound( "Garg.Pain" );
	PrecacheScriptSound( "Garg.BeamAttackOn" );
	PrecacheScriptSound( "Garg.BeamAttackRun" );
	PrecacheScriptSound( "Garg.BeamAttackOff" );
	PrecacheScriptSound( "Garg.StompSound" );
}
Example #17
0
//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CWeaponBugBait::Precache( void )
{
	BaseClass::Precache();
	PrecacheModel( ARC_SPRITE );
	PrecacheModel( ARC_SPRITE_IMPACT );

	UTIL_PrecacheOther( "npc_grenade_bugbait" );

	PrecacheScriptSound( "Weapon_Bugbait.Splat" );

}
Example #18
0
void CPropVehicleManhack::Precache( void )
{
	SetModelName( AllocPooledString("models/vehicles/vehicle_manhackcontroller.mdl") );

	BaseClass::Precache();

//	PrecacheModel( GetModelName() );
	PrecacheScriptSound("NPC_Turret.Retire");

	m_ServerVehicle.Initialize( "scripts/vehicles/manhack.txt" );
}
Example #19
0
//-----------------------------------------------------------------------------
// Purpose: Precache 
//-----------------------------------------------------------------------------
void CTFBaseDMPowerup::Precache( void )
{
	UTIL_ValidateSoundName( m_strPickupSound, GetDefaultPickupSound() );
	if ( GetModelName() == NULL_STRING )
		SetModelName( AllocPooledString( GetDefaultPowerupModel() ) );

	PrecacheModel( STRING( GetModelName() ) );
	PrecacheScriptSound( STRING( m_strPickupSound ) );

	BaseClass::Precache();
}
//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CAntlionGrub::Precache( void )
{
	PrecacheModel( ANTLIONGRUB_MODEL );
	PrecacheModel( ANTLIONGRUB_SQUASHED_MODEL );

	m_nGlowSpriteHandle = PrecacheModel("sprites/grubflare1.vmt");

	PrecacheScriptSound( "NPC_Antlion_Grub.Idle" );
	PrecacheScriptSound( "NPC_Antlion_Grub.Alert" );
	PrecacheScriptSound( "NPC_Antlion_Grub.Stimulated" );
	PrecacheScriptSound( "NPC_Antlion_Grub.Die" );
	PrecacheScriptSound( "NPC_Antlion_Grub.Squish" );

	PrecacheParticleSystem( "GrubSquashBlood" );
	PrecacheParticleSystem( "GrubBlood" );

	UTIL_PrecacheOther( "item_grubnugget" );

	BaseClass::Precache();
}
Example #21
0
//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CPointCommentaryNode::Precache()
{
	PrecacheModel( STRING( GetModelName() ) );

	if ( m_iszCommentaryFile.Get() != NULL_STRING )
	{
		PrecacheScriptSound( STRING( m_iszCommentaryFile.Get() ) );
	}
	else
	{
		Warning("%s: %s has no commentary file.\n", GetClassName(), GetDebugName() );
	}

	if ( m_iszCommentaryFileNoHDR.Get() != NULL_STRING )
	{
		PrecacheScriptSound( STRING( m_iszCommentaryFileNoHDR.Get() ) );
	}
	
	BaseClass::Precache();
}	
//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CNPC_Combine_Cannon::Precache( void )
{
	PrecacheModel("models/combine_soldier.mdl");
	PrecacheModel("effects/bluelaser1.vmt");	
	
	gHaloTexture = PrecacheModel("sprites/light_glow03.vmt");

	PrecacheScriptSound( "NPC_Combine_Cannon.FireBullet" );

	BaseClass::Precache();
}
Example #23
0
void CGrenadeFrag::Precache( void )
{
	PrecacheModel( GRENADE_MODEL );

	PrecacheScriptSound( "Grenade.Blip" );

	PrecacheModel( "sprites/redglow1.vmt" );
	PrecacheModel( "sprites/bluelaser1.vmt" );

	BaseClass::Precache();
}
void CASW_Sentry_Top::Precache()
{
	PrecacheModel(SENTRY_TOP_MODEL);
	PrecacheModel( "models/sentry_gun/freeze_top.mdl" );
 	PrecacheModel( "models/sentry_gun/grenade_top.mdl" );
	PrecacheModel( "models/sentry_gun/flame_top.mdl" );
	PrecacheScriptSound("ASW_Sentry.Fire");
	PrecacheScriptSound("ASW_Sentry.Turn");
	PrecacheScriptSound("ASW_Sentry.AmmoWarning");
	PrecacheScriptSound("ASW_Sentry.OutOfAmmo");
	PrecacheScriptSound("ASW_Sentry.Deploy");	
	PrecacheScriptSound( "ASW_Sentry.CannonFire" );
	PrecacheScriptSound( "ASW_Sentry.FlameLoop" );
	PrecacheScriptSound( "ASW_Sentry.FlameStop" );
	PrecacheScriptSound( "ASW_Sentry.IceLoop" );
	PrecacheScriptSound( "ASW_Sentry.IceStop" );
	PrecacheParticleSystem( "asw_flamethrower" );
	PrecacheParticleSystem( "asw_freezer_spray" );
	BaseClass::Precache();
}
Example #25
0
//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CObjectTeleporter::Precache()
{
	BaseClass::Precache();

	// Precache Object Models
	int iModelIndex;

	PrecacheModel( TELEPORTER_MODEL_ENTRANCE_PLACEMENT );
	PrecacheModel( TELEPORTER_MODEL_EXIT_PLACEMENT );	

	iModelIndex = PrecacheModel( TELEPORTER_MODEL_BUILDING );
	PrecacheGibsForModel( iModelIndex );

	iModelIndex = PrecacheModel( TELEPORTER_MODEL_LIGHT );
	PrecacheGibsForModel( iModelIndex );

	// Precache Sounds
	PrecacheScriptSound( "Building_Teleporter.Ready" );
	PrecacheScriptSound( "Building_Teleporter.Send" );
	PrecacheScriptSound( "Building_Teleporter.Receive" );
	PrecacheScriptSound( "Building_Teleporter.Spin" );

	PrecacheParticleSystem( "teleporter_red_charged" );
	PrecacheParticleSystem( "teleporter_blue_charged" );
	PrecacheParticleSystem( "teleporter_red_entrance" );
	PrecacheParticleSystem( "teleporter_blue_entrance" );
	PrecacheParticleSystem( "teleporter_red_exit" );
	PrecacheParticleSystem( "teleporter_blue_exit" );
	PrecacheParticleSystem( "teleporter_arms_circle_red" );
	PrecacheParticleSystem( "teleporter_arms_circle_blue" );
	PrecacheParticleSystem( "tpdamage_1" );
	PrecacheParticleSystem( "tpdamage_2" );
	PrecacheParticleSystem( "tpdamage_3" );
	PrecacheParticleSystem( "tpdamage_4" );
	PrecacheParticleSystem( "teleported_red" );
	PrecacheParticleSystem( "player_sparkles_red" );
	PrecacheParticleSystem( "teleported_blue" );
	PrecacheParticleSystem( "player_sparkles_blue" );
	PrecacheParticleSystem( "teleportedin_red" );
	PrecacheParticleSystem( "teleportedin_blue" );
}
Example #26
0
//-----------------------------------------------------------------------------
// Purpose: Precache
//-----------------------------------------------------------------------------
void CWeaponGrapple::Precache(void)
{
#ifndef CLIENT_DLL
	UTIL_PrecacheOther("grapple_hook");
#endif
	PrecacheScriptSound("Weapon_Crossbow.BoltHitWorld");

	PrecacheModel(CROSSBOW_GLOW_SPRITE);
	PrecacheModel(CROSSBOW_GLOW_SPRITE2);

	BaseClass::Precache();
}
Example #27
0
//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CEnvSpark::Precache(void)
{
	// Unlock string tables to avoid an engine warning
	bool oldLock = engine->LockNetworkStringTables( false );
	m_nGlowSpriteIndex = PrecacheModel("sprites/glow01.vmt");
	engine->LockNetworkStringTables( oldLock );

	if ( IsPrecacheAllowed() )
	{
		PrecacheScriptSound( "DoSpark" );
	}
}
//-----------------------------------------------------------------------------
// Precache - precaches all resources this NPC needs
//-----------------------------------------------------------------------------
void CNPC_Dog::Precache( void )
{
	PrecacheModel( "models/dog.mdl" );
	
	PrecacheScriptSound( "Weapon_PhysCannon.Launch" );

	PrecacheModel( "sprites/orangelight1.vmt" );
	PrecacheModel( "sprites/physcannon_bluelight2.vmt" );
	PrecacheModel( "sprites/glow04_noz.vmt" );

	BaseClass::Precache();
}
Example #29
0
void CASW_Simple_Drone::Precache()
{
	BaseClass::Precache();

	PrecacheScriptSound( "ASW_Drone.Land" );
	PrecacheScriptSound( "ASW_Drone.Pain" );
	PrecacheScriptSound( "ASW_Drone.Alert" );
	PrecacheScriptSound( "ASW_Drone.Death" );
	PrecacheScriptSound( "ASW_Drone.Attack" );
	PrecacheScriptSound( "ASW_Drone.Swipe" );

	PrecacheModel( "models/swarm/DroneGibs/dronepart01.mdl" );
	PrecacheModel( "models/swarm/DroneGibs/dronepart20.mdl" );
	PrecacheModel( "models/swarm/DroneGibs/dronepart29.mdl" );
	PrecacheModel( "models/swarm/DroneGibs/dronepart31.mdl" );
	PrecacheModel( "models/swarm/DroneGibs/dronepart32.mdl" );
	PrecacheModel( "models/swarm/DroneGibs/dronepart44.mdl" );
	PrecacheModel( "models/swarm/DroneGibs/dronepart45.mdl" );
	PrecacheModel( "models/swarm/DroneGibs/dronepart47.mdl" );
	PrecacheModel( "models/swarm/DroneGibs/dronepart49.mdl" );
	PrecacheModel( "models/swarm/DroneGibs/dronepart50.mdl" );
	PrecacheModel( "models/swarm/DroneGibs/dronepart53.mdl" );
	PrecacheModel( "models/swarm/DroneGibs/dronepart54.mdl" );
	PrecacheModel( "models/swarm/DroneGibs/dronepart56.mdl" );
	PrecacheModel( "models/swarm/DroneGibs/dronepart57.mdl" );
	PrecacheModel( "models/swarm/DroneGibs/dronepart58.mdl" );
	PrecacheModel( "models/swarm/DroneGibs/dronepart59.mdl" );
}
//=========================================================
// Precache - precaches all resources this monster needs
//=========================================================
void CNPC_Bullsquid::Precache()
{
	PrecacheModel( "models/bullsquid.mdl" );

	UTIL_PrecacheOther( "grenade_spit" );

	PrecacheScriptSound( "NPC_Bullsquid.Idle" );
	PrecacheScriptSound( "NPC_Bullsquid.Pain" );
	PrecacheScriptSound( "NPC_Bullsquid.Alert" );
	PrecacheScriptSound( "NPC_Bullsquid.Death" );
	PrecacheScriptSound( "NPC_Bullsquid.Attack1" );
	PrecacheScriptSound( "NPC_Bullsquid.Growl" );
	PrecacheScriptSound( "NPC_Bullsquid.TailWhip");
	PrecacheScriptSound("NPC_Antlion.PoisonShoot");
	PrecacheScriptSound("NPC_Antlion.PoisonBall");

	BaseClass::Precache();
}