您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ AllocPooledString函数代码示例

51自学网 2021-06-01 19:46:28
  C++
这篇教程C++ AllocPooledString函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中AllocPooledString函数的典型用法代码示例。如果您正苦于以下问题:C++ AllocPooledString函数的具体用法?C++ AllocPooledString怎么用?C++ AllocPooledString使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了AllocPooledString函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: atoi

//-----------------------------------------------------------------------------// Purpose: //-----------------------------------------------------------------------------bool CTeamControlPoint::KeyValue( const char *szKeyName, const char *szValue ){		if ( !Q_strncmp( szKeyName, "team_capsound_", 14 ) )	{		int iTeam = atoi(szKeyName+14);		Assert( iTeam >= 0 && iTeam < m_TeamData.Count() );		m_TeamData[iTeam].iszCapSound = AllocPooledString(szValue);	}	else if ( !Q_strncmp( szKeyName, "team_model_", 11 ) )	{		int iTeam = atoi(szKeyName+11);		Assert( iTeam >= 0 && iTeam < m_TeamData.Count() );		m_TeamData[iTeam].iszModel = AllocPooledString(szValue);	}	else if ( !Q_strncmp( szKeyName, "team_timedpoints_", 17 ) )	{		int iTeam = atoi(szKeyName+17);		Assert( iTeam >= 0 && iTeam < m_TeamData.Count() );		m_TeamData[iTeam].iTimedPoints = atoi(szValue);	}	else if ( !Q_strncmp( szKeyName, "team_bodygroup_", 15 ) )	{		int iTeam = atoi(szKeyName+15);		Assert( iTeam >= 0 && iTeam < m_TeamData.Count() );		m_TeamData[iTeam].iModelBodygroup = atoi(szValue);	}	else if ( !Q_strncmp( szKeyName, "team_icon_", 10 ) )	{		int iTeam = atoi(szKeyName+10);		Assert( iTeam >= 0 && iTeam < m_TeamData.Count() );		m_TeamData[iTeam].iszIcon = AllocPooledString(szValue);	}	else if ( !Q_strncmp( szKeyName, "team_overlay_", 13 ) )	{		int iTeam = atoi(szKeyName+13);		Assert( iTeam >= 0 && iTeam < m_TeamData.Count() );		m_TeamData[iTeam].iszOverlay = AllocPooledString(szValue);	}	else if ( !Q_strncmp( szKeyName, "team_previouspoint_", 19 ) )	{		int iTeam;		int iPoint = 0;		sscanf( szKeyName+19, "%d_%d", &iTeam, &iPoint );		Assert( iTeam >= 0 && iTeam < m_TeamData.Count() );		Assert( iPoint >= 0 && iPoint < MAX_PREVIOUS_POINTS );		m_TeamData[iTeam].iszPreviousPoint[iPoint] = AllocPooledString(szValue);	}	else	{		return BaseClass::KeyValue( szKeyName, szValue );	}	return true;}
开发者ID:xxauroraxx,项目名称:Source.Python,代码行数:63,


示例2: SetModelName

//-----------------------------------------------------------------------------// Purpose: //-----------------------------------------------------------------------------void CResourceChunk::Spawn( ){	// Init model	if ( IsProcessed() )	{		SetModelName( AllocPooledString( sProcessedResourceChunkModel ) );	}	else	{		SetModelName( AllocPooledString( sResourceChunkModel ) );	}	BaseClass::Spawn();	UTIL_SetSize( this, Vector(-4,-4,-4), Vector(4,4,4) );	SetMoveType( MOVETYPE_FLYGRAVITY, MOVECOLLIDE_FLY_BOUNCE );	SetSolid( SOLID_BBOX );	AddSolidFlags( FSOLID_TRIGGER );	CollisionProp()->UseTriggerBounds( true, 24 );	SetCollisionGroup( TFCOLLISION_GROUP_RESOURCE_CHUNK );	SetGravity( 1.0 );	SetFriction( 1 );	SetTouch( ChunkTouch );	SetThink( ChunkRemove );	SetNextThink( gpGlobals->curtime + random->RandomFloat( 50.0, 80.0 ) ); // Remove myself the}
开发者ID:Axitonium,项目名称:SourceEngine2007,代码行数:29,


示例3: RunPlayerInit

bool CMapAdd::RunPlayerInit( const char *mapaddMap, const char *szLabel){	if(AllocPooledString(mapaddMap) == AllocPooledString("") || !mapaddMap)		return false; //Failed to load!	if(!szLabel)		szLabel = "Init";	//FileHandle_t fh = filesystem->Open(szMapadd,"r","MOD");	// Open the mapadd data file, and abort if we can't	KeyValues *pMapAdd = new KeyValues( "MapAdd" );	if(pMapAdd->LoadFromFile( filesystem, mapaddMap, "MOD" ))	{		KeyValues *pMapAdd2 = pMapAdd->FindKey(szLabel);		if(pMapAdd2)		{			KeyValues *pMapAddEnt = pMapAdd2->GetFirstTrueSubKey();			while (pMapAddEnt)			{				HandlePlayerEntity(pMapAddEnt, false);				pMapAddEnt = pMapAddEnt->GetNextTrueSubKey(); //Got to keep this!			}		}	}	pMapAdd->deleteThis();	return true;}
开发者ID:sirmastercombat,项目名称:SirMasters_Mod,代码行数:25,


示例4: DoEntFire

static void DoEntFire( const char *pszTarget, const char *pszAction, const char *pszValue, float delay, HSCRIPT hActivator, HSCRIPT hCaller ){	const char *target = "", *action = "Use";	variant_t value;	target = STRING( AllocPooledString( pszTarget ) );	// Don't allow them to run anything on a point_servercommand unless they're the host player. Otherwise they can ent_fire	// and run any command on the server. Admittedly, they can only do the ent_fire if sv_cheats is on, but 	// people complained about users resetting the rcon password if the server briefly turned on cheats like this:	//    give point_servercommand	//    ent_fire point_servercommand command "rcon_password mynewpassword"	if ( gpGlobals->maxClients > 1 && V_stricmp( target, "point_servercommand" ) == 0 )	{		return;	}	if ( *pszAction )	{		action = STRING( AllocPooledString( pszAction ) );	}	if ( *pszValue )	{		value.SetString( AllocPooledString( pszValue ) );	}	if ( delay < 0 )	{		delay = 0;	}	g_EventQueue.AddEvent( target, action, value, delay, ToEnt(hActivator), ToEnt(hCaller) );}
开发者ID:SCell555,项目名称:hl2-asw-port,代码行数:32,


示例5: DoEntFireByInstanceHandle

//--------------------------------------------------------------------------------------------------// Use an entity's script instance to add an entity IO event (used for firing events on unnamed entities from vscript)//--------------------------------------------------------------------------------------------------static void DoEntFireByInstanceHandle( HSCRIPT hTarget, const char *pszAction, const char *pszValue, float delay, HSCRIPT hActivator, HSCRIPT hCaller ){	const char *action = "Use";	variant_t value;	if ( *pszAction )	{		action = STRING( AllocPooledString( pszAction ) );	}	if ( *pszValue )	{		value.SetString( AllocPooledString( pszValue ) );	}	if ( delay < 0 )	{		delay = 0;	}	CBaseEntity* pTarget = ToEnt(hTarget);	if ( !pTarget )	{		Warning( "VScript error: DoEntFire was passed an invalid entity instance./n" );		return;	}	g_EventQueue.AddEvent( pTarget, action, value, delay, ToEnt(hActivator), ToEnt(hCaller) );}
开发者ID:SCell555,项目名称:hl2-asw-port,代码行数:31,


示例6: AllocPooledString

//-----------------------------------------------------------------------------// Purpose: Setup the patch// Input  : nEntIndex - index of the edict that owns the sound channel//			channel - This is a sound channel (CHAN_ITEM, CHAN_STATIC)//			*pSoundName - string name of the wave "weapons/sound.wav"//			attenuation - attenuation of this sound (not animated)//-----------------------------------------------------------------------------void CSoundPatch::Init( IRecipientFilter *pFilter, CBaseEntity *pEnt, int channel, const char *pSoundName, 			soundlevel_t soundlevel ){	m_hEnt = pEnt;	m_entityChannel = channel;	m_iszSoundName = AllocPooledString( pSoundName );	m_volume.SetValue( 0 );	m_soundlevel = soundlevel;	m_pitch.SetValue( 0 );	m_isPlaying = false;	m_shutdownTime = 0;	m_flLastTime = 0;	m_Filter.Init( pFilter );	// Get the volume from the script	CSoundParameters params;	if ( !Q_stristr( pSoundName, ".wav" ) &&		CBaseEntity::GetParametersForSound( pSoundName, params ) )	{		m_flScriptVolume = params.volume;	}	else	{		m_flScriptVolume = 1.0;	}#ifdef _DEBUG	m_iszClassName = AllocPooledString( pEnt->GetClassname() );#endif}
开发者ID:RaisingTheDerp,项目名称:raisingthebar,代码行数:37,


示例7: m_szHexname

TrackInfo_t::TrackInfo_t( const char *szFilename, const char *szHexname, const char *szAlbum, const char *szArtist, const char *szGenre ): m_szHexname( AllocPooledString( szHexname ) ), m_szFilename( AllocPooledString( szFilename )), m_szAlbum( szAlbum ), m_szArtist( szArtist ), m_szGenre( szGenre ), m_bIsMarkedForDeletion( false ){}
开发者ID:Randdalf,项目名称:bliink,代码行数:8,


示例8: Warning

//-----------------------------------------------------------------------------// Purpose: //-----------------------------------------------------------------------------void CTeamControlPoint::Spawn( void ){	// Validate our default team	if ( m_iDefaultOwner < 0 || m_iDefaultOwner >= GetNumberOfTeams() )	{		Warning( "team_control_point '%s' has bad point_default_owner./n", GetDebugName() );		m_iDefaultOwner = TEAM_UNASSIGNED;	}#ifdef TF_DLL	if ( m_iszCaptureStartSound == NULL_STRING )	{		m_iszCaptureStartSound = AllocPooledString( "Hologram.Start" );	}	if ( m_iszCaptureEndSound == NULL_STRING )	{		m_iszCaptureEndSound = AllocPooledString( "Hologram.Stop" );	}	if ( m_iszCaptureInProgress == NULL_STRING )	{		m_iszCaptureInProgress = AllocPooledString( "Hologram.Move" );	}	if ( m_iszCaptureInterrupted == NULL_STRING )	{		m_iszCaptureInterrupted = AllocPooledString( "Hologram.Interrupted" );	}#endif	Precache();	InternalSetOwner( m_iDefaultOwner, false );	//init the owner of this point	SetActive( !m_bStartDisabled );	BaseClass::Spawn();	SetPlaybackRate( 1.0 );	SetThink( &CTeamControlPoint::AnimThink );	SetNextThink( gpGlobals->curtime + 0.1f );	if ( FBitSet( m_spawnflags, SF_CAP_POINT_HIDE_MODEL ) )	{		AddEffects( EF_NODRAW );	}	if ( FBitSet( m_spawnflags, SF_CAP_POINT_HIDE_SHADOW ) )	{		AddEffects( EF_NOSHADOW );	}	m_flLastContestedAt = -1;	m_pCaptureInProgressSound = NULL;}
开发者ID:xxauroraxx,项目名称:Source.Python,代码行数:59,


示例9: AllocPooledString

void CASW_Holdout_Wave_Entry::LoadFromKeyValues( KeyValues *pKeys ){	m_flSpawnDelay = pKeys->GetFloat( "SpawnDelay", 1.0f );	m_iszAlienClass = AllocPooledString( pKeys->GetString( "AlienClass" ) );	m_nQuantity = pKeys->GetInt( "Quantity", 1 );	m_flSpawnDuration = pKeys->GetFloat( "SpawnDuration", 0.0f );	m_nModifiers = pKeys->GetInt( "Modifiers", 0 );	// TODO: Turn this into a string parser for the bit flag names	m_iszSpawnGroupName = AllocPooledString( pKeys->GetString( "SpawnGroup" ) );	m_hSpawnGroup = NULL;}
开发者ID:BenLubar,项目名称:SwarmDirector2,代码行数:10,


示例10:

CBaseEntity *CAI_Relationship::FindEntityForProceduralName( string_t iszName, CBaseEntity *pActivator, CBaseEntity *pCaller ){	// Handle the activator token	if ( iszName == AllocPooledString( ACTIVATOR_KEYNAME ) )		return pActivator;	// Handle the caller token	if ( iszName == AllocPooledString( CALLER_KEYNAME ) )		return pCaller;	return NULL;}
开发者ID:AluminumKen,项目名称:hl2sb-src,代码行数:12,


示例11: AllocPooledString

bool CNPCSimpleTalker::KeyValue( const char *szKeyName, const char *szValue ){	if (FStrEq(szKeyName, "UseSentence"))	{		m_iszUse = AllocPooledString(szValue);	}	else if (FStrEq(szKeyName, "UnUseSentence"))	{		m_iszUnUse = AllocPooledString(szValue);	}	else 		return BaseClass::KeyValue( szKeyName, szValue );	return true;}
开发者ID:Denzeriko,项目名称:hl2-mod,代码行数:15,


示例12: ASWGameResource

void CASW_Campaign_Save::UpdateLastCommanders(){	// save which marines the players have selected	// add which marines he has selected	CASW_Game_Resource *pGameResource = ASWGameResource();	if ( !pGameResource )		return;	// first check there were some marines selected (i.e. we're not in the campaign lobby map)	int iNumMarineResources = 0;	for (int i=0;i<pGameResource->GetMaxMarineResources();i++)	{		if (pGameResource->GetMarineResource(i))			iNumMarineResources++;	}	if ( iNumMarineResources <= 0 )		return;		char buffer[256];	for (int i=0;i<ASW_NUM_MARINE_PROFILES;i++)	{		// look for a marine info for this marine		bool bFound = false;		for (int k=0;k<pGameResource->GetMaxMarineResources();k++)		{			CASW_Marine_Resource *pMR = pGameResource->GetMarineResource(k);			if (pMR && pMR->GetProfileIndex() == i && pMR->GetCommander())			{				CASW_Player *pPlayer = pMR->GetCommander();				if (pPlayer)				{					// store the commander who has this marine					Q_snprintf(buffer, sizeof(buffer), "%s%s",pPlayer->GetPlayerName(), pPlayer->GetASWNetworkID());					m_LastCommanders[i] = AllocPooledString(buffer);					m_LastMarineResourceSlot[i] = k;					m_LastPrimaryMarines[i] = pPlayer->IsPrimaryMarine(i);					bFound = true;					break;				}			}		}		if (!bFound)		{			m_LastCommanders[i] = AllocPooledString("");			m_LastMarineResourceSlot[i] = 0;		}	}}
开发者ID:jtanx,项目名称:ch1ckenscoop,代码行数:48,


示例13: SetWidth

//-----------------------------------------------------------------------------// Purpose: //-----------------------------------------------------------------------------bool CEnvLaser::KeyValue( const char *szKeyName, const char *szValue ){	if (FStrEq(szKeyName, "width"))	{		SetWidth( atof(szValue) );	}	else if (FStrEq(szKeyName, "NoiseAmplitude"))	{		SetNoise( atoi(szValue) );	}	else if (FStrEq(szKeyName, "TextureScroll"))	{		SetScrollRate( atoi(szValue) );	}	else if (FStrEq(szKeyName, "texture"))	{		SetModelName( AllocPooledString(szValue) );	}	else	{		BaseClass::KeyValue( szKeyName, szValue );	}	return true;}
开发者ID:AluminumKen,项目名称:hl2sb-src,代码行数:28,


示例14: infected_health

//====================================================================// Creación en el mapa//====================================================================void CAP_PlayerInfected::Spawn(){	ConVarRef infected_health("sk_infected_health");	int iMaxHealth = infected_health.GetInt() + RandomInt( 1, 5 );	CB_MeleeCharacter::SetOuter( this );	BaseClass::Spawn();	// El Director será el responsable de crearnos	// Mientras tanto seremos invisibles y no nos moveremos	AddEffects( EF_NODRAW );	AddFlag( FL_FREEZING );	SetCollisionGroup( COLLISION_GROUP_NONE );	m_takedamage = DAMAGE_NO;	// Esto hará que el Director lo tome como uno de sus hijos	SetName( AllocPooledString(DIRECTOR_CHILD_NAME) );	// Seleccionamos un color para nuestra ropa	SetClothColor();	// Establecemos la salud	SetMaxHealth( iMaxHealth );	SetHealth( iMaxHealth );	// Más información	m_iNextIdleSound	= IDLE_SOUND_INTERVAL;	m_iNextAttack		= ATTACK_INTERVAL;	// Solicitamos un lugar para el Spawn	RegisterThinkContext( "RequestDirectorSpawn" );	SetContextThink( &CAP_PlayerInfected::RequestDirectorSpawn, gpGlobals->curtime, "RequestDirectorSpawn" );}
开发者ID:InfoSmart,项目名称:InSource,代码行数:36,


示例15: SetupParentsForSpawnList

void SetupParentsForSpawnList( int nEntities, HierarchicalSpawn_t *pSpawnList ){	int nEntity;	for (nEntity = nEntities - 1; nEntity >= 0; nEntity--)	{		CBaseEntity *pEntity = pSpawnList[nEntity].m_pEntity;		if ( pEntity )		{			if ( strchr(STRING(pEntity->m_iParent), ',') )			{				char szToken[256];				const char *pAttachmentName = nexttoken(szToken, STRING(pEntity->m_iParent), ',');				pEntity->m_iParent = AllocPooledString(szToken);				CBaseEntity *pParent = gEntList.FindEntityByName( NULL, pEntity->m_iParent );				// setparent in the spawn pass instead - so the model will have been set & loaded				pSpawnList[nEntity].m_pDeferredParent = pParent;				pSpawnList[nEntity].m_pDeferredParentAttachment = pAttachmentName;			}			else			{				CBaseEntity *pParent = gEntList.FindEntityByName( NULL, pEntity->m_iParent );				if ((pParent != NULL) && (pParent->edict() != NULL))				{					pEntity->SetParent( pParent ); 				}			}		}	}}
开发者ID:Adidasman1,项目名称:source-sdk-2013,代码行数:31,


示例16: UTIL_SetModel

//-----------------------------------------------------------------------------// Sets the model to be associated with an entity//-----------------------------------------------------------------------------void UTIL_SetModel( CBaseEntity *pEntity, const char *pModelName ){    // check to see if model was properly precached    int i = modelinfo->GetModelIndex( pModelName );    if ( i < 0 )    {        Error("%i - %s:  UTIL_SetModel:  not precached: %s/n", VFuncs::entindex(pEntity),            VFuncs::GetClassname(pEntity), pModelName);    }    VFuncs::SetModelIndex(pEntity, i);    VFuncs::SetModelName( pEntity, AllocPooledString( pModelName ) );    //VFuncs::SetModelName( pEntity, MAKE_STRING( pModelName ) );    // brush model    const model_t *mod = modelinfo->GetModel( i );    if ( mod )    {        Vector mins, maxs;        modelinfo->GetModelBounds( mod, mins, maxs );        SetMinMaxSize (pEntity, mins, maxs);    }    else    {        SetMinMaxSize (pEntity, vec3_origin, vec3_origin);    }}
开发者ID:kila58,项目名称:sourceop,代码行数:30,


示例17: UTIL_PrecacheOther

//-----------------------------------------------------------------------------// Purpose: // Input  : *szClassname - //			*modelName - //-----------------------------------------------------------------------------void UTIL_PrecacheOther( const char *szClassname, const char *modelName ){#if defined( PRECACHE_OTHER_ONCE )    // already done this one?, if not, mark as done    if ( !g_PrecacheOtherList.AddOrMarkPrecached( szClassname ) )        return;#endif    CBaseEntity	*pEntity = CreateEntityByName( szClassname );    if ( !pEntity )    {        Warning( "NULL Ent in UTIL_PrecacheOther for %s/n", szClassname );        return;    }    // If we have a specified model, set it before calling precache    if ( modelName && modelName[0] )    {        VFuncs::SetModelName(pEntity, AllocPooledString( modelName ) );    }        if (pEntity)        VFuncs::Precache( pEntity );    UTIL_RemoveImmediate( pEntity );}
开发者ID:kila58,项目名称:sourceop,代码行数:31,


示例18: atoi

/** * Parse KeyValue pairs */bool CFishPool::KeyValue( const char *szKeyName, const char *szValue ){	if (FStrEq( szKeyName, "fish_count" ))	{		m_fishCount = atoi(szValue);		return true;	}	else if (FStrEq( szKeyName, "max_range" ))	{		m_maxRange = atof(szValue);		if (m_maxRange <= 1.0f)		{			m_maxRange = 1.0f;		}		else if (m_maxRange > 255.0f)		{			// stay within 8 bits range			m_maxRange = 255.0f;		}		return true;	}	else if (FStrEq( szKeyName, "model" ))	{		PrecacheModel( szValue );		SetModelName( AllocPooledString( szValue ) );	}	return BaseClass::KeyValue( szKeyName, szValue );}
开发者ID:AluminumKen,项目名称:hl2sb-src,代码行数:33,


示例19: GetModelName

//-----------------------------------------------------------------------------// Purpose: //-----------------------------------------------------------------------------void CPointCommentaryNode::Spawn( void ){	// No model specified?	char *szModel = (char *)STRING( GetModelName() );	if (!szModel || !*szModel)	{		szModel = "models/extras/info_speech.mdl";		SetModelName( AllocPooledString(szModel) );	}	Precache();	SetModel( szModel );	UTIL_SetSize( this, -Vector(16,16,16), Vector(16,16,16) );	SetSolid( SOLID_BBOX );	AddSolidFlags( FSOLID_CUSTOMRAYTEST | FSOLID_CUSTOMBOXTEST );	AddEffects( EF_NOSHADOW );	// Setup for animation	ResetSequence( LookupSequence("idle") );	SetThink( &CPointCommentaryNode::SpinThink );	SetNextThink( gpGlobals->curtime + 0.1f ); 	m_iNodeNumber = 0;	m_iNodeNumberMax = 0;	SetDisabled( m_bDisabled );}
开发者ID:Bubbasacs,项目名称:FinalProj,代码行数:30,


示例20: SetModelName

//-----------------------------------------------------------------------------// Purpose: //-----------------------------------------------------------------------------void CWeaponStriderBuster::Spawn( void ){		SetModelName( AllocPooledString("models/magnusson_device.mdl") );	BaseClass::Spawn();		// Setup for being shot by the player	m_takedamage = DAMAGE_EVENTS_ONLY;	// Ignore touches until launched.	SetTouch ( NULL );	AddFlag( FL_AIMTARGET|FL_OBJECT );	m_hParticleEffect = CreateEntityByName( "info_particle_system" );	if ( m_hParticleEffect )	{		m_hParticleEffect->KeyValue( "start_active", "1" );		m_hParticleEffect->KeyValue( "effect_name", "striderbuster_smoke" );		DispatchSpawn( m_hParticleEffect );		if ( gpGlobals->curtime > 0.2f )		{			m_hParticleEffect->Activate();		}		m_hParticleEffect->SetAbsOrigin( GetAbsOrigin() );		m_hParticleEffect->SetParent( this );	}	SetHealth( striderbuster_health.GetFloat() );		SetNextThink(gpGlobals->curtime + 0.01f);}
开发者ID:FooGames,项目名称:SecobMod,代码行数:34,


示例21: GetModelName

//-----------------------------------------------------------------------------// Spawn//-----------------------------------------------------------------------------void CNPC_Kleiner::Spawn(){	// Allow custom model usage (mostly for monitors)	char *szModel = (char *)STRING( GetModelName() );	if (!szModel || !*szModel)	{		szModel = "models/kleiner.mdl";		SetModelName( AllocPooledString(szModel) );	}	Precache();	SetModel( szModel );	BaseClass::Spawn();	SetHullType(HULL_HUMAN);	SetHullSizeNormal();	SetSolid( SOLID_BBOX );	AddSolidFlags( FSOLID_NOT_STANDABLE );	SetMoveType( MOVETYPE_STEP );	SetBloodColor( BLOOD_COLOR_RED );	m_iHealth			= 8;	m_flFieldOfView		= 0.5;// indicates the width of this NPC's forward view cone ( as a dotproduct result )	m_NPCState			= NPC_STATE_NONE;		CapabilitiesAdd( bits_CAP_MOVE_GROUND | bits_CAP_OPEN_DOORS | bits_CAP_ANIMATEDFACE | bits_CAP_TURN_HEAD );	CapabilitiesAdd( bits_CAP_FRIENDLY_DMG_IMMUNE );	AddEFlags( EFL_NO_DISSOLVE | EFL_NO_MEGAPHYSCANNON_RAGDOLL | EFL_NO_PHYSCANNON_INTERACTION );	NPCInit();}
开发者ID:Adidasman1,项目名称:source-sdk-2013,代码行数:36,


示例22: Warning

//-----------------------------------------------------------------------------// Purpose: Fill out a prop's with base data parsed from the propdata file//-----------------------------------------------------------------------------int CPropData::ParsePropFromBase( CBaseEntity *pProp, const char *pszPropData ){	if ( !m_bPropDataLoaded )		return PARSE_FAILED_NO_DATA;	IBreakableWithPropData *pBreakableInterface = dynamic_cast<IBreakableWithPropData*>(pProp);		if ( !pBreakableInterface )	{		return PARSE_FAILED_BAD_DATA;	}	if ( !m_pKVPropData )	{		return PARSE_FAILED_BAD_DATA;	}		// Find the specified propdata	KeyValues *pSection = m_pKVPropData->FindKey( pszPropData );	if ( !pSection )	{		Warning("%s '%s' has a base specified as '%s', but there is no matching entry in propdata.txt./n", pProp->GetClassname(), STRING( pProp->GetModelName() ), pszPropData );		return PARSE_FAILED_BAD_DATA;	}	// Store off the first base data for debugging	if ( pBreakableInterface->GetBasePropData() == NULL_STRING )	{		pBreakableInterface->SetBasePropData( AllocPooledString( pszPropData ) );	}	return ParsePropFromKV( pProp, pSection, pSection );}
开发者ID:Adidasman1,项目名称:source-sdk-2013,代码行数:36,


示例23: 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:FooGames,项目名称:SecobMod,代码行数:30,


示例24: GetModelName

	string_t GetModelName( IPhysicsObject *pObject )	{		int i = m_PhysObjectModels.Find( pObject );		if ( i == m_PhysObjectModels.InvalidIndex() )			return NULL_STRING;		return AllocPooledString( modelinfo->GetModelName( modelinfo->GetModel( m_PhysObjectModels[i] ) ) );	}
开发者ID:BenLubar,项目名称:SwarmDirector2,代码行数:7,


示例25: Error

void C_PlayerResource::UpdatePlayerName( int slot ){	if ( slot < 1 || slot > MAX_PLAYERS )	{		Error( "UpdatePlayerName with bogus slot %d/n", slot );		return;	}	player_info_t sPlayerInfo;	if ( IsConnected( slot ) && engine->GetPlayerInfo( slot, &sPlayerInfo ) )	{		m_szName[slot] = AllocPooledString( sPlayerInfo.name );	}	else	{		m_szName[slot] = AllocPooledString( PLAYER_UNCONNECTED_NAME );	}}
开发者ID:DreikVal,项目名称:nicksproject,代码行数:17,


示例26: Assert

void C_ClientPartialRagdoll::SetRecursiveGibData( const char *pszParentName, const char *pszGoreName,	const char *pszGoreMaterialName ){	Assert( pszParentName && *pszParentName );	m_strRecursiveParent = AllocPooledString( pszParentName );	if ( pszGoreName && *pszGoreName )	{		m_strRecursiveGoreName = AllocPooledString( pszGoreName );	}	if ( pszGoreMaterialName && *pszGoreMaterialName )	{		m_strRecursiveGoreMaterialName = AllocPooledString( pszGoreMaterialName );	}}
开发者ID:Biohazard90,项目名称:g-string_2013,代码行数:17,


示例27: AllocPooledString

//-----------------------------------------------------------------------------// Purpose: // Input  :  - //-----------------------------------------------------------------------------CTFGrenadePipebombProjectile::CTFGrenadePipebombProjectile(){	m_bTouched = false;	m_flChargeTime = 0.0f;#ifdef GAME_DLL	s_iszTrainName  = AllocPooledString( "models/props_vehicles/train_enginecar.mdl" );#endif}
开发者ID:hitmen047,项目名称:TF2HLCoop,代码行数:12,


示例28: ClientPutInServer

/*===========ClientPutInServercalled each time a player is spawned into the game============*/void ClientPutInServer( edict_t *pEdict, const char *playername ){	// Allocate a CBasePlayer for pev, and call spawn	CHL1_Player *pPlayer = CHL1_Player::CreatePlayer( "player", pEdict );	pPlayer->InitialSpawn();	pPlayer->PlayerData()->netname = AllocPooledString( playername );	pPlayer->Spawn();}
开发者ID:RaisingTheDerp,项目名称:raisingthebar,代码行数:15,


示例29: AllocPooledString

//=========================================================// Inicialización//=========================================================void CDirector_Manager::Init(){	for ( int i = 0; i < NELEMS(pChilds); ++i )		pChilds[i].psChildName = AllocPooledString(pChilds[i].pChildName);	SpawnNodes.Purge();	CandidateUpdateTimer.Invalidate();}
开发者ID:InfoSmart,项目名称:InSource-Singleplayer,代码行数:11,



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


C++ AllocSetContextCreate函数代码示例
C++ AllocMemory函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。