当前位置: 首页>>代码示例>>C++>>正文


C++ UTIL_PrecacheOther函数代码示例

本文整理汇总了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();
}
开发者ID:AluminumKen,项目名称:hl2sb-src,代码行数:30,代码来源:weapon_striderbuster.cpp

示例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();
}
开发者ID:hitmen047,项目名称:TF2HLCoop,代码行数:31,代码来源:npc_combines.cpp

示例3: UTIL_PrecacheOther

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

	BaseClass::Precache();
}
开发者ID:InfoSmart,项目名称:InSource-Singleplayer,代码行数:10,代码来源:director_healthkit_spawn.cpp

示例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);
			}
		}
	}
}
开发者ID:InfoSmart,项目名称:InSource-Singleplayer,代码行数:61,代码来源:director_spawn.cpp

示例5: UTIL_PrecacheOther

void CRope::Precache()
{
	BaseClass::Precache();

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

	PRECACHE_SOUND_ARRAY( g_pszCreakSounds );
}
开发者ID:swmpdg,项目名称:HLEnhanced,代码行数:9,代码来源:CRope.cpp

示例6: UTIL_PrecacheOther

void CWeaponAR2::Precache( void )
{
	BaseClass::Precache();

#ifndef CLIENT_DLL

	UTIL_PrecacheOther( "prop_combine_ball" );
	UTIL_PrecacheOther( "env_entity_dissolver" );
#endif
	
}
开发者ID:Au-heppa,项目名称:source-sdk-2013,代码行数:11,代码来源:weapon_ar2.cpp

示例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" );
}
开发者ID:Bubbasacs,项目名称:FinalProj,代码行数:11,代码来源:weapon_manhack.cpp

示例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" );
}
开发者ID:0xFEEDC0DE64,项目名称:UltraGame,代码行数:13,代码来源:weapon_slam.cpp

示例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 );
	}
}
开发者ID:Orygin,项目名称:BisounoursParty,代码行数:17,代码来源:item_dynamic_resupply.cpp

示例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" );
}	
开发者ID:NonPIayerCharacter,项目名称:hlsdk-xash3d,代码行数:18,代码来源:controller.cpp

示例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" );

}
开发者ID:DreikVal,项目名称:nicksproject,代码行数:15,代码来源:weapon_slam.cpp

示例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" );
}
开发者ID:johndrinkwater,项目名称:CSSDK,代码行数:16,代码来源:rpg.cpp

示例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");

}
开发者ID:jlecorre,项目名称:hlinvasion,代码行数:32,代码来源:apache.cpp

示例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" );
}	
开发者ID:Solexid,项目名称:halflife,代码行数:37,代码来源:agrunt.cpp

示例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);
	}
	*/
}
开发者ID:RaraFolf,项目名称:FIREFIGHT-RELOADED-src-sdk-2013,代码行数:28,代码来源:monstermaker_xeninvasion.cpp


注:本文中的UTIL_PrecacheOther函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。