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

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

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

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

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

示例1: GetEntityName

// Lists all doors in the same movement group as this oneint CBaseDoor::GetDoorMovementGroup( CBaseDoor *pDoorList[], int listMax ){	int count = 0;	CBaseEntity	*pTarget = NULL;	// Block all door pieces with the same targetname here.	if ( GetEntityName() != NULL_STRING )	{		for (;;)		{			pTarget = gEntList.FindEntityByName( pTarget, GetEntityName(), NULL );			if ( pTarget != this )			{				if ( !pTarget )					break;				CBaseDoor *pDoor = dynamic_cast<CBaseDoor *>(pTarget);				if ( pDoor && count < listMax )				{					pDoorList[count] = pDoor;					count++;				}			}		}	}	return count;}
开发者ID:KyleGospo,项目名称:City-17-Episode-One-Source,代码行数:31,


示例2: Warning

//-----------------------------------------------------------------------------// Purpose: //-----------------------------------------------------------------------------void CPropCrane::Activate( void ){	BaseClass::Activate();	// If we load a game, we don't need to set this all up again.	if ( m_hCraneMagnet )		return;	// Find our magnet	if ( m_iszMagnetName == NULL_STRING )	{		Warning( "prop_vehicle_crane %s has no magnet entity specified!/n", STRING(GetEntityName()) );		UTIL_Remove( this );		return;	}	m_hCraneMagnet = dynamic_cast<CPhysMagnet *>(gEntList.FindEntityByName( NULL, STRING(m_iszMagnetName) ));	if ( !m_hCraneMagnet )	{		Warning( "prop_vehicle_crane %s failed to find magnet %s./n", STRING(GetEntityName()), STRING(m_iszMagnetName) );		UTIL_Remove( this );		return;	}	// We want the magnet to cast a long shadow	m_hCraneMagnet->SetShadowCastDistance( 2048 );	// Create our constraint group	constraint_groupparams_t group;	group.Defaults();	m_pConstraintGroup = physenv->CreateConstraintGroup( group );	m_hCraneMagnet->SetConstraintGroup( m_pConstraintGroup );	// Create our crane tip	Vector vecOrigin;	QAngle vecAngles;	GetCraneTipPosition( &vecOrigin, &vecAngles );	m_hCraneTip = CCraneTip::Create( m_hCraneMagnet, m_pConstraintGroup, vecOrigin, vecAngles );	if ( !m_hCraneTip )	{		UTIL_Remove( this );		return;	}	m_pConstraintGroup->Activate();	// Make a rope to connect 'em	int iIndex = m_hCraneMagnet->LookupAttachment("magnetcable_a");	m_hRope = CRopeKeyframe::Create( this, m_hCraneMagnet, 1, iIndex );	if ( m_hRope )	{		m_hRope->m_Width = 3;		m_hRope->m_nSegments = ROPE_MAX_SEGMENTS / 2;		m_hRope->EnableWind( false );		m_hRope->SetupHangDistance( 0 );		m_hRope->m_RopeLength = (m_hCraneMagnet->GetAbsOrigin() - m_hCraneTip->GetAbsOrigin()).Length() * 1.1;	}	// Start with the magnet off	TurnMagnetOff();}
开发者ID:Adidasman1,项目名称:source-sdk-2013,代码行数:63,


示例3: GetAbsOrigin

bool CFuncLadderEndPoint::Validate(){	// Find the the other end	Vector startPos = GetAbsOrigin();		CFuncLadderEndPoint *other = dynamic_cast< CFuncLadderEndPoint * >( GetNextTarget() );	if ( !other )	{		DevMsg( 1, "func_ladderendpoint(%s) without matching target/n", STRING(GetEntityName()) );		return false;	}	Vector endPos = other->GetAbsOrigin();	CFuncLadder *ladder = ( CFuncLadder * )CreateEntityByName( "func_useableladder" );	if ( ladder )	{		ladder->SetEndPoints( startPos, endPos );		ladder->SetAbsOrigin( GetAbsOrigin() );		ladder->SetParent( GetParent() );		ladder->SetName( GetEntityName() );		ladder->Spawn();	}	// Delete both endpoints	UTIL_Remove( other );	UTIL_Remove( this );	return true;}
开发者ID:paralin,项目名称:hl2sdk,代码行数:30,


示例4: Put

static void Put( const char *name, const TNetInputValue &value ){	FILE *fout = 0;	if (dump)	{		fout = fopen("netinput.log", "at");	}	FILETIME tm;	GetSystemTimeAsFileTime(&tm);	ITextModeConsole *pTMC = gEnv->pSystem->GetITextModeConsole();	if (lastFrame != gEnv->pRenderer->GetFrameID())	{		ypos = 0;		lastFrame = gEnv->pRenderer->GetFrameID();		tstamp = (uint64(tm.dwHighDateTime) << 32) | tm.dwLowDateTime;	}	float white[] = {1, 1, 1, 1};	char buf[256];	if (const Vec3 *pVec = value.GetPtr<Vec3>())	{		sprintf(buf, "%s: %f %f %f", name, pVec->x, pVec->y, pVec->z);		gEnv->pRenderer->Draw2dLabel(10.f, (float)(ypos += 20), 2.f, white, false, "%s", buf);		if (pTMC)		{			pTMC->PutText( 0, ypos / 20, buf );		}		if (fout)		{			fprintf(fout, "%I64d %s %s %f %f %f/n", tstamp, GetEntityName(), name, pVec->x, pVec->y, pVec->z);		}	}	else if (const float *pFloat = value.GetPtr<float>())	{		sprintf(buf, "%s: %f", name, *pFloat);		gEnv->pRenderer->Draw2dLabel(10.f, (float)(ypos += 20), 2, white, false, "%s", buf);		if (pTMC)		{			pTMC->PutText( 0, ypos / 20, buf );		}		if (fout)		{			fprintf(fout, "%I64d %s %s %f/n", tstamp, GetEntityName(), name, *pFloat);		}	}	if (fout)	{		fclose(fout);	}}
开发者ID:Oliverreason,项目名称:bare-minimum-cryengine3,代码行数:59,


示例5: SetThink

//-----------------------------------------------------------------------------// Purpose: //-----------------------------------------------------------------------------void CEnvBeam::Spawn( void ){	if ( !m_iszSpriteName )	{		SetThink( &CEnvBeam::SUB_Remove );		return;	}	BaseClass::Spawn();	m_noiseAmplitude = MIN(MAX_BEAM_NOISEAMPLITUDE, m_noiseAmplitude);	// Check for tapering	if ( HasSpawnFlags( SF_BEAM_TAPEROUT ) )	{		SetWidth( m_boltWidth );		SetEndWidth( 0 );	}	else	{		SetWidth( m_boltWidth );		SetEndWidth( GetWidth() );	// Note: EndWidth is not scaled	}	if ( ServerSide() )	{		SetThink( &CEnvBeam::UpdateThink );		SetNextThink( gpGlobals->curtime );		SetFireTime( gpGlobals->curtime );		if ( GetEntityName() != NULL_STRING )		{			if ( !(m_spawnflags & SF_BEAM_STARTON) )			{				AddEffects( EF_NODRAW );				m_active = 0;				SetNextThink( TICK_NEVER_THINK );			}			else			{				m_active = 1;			}		}	}	else	{		m_active = 0;		if ( !GetEntityName() || FBitSet(m_spawnflags, SF_BEAM_STARTON) )		{			SetThink( &CEnvBeam::StrikeThink );			SetNextThink( gpGlobals->curtime + 1.0f );		}	}}
开发者ID:xxauroraxx,项目名称:Source.Python,代码行数:58,


示例6: FindGround

void CStructure::StartTurn(){	BaseClass::StartTurn();	FindGround();	if (!GetSupplier() && !dynamic_cast<CCPU*>(this))	{		if (GetPlayerOwner())			GetPlayerOwner()->RemoveUnit(this);		SetSupplier(NULL);	}	if (GetSupplier() && !GetSupplier()->GetPlayerOwner())	{		GetSupplier()->RemoveChild(this);		if (GetPlayerOwner())			GetPlayerOwner()->RemoveUnit(this);		SetSupplier(NULL);	}	if (GetPlayerOwner() == NULL)		return;	if (IsConstructing())	{		m_iTurnsToConstruct--;		if (m_iTurnsToConstruct == (size_t)0)		{			GetDigitanksPlayer()->AppendTurnInfo(tstring("Construction finished on ") + GetEntityName());			CompleteConstruction();			GetDigitanksPlayer()->AddActionItem(this, ACTIONTYPE_NEWSTRUCTURE);		}		else			GetDigitanksPlayer()->AppendTurnInfo(tsprintf(tstring("Constructing ") + GetEntityName() + " (%d turns left)", m_iTurnsToConstruct.Get()));	}	if (IsUpgrading())	{		m_iTurnsToUpgrade--;		if (m_iTurnsToUpgrade == (size_t)0)		{			GetDigitanksPlayer()->AppendTurnInfo(GetEntityName() + " finished upgrading.");			UpgradeComplete();		}		else			GetDigitanksPlayer()->AppendTurnInfo(tsprintf(tstring("Upgrading ") + GetEntityName() + " (%d turns left)", GetTurnsToUpgrade()));	}}
开发者ID:BSVino,项目名称:Digitanks,代码行数:53,


示例7: dsp_speaker

//-----------------------------------------------------------------------------// Purpose: If we've got a speaker, add ourselves to the list of microphones that want to listen//-----------------------------------------------------------------------------void CEnvMicrophone::ActivateSpeaker( void ){	// If we're enabled, set the dsp_speaker preset to my specified one	if ( !m_bDisabled )	{		ConVarRef dsp_speaker( "dsp_speaker" );		if ( dsp_speaker.IsValid() )		{			int iDSPPreset = m_iSpeakerDSPPreset;			if ( !iDSPPreset )			{				// Reset it to the default				iDSPPreset = atoi( dsp_speaker.GetDefault() );			}			DevMsg( 2, "Microphone %s set dsp_speaker to %d./n", STRING(GetEntityName()), iDSPPreset);			dsp_speaker.SetValue( m_iSpeakerDSPPreset );		}	}	if ( m_iszSpeakerName != NULL_STRING )	{		// We've got a speaker to play heard sounds through. To do this, we need to add ourselves 		// to the list of microphones who want to be told whenever a sound is played.		if ( s_Microphones.Find(this) == -1 )		{			s_Microphones.AddToTail( this );		}	}}
开发者ID:xxauroraxx,项目名称:Source.Python,代码行数:32,


示例8: Warning

//-----------------------------------------------------------------------------// Purpose: Pick up a specified object// Input  : &inputdata - //-----------------------------------------------------------------------------void CNPC_CombineDropship::InputPickup( inputdata_t &inputdata ){	// Can't pickup if we're already carrying something	if ( m_hContainer )	{		Warning("npc_combinedropship %s was told to pickup, but is already carrying something./n", STRING(GetEntityName()) );		return;	}	string_t iszTargetName = inputdata.value.StringID();	if ( iszTargetName == NULL_STRING )	{		Warning("npc_combinedropship %s tried to pickup with no specified pickup target./n", STRING(GetEntityName()) );		return;	}	CBaseEntity *pTarget = gEntList.FindEntityByName( NULL, iszTargetName, NULL );	if ( !pTarget )	{		Warning("npc_combinedropship %s couldn't find pickup target named %s/n", STRING(GetEntityName()), STRING(iszTargetName) );		return;	}	// Start heading to the point	m_hPickupTarget = pTarget;	// Disable collisions to my target	m_hPickupTarget->SetOwnerEntity(this);	if ( m_NPCState == NPC_STATE_IDLE )	{		SetState( NPC_STATE_ALERT );	}	m_iLandState = LANDING_SWOOPING;	m_flLandingSpeed = GetAbsVelocity().Length();}
开发者ID:RaisingTheDerp,项目名称:raisingthebar,代码行数:37,


示例9: Warning

//-----------------------------------------------------------------------------// Purpose: //-----------------------------------------------------------------------------void CNPC_VehicleDriver::InputGotoPathCorner( inputdata_t &inputdata ){	string_t iszPathName = inputdata.value.StringID();	if ( iszPathName != NULL_STRING )	{		CBaseEntity *pEntity = gEntList.FindEntityByName( NULL, iszPathName );		if ( !pEntity )		{			Warning("npc_vehicledriver %s couldn't find entity named %s/n", STRING(GetEntityName()), STRING(iszPathName) );			return;		}		ClearWaypoints();		// Drive to the point		SetGoalEnt( pEntity );		if ( m_NPCState == NPC_STATE_IDLE )		{			SetState( NPC_STATE_ALERT );		}		SetCondition( COND_PROVOKED );		// Force him to start forward		InputStartForward( inputdata );	}}
开发者ID:BenLubar,项目名称:SwarmDirector2,代码行数:29,


示例10: switch

void CWorldItem::Spawn( void ){	CBaseEntity *pEntity = NULL;	switch (m_iType) 	{	case 44: // ITEM_BATTERY:		pEntity = CBaseEntity::Create( "item_battery", GetLocalOrigin(), GetLocalAngles() );		break;	case 45: // ITEM_SUIT:		pEntity = CBaseEntity::Create( "item_suit", GetLocalOrigin(), GetLocalAngles() );		break;	}	if (!pEntity)	{		Warning("unable to create world_item %d/n", m_iType );	}	else	{		pEntity->m_target = m_target;		pEntity->SetName( GetEntityName() );		pEntity->ClearSpawnFlags();		pEntity->AddSpawnFlags( m_spawnflags );	}	UTIL_RemoveImmediate( this );}
开发者ID:Randdalf,项目名称:bliink,代码行数:28,


示例11: SetMoveType

void CFuncBrush::Spawn( void ){	SetMoveType( MOVETYPE_PUSH );  // so it doesn't get pushed by anything	SetSolid( SOLID_VPHYSICS );	AddEFlags( EFL_USE_PARTITION_WHEN_NOT_SOLID );	if ( m_iSolidity == BRUSHSOLID_NEVER )	{		AddSolidFlags( FSOLID_NOT_SOLID );	}	SetModel( STRING( GetModelName() ) );	if ( m_iDisabled )		TurnOff();		// If it can't move/go away, it's really part of the world	if ( !GetEntityName() || !m_iParent )		AddFlag( FL_WORLDBRUSH );	CreateVPhysics();	// Slam the object back to solid - if we really want it to be solid.	if ( m_bSolidBsp )	{		SetSolid( SOLID_BSP );	}}
开发者ID:Bubbasacs,项目名称:FinalProj,代码行数:29,


示例12: DevMsg

void CPoseController::InputGetFMod( inputdata_t &inputdata ){	DevMsg( "FMod values for pose controller %s/nTYPE: %i/nTIME OFFSET: %f/nRATE: %f/nAMPLITUDE: %f/n", 			STRING(GetEntityName()), 			m_nFModType.Get(), 			m_fFModTimeOffset.Get(), 			m_fFModRate.Get(), 			m_fFModAmplitude.Get() );}
开发者ID:SizzlingStats,项目名称:hl2sdk-ob-valve,代码行数:9,


示例13: Activate

//-----------------------------------------------------------------------------// Activate!//-----------------------------------------------------------------------------void CPathTrack::Activate( void ){	BaseClass::Activate();	if ( GetEntityName() != NULL_STRING )		// Link to next, and back-link	{		Link();	}}
开发者ID:AluminumKen,项目名称:hl2sb-src,代码行数:12,


示例14: Warning

void CTemplateNPCMaker::Precache(){	BaseClass::Precache();	if ( !m_iszTemplateData )	{		//		// This must be the first time we're activated, not a load from save game.		// Look up the template in the template database.		//		if (!m_iszTemplateName)		{			Warning( "npc_template_maker %s has no template NPC!/n", STRING(GetEntityName()) );			UTIL_Remove( this );			return;		}		else		{			m_iszTemplateData = Templates_FindByTargetName(STRING(m_iszTemplateName));			if ( m_iszTemplateData == NULL_STRING )			{				DevWarning( "npc_template_maker %s: template NPC %s not found!/n", STRING(GetEntityName()), STRING(m_iszTemplateName) );				UTIL_Remove( this );				return;			}		}	}	Assert( m_iszTemplateData != NULL_STRING );	// If the mapper marked this as "preload", then instance the entity preache stuff and delete the entity	//if ( !HasSpawnFlags(SF_NPCMAKER_NOPRELOADMODELS) )	if ( m_iszTemplateData != NULL_STRING )	{		CBaseEntity *pEntity = NULL;		MapEntity_ParseEntity( pEntity, STRING(m_iszTemplateData), NULL );		if ( pEntity != NULL )		{			PrecacheTemplateEntity( pEntity );			UTIL_RemoveImmediate( pEntity );		}	}}
开发者ID:Adidasman1,项目名称:source-sdk-2013,代码行数:43,


示例15: Warning

//-----------------------------------------------------------------------------// Purpose: // Input  : &inputdata - //-----------------------------------------------------------------------------void CEnvScreenOverlay::InputStartOverlay( inputdata_t &inputdata ){	if ( m_iszOverlayNames[0] == NULL_STRING )	{		Warning("env_screenoverlay %s has no overlays to display./n", STRING(GetEntityName()) );		return;	}	m_flStartTime = gpGlobals->curtime;}
开发者ID:RaisingTheDerp,项目名称:raisingthebar,代码行数:14,


示例16: STRING

//-----------------------------------------------------------------------------// Precache //-----------------------------------------------------------------------------void CParticleSystem::Precache( void ){	const char *pParticleSystemName = STRING( m_iszEffectName );	if ( pParticleSystemName == NULL || pParticleSystemName[0] == 0 )	{		Warning( "info_particle_system (%s) has no particle system name specified!/n", GetEntityName().ToCStr() );	}	PrecacheParticleSystem( pParticleSystemName );}
开发者ID:SizzlingStats,项目名称:hl2sdk-ob-valve,代码行数:13,


示例17: GetEntityName

//-----------------------------------------------------------------------------//-----------------------------------------------------------------------------void CEnvInstructorHint::InputEndHint( inputdata_t &inputdata ){	static int s_InstructorServerHintEventStop = 0;	IGameEvent * event = gameeventmanager->CreateEvent( "instructor_server_hint_stop", false, &s_InstructorServerHintEventStop );	if ( event )	{		event->SetString( "hint_name", GetEntityName().ToCStr() );		gameeventmanager->FireEvent( event );	}}
开发者ID:BenLubar,项目名称:SwarmDirector2,代码行数:13,


示例18: STRING

//-----------------------------------------------------------------------------// Purpose: //-----------------------------------------------------------------------------CPointTemplate *CEnvEntityMaker::FindTemplate(){	// Find our point_template	CPointTemplate *pTemplate = dynamic_cast<CPointTemplate *>(gEntList.FindEntityByName( NULL, STRING(m_iszTemplate) ));	if ( !pTemplate )	{		Warning( "env_entity_maker %s failed to find template %s./n", GetEntityName().ToCStr(), STRING(m_iszTemplate) );	}	return pTemplate;}
开发者ID:Au-heppa,项目名称:swarm-sdk,代码行数:14,


示例19: GetEntityName

void CDialogueManager::InputStartDialogue(inputdata_t &inputData){	// If our options have been disabled we don't care anymore:	if (!m_bOptionAvailable[0] && !m_bOptionAvailable[1] && !m_bOptionAvailable[2])		return;	OnStartDialogue.FireOutput(this, this);	// Run Event here:	g_pGameRules->StartDialogueScene(szDialogueScene.ToCStr(), GetEntityName().ToCStr(), m_bOptionAvailable[0], m_bOptionAvailable[1], m_bOptionAvailable[2]);}
开发者ID:BerntA,项目名称:tfo-code,代码行数:11,


示例20: Warning

void CEnvScreenOverlay::InputStopOverlay( inputdata_t &inputdata ){	if ( m_iszOverlayNames[0] == NULL_STRING )	{		Warning("env_screenoverlay %s has no overlays to display./n", STRING(GetEntityName()) );		return;	}	m_flStartTime = -1;	m_bIsActive = false; }
开发者ID:Adidasman1,项目名称:source-sdk-2013,代码行数:11,


示例21: GetDoorMovementGroup

//-----------------------------------------------------------------------------// Purpose: //-----------------------------------------------------------------------------void CBaseDoor::Activate( void ){	BaseClass::Activate();	CBaseDoor *pDoorList[64];	m_bDoorGroup = true;	// force movement groups to sync!!!	int doorCount = GetDoorMovementGroup( pDoorList, ARRAYSIZE(pDoorList) );	for ( int i = 0; i < doorCount; i++ )	{		if ( pDoorList[i]->m_vecMoveDir == m_vecMoveDir )		{			bool error = false;			if ( pDoorList[i]->IsRotatingDoor() )			{				error = ( pDoorList[i]->GetLocalAngles() != GetLocalAngles() ) ? true : false;			}			else 			{				error = ( pDoorList[i]->GetLocalOrigin() != GetLocalOrigin() ) ? true : false;			}			if ( error )			{				// don't do group blocking				m_bDoorGroup = false;#ifdef HL1_DLL				// UNDONE: This should probably fixup m_vecPosition1 & m_vecPosition2				Warning("Door group %s has misaligned origin!/n", STRING(GetEntityName()) );#endif			}		}	}		switch ( m_toggle_state )	{	case TS_AT_TOP:		UpdateAreaPortals( true );		break;	case TS_AT_BOTTOM:		UpdateAreaPortals( false );		break;	default:		break;	}#ifdef HL1_DLL	// Get a handle to my filter entity if there is one	if (m_iBlockFilterName != NULL_STRING)	{		m_hBlockFilter = dynamic_cast<CBaseFilter *>(gEntList.FindEntityByName( NULL, m_iBlockFilterName, NULL ));	}#endif}
开发者ID:xxauroraxx,项目名称:Source.Python,代码行数:57,


示例22: Warning

//-----------------------------------------------------------------------------// Purpose: //-----------------------------------------------------------------------------void CNPC_CraneDriver::Activate( void ){	BaseClass::Activate();	m_hCrane = dynamic_cast<CPropCrane*>((CBaseEntity*)m_hVehicleEntity);	if ( !m_hCrane )	{		Warning( "npc_cranedriver %s couldn't find his crane named %s./n", STRING(GetEntityName()), STRING(m_iszVehicleName) );		UTIL_Remove( this );		return;	}}
开发者ID:RaisingTheDerp,项目名称:raisingthebar,代码行数:15,


示例23: AssertMsg

//-----------------------------------------------------------------------------// Purpose: //-----------------------------------------------------------------------------void CGameUI::Deactivate( CBaseEntity *pActivator ){	CBasePlayer *pPlayer = m_player;	AssertMsg(pPlayer, "CGameUI deactivated without a player!");	if (pPlayer)	{		// Re-enable player motion		if ( FBitSet( m_spawnflags, SF_GAMEUI_FREEZE_PLAYER ) )		{			m_player->RemoveFlag( FL_ATCONTROLS );		}		// Restore weapons		if ( FBitSet( m_spawnflags, SF_GAMEUI_HIDE_WEAPON ) )		{			// Turn the hud back on			pPlayer->m_Local.m_iHideHUD &= ~HIDEHUD_WEAPONSELECTION;			if ( m_hSaveWeapon.Get() )			{				m_player->Weapon_Switch( m_hSaveWeapon.Get() );				m_hSaveWeapon = NULL;			}			if ( pPlayer->GetActiveWeapon() )			{				pPlayer->GetActiveWeapon()->Deploy();			}		}		// Announce that the player is no longer controlling through us		m_playerOff.FireOutput( pPlayer, this, 0 );		// Clear out the axis controls		m_xaxis.Set( 0, pPlayer, this );		m_yaxis.Set( 0, pPlayer, this );		m_attackaxis.Set( 0, pPlayer, this );		m_attack2axis.Set( 0, pPlayer, this );		m_nLastButtonState = 0;		m_player = NULL;	}	else	{		Warning("%s Deactivate(): I have no player when called by %s!/n", GetEntityName().ToCStr(), pActivator->GetEntityName().ToCStr());	}		// Stop thinking	SetNextThink( TICK_NEVER_THINK );}
开发者ID:0xFEEDC0DE64,项目名称:UltraGame,代码行数:54,


示例24: VPhysicsGetObject

//-----------------------------------------------------------------------------// Purpose: Input handler for setting the breakable's mass.//-----------------------------------------------------------------------------void CBreakable::InputSetMass( inputdata_t &inputdata ){	IPhysicsObject * vPhys = VPhysicsGetObject();	if ( vPhys )	{		float toMass = inputdata.value.Float();		Assert(toMass > 0);		vPhys->SetMass( toMass );	}	else	{		Warning( "Tried to call SetMass() on %s but it has no physics./n", GetEntityName().ToCStr() );	}}
开发者ID:Biohazard90,项目名称:g-string_2013,代码行数:17,


示例25: abs

void CEnvScreenOverlay::InputSwitchOverlay( inputdata_t &inputdata ){	int iNewOverlay = inputdata.value.Int() - 1;	iNewOverlay = abs( iNewOverlay );	if ( m_iszOverlayNames[iNewOverlay] == NULL_STRING )	{		Warning("env_screenoverlay %s has no overlays to display./n", STRING(GetEntityName()) );		return;	}	m_iDesiredOverlay = iNewOverlay;	m_flStartTime = gpGlobals->curtime;}
开发者ID:Adidasman1,项目名称:source-sdk-2013,代码行数:14,


示例26: STRING

//-----------------------------------------------------------------------------// Purpose: Precache the target NPC//-----------------------------------------------------------------------------void CNPCMaker::Precache( void ){	BaseClass::Precache();	const char *pszNPCName = STRING( m_iszNPCClassname );	if ( !pszNPCName || !pszNPCName[0] )	{		Warning("npc_maker %s has no specified NPC-to-spawn classname./n", STRING(GetEntityName()) );	}	else	{		UTIL_PrecacheOther( pszNPCName );	}}
开发者ID:Adidasman1,项目名称:source-sdk-2013,代码行数:17,


示例27: Activate

void CProjectedDecal::Activate(){	BaseClass::Activate();	if ( !GetEntityName() )	{		StaticDecal();	}	else	{		// if there IS a targetname, the decal sprays itself on when it is triggered.		SetThink ( &CProjectedDecal::SUB_DoNothing );		SetUse(&CProjectedDecal::TriggerDecal);	}}
开发者ID:DeadFuze,项目名称:swarm-sdk,代码行数:15,



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


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