本文整理汇总了C++中UTIL_PrecacheOther函数的典型用法代码示例。如果您正苦于以下问题:C++ UTIL_PrecacheOther函数的具体用法?C++ UTIL_PrecacheOther怎么用?C++ UTIL_PrecacheOther使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了UTIL_PrecacheOther函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PrecacheScriptSound
//-----------------------------------------------------------------------------
// 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();
}
示例2: STRING
//-----------------------------------------------------------------------------
// 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();
}
示例3: UTIL_PrecacheOther
//=========================================================
// Guardar los objetos necesarios en caché.
//=========================================================
void CDirectorHealthSpawn::Precache()
{
UTIL_PrecacheOther("item_healthkit");
UTIL_PrecacheOther("item_healthvial");
BaseClass::Precache();
}
示例4: ARRAYSIZE
//=========================================================
// 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);
}
}
}
}
示例5: UTIL_PrecacheOther
void CRope::Precache()
{
BaseClass::Precache();
UTIL_PrecacheOther( "rope_segment" );
UTIL_PrecacheOther( "rope_sample" );
PRECACHE_SOUND_ARRAY( g_pszCreakSounds );
}
示例6: UTIL_PrecacheOther
void CWeaponAR2::Precache( void )
{
BaseClass::Precache();
#ifndef CLIENT_DLL
UTIL_PrecacheOther( "prop_combine_ball" );
UTIL_PrecacheOther( "env_entity_dissolver" );
#endif
}
示例7: UTIL_PrecacheOther
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" );
}
示例8: UTIL_PrecacheOther
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" );
}
示例9: UTIL_PrecacheOther
//-----------------------------------------------------------------------------
// 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 );
}
}
示例10: Precache
//=========================================================
// 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" );
}
示例11: UTIL_PrecacheOther
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" );
}
示例12: PRECACHE_MODEL
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" );
}
示例13: PRECACHE_MODEL
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");
}
示例14: Precache
//=========================================================
// 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" );
}
示例15: ARRAYSIZE
//-----------------------------------------------------------------------------
// 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);
}
*/
}