这篇教程C++ GetDebugName函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中GetDebugName函数的典型用法代码示例。如果您正苦于以下问题:C++ GetDebugName函数的具体用法?C++ GetDebugName怎么用?C++ GetDebugName使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了GetDebugName函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: TEXTvoid AAIController::GrabDebugSnapshot(FVisualLogEntry* Snapshot) const{ FVisualLogStatusCategory MyCategory; MyCategory.Category = TEXT("AI Controller"); MyCategory.Add(TEXT("Pawn"), GetNameSafe(GetPawn())); AActor* FocusActor = GetFocusActor(); MyCategory.Add(TEXT("Focus"), GetDebugName(FocusActor)); if (FocusActor == nullptr) { MyCategory.Add(TEXT("Focus Location"), TEXT_AI_LOCATION(GetFocalPoint())); } Snapshot->Status.Add(MyCategory); if (GetPawn()) { Snapshot->Location = GetPawn()->GetActorLocation(); } if (PathFollowingComponent) { PathFollowingComponent->DescribeSelfToVisLog(Snapshot); } if (BrainComponent != NULL) { BrainComponent->DescribeSelfToVisLog(Snapshot); } if (PerceptionComponent != NULL) { PerceptionComponent->DescribeSelfToVisLog(Snapshot); }}
开发者ID:Foreven,项目名称:Unreal4-1,代码行数:34,
示例2: GetNextTarget//------------------------------------------------------------------------------// Purpose://------------------------------------------------------------------------------void CPointTeleport::Activate( void ){ CBaseEntity *pTarget = GetNextTarget(); if (pTarget) { if ( pTarget->GetMoveParent() != NULL ) { Warning("ERROR: (%s) can't teleport object (%s) as it has a parent!/n",GetDebugName(),pTarget->GetDebugName()); return; } if (m_spawnflags & SF_TELEPORT_TO_SPAWN_POS) { m_vSaveOrigin = pTarget->GetAbsOrigin(); m_vSaveAngles = pTarget->GetAbsAngles(); } else { m_vSaveOrigin = GetAbsOrigin(); m_vSaveAngles = GetAbsAngles(); } } else { Warning("ERROR: (%s) given no target. Deleting./n",GetDebugName()); UTIL_Remove(this); return; } BaseClass::Activate();}
开发者ID:RaisingTheDerp,项目名称:raisingthebar,代码行数:33,
示例3: DevWarning//-----------------------------------------------------------------------------// Purpose: //-----------------------------------------------------------------------------void CAI_Relationship::Spawn(){ m_bIsActive = false; if (m_iszSubject == NULL_STRING) { DevWarning("ai_relationship '%s' with no subject specified, removing./n", GetDebugName()); UTIL_Remove(this); } else if (m_target == NULL_STRING) { DevWarning("ai_relationship '%s' with no target specified, removing./n", GetDebugName()); UTIL_Remove(this); }}
开发者ID:AluminumKen,项目名称:hl2sb-src,代码行数:18,
示例4: SetThink//---------------------------------------------------------//---------------------------------------------------------void CAI_RadialLinkController::Activate(){ BaseClass::Activate(); m_bAtRest = false; m_vecAtRestOrigin = vec3_invalid; // Force re-evaluation SetThink( &CAI_RadialLinkController::PollMotionThink ); // Spread think times out. SetNextThink( gpGlobals->curtime + random->RandomFloat( 0.0f, 1.0f) ); if( GetParent() != NULL ) { float flDist = GetAbsOrigin().DistTo( GetParent()->GetAbsOrigin() ); if( flDist > 200.0f ) { // Warn at the console if a link controller is far away from its parent. This // most likely means that a level designer has copied an entity without researching its hierarchy. DevMsg("RadialLinkController (%s) is far from its parent!/n", GetDebugName() ); } }}
开发者ID:BenLubar,项目名称:riflemod,代码行数:27,
示例5: cbMessageBox//------------------------------------------------------------------------------void WizCompilerPanel::OnPageChanging(wxWizardEvent& event){ if (event.GetDirection() != 0) // !=0 forward, ==0 backward { if (GetCompilerID().IsEmpty()) { cbMessageBox(_("You must select a compiler for your project..."), _("Error"), wxICON_ERROR, GetParent()); event.Veto(); return; } if (m_AllowConfigChange && !GetWantDebug() && !GetWantRelease()) { cbMessageBox(_("You must select at least one configuration..."), _("Error"), wxICON_ERROR, GetParent()); event.Veto(); return; } if (m_AllowConfigChange) { ConfigManager* cfg = Manager::Get()->GetConfigManager(_T("scripts")); cfg->Write(_T("/generic_wizard/want_debug"), (bool)GetWantDebug()); cfg->Write(_T("/generic_wizard/debug_name"), GetDebugName()); cfg->Write(_T("/generic_wizard/debug_output"), GetDebugOutputDir()); cfg->Write(_T("/generic_wizard/debug_objects_output"), GetDebugObjectOutputDir()); cfg->Write(_T("/generic_wizard/want_release"), (bool)GetWantRelease()); cfg->Write(_T("/generic_wizard/release_name"), GetReleaseName()); cfg->Write(_T("/generic_wizard/release_output"), GetReleaseOutputDir()); cfg->Write(_T("/generic_wizard/release_objects_output"), GetReleaseObjectOutputDir()); } } WizPageBase::OnPageChanging(event); // let the base class handle it too}
开发者ID:stahta01,项目名称:codeblocks_r7456,代码行数:35,
示例6: DevMsg//-----------------------------------------------------------------------------//----------------------------------------------------------------------------- void CAI_OperatorGoal::EnableGoal( CAI_BaseNPC *pAI ){ CAI_OperatorBehavior *pBehavior; if ( !pAI->GetBehavior( &pBehavior ) ) { return; } CBaseEntity *pPosition = gEntList.FindEntityByName(NULL, m_target); if( !pPosition ) { DevMsg("ai_goal_operator called %s with invalid position ent!/n", GetDebugName() ); return; } CBaseEntity *pContextTarget = NULL; if( m_iszContextTarget != NULL_STRING ) { pContextTarget = gEntList.FindEntityByName( NULL, m_iszContextTarget ); } pBehavior->SetParameters(this, pPosition, pContextTarget);}
开发者ID:Black-Stormy,项目名称:DoubleAction,代码行数:29,
示例7: DevMsg//-----------------------------------------------------------------------------// Purpose: Called after all entities have spawned on new map or savegame load.//-----------------------------------------------------------------------------void CPointAngleSensor::Activate(void){ BaseClass::Activate(); if (!m_hTargetEntity) { m_hTargetEntity = gEntList.FindEntityByName( NULL, m_target ); } if (!m_hLookAtEntity && (m_nLookAtName != NULL_STRING)) { m_hLookAtEntity = gEntList.FindEntityByName( NULL, m_nLookAtName ); if (!m_hLookAtEntity) { DevMsg(1, "Angle sensor '%s' could not find look at entity '%s'./n", GetDebugName(), STRING(m_nLookAtName)); } } // It's okay to not have a look at entity, it just means we measure and output the angles // of the target entity without testing them against the look at entity. if (!m_bDisabled && m_hTargetEntity) { SetNextThink( gpGlobals->curtime ); }}
开发者ID:Bubbasacs,项目名称:FinalProj,代码行数:28,
示例8: GetAbsOrigin//------------------------------------------------------------------------------// Purpose : Updates network link state if dynamic link state has changed// Input :// Output ://------------------------------------------------------------------------------void CAI_DynamicLink::SetLinkState(void){ if ( !gm_bInitialized ) { // Safe to quietly return. Consistency will be enforced when InitDynamicLinks() is called return; } if (m_nSrcID == NO_NODE || m_nDestID == NO_NODE) { Vector pos = GetAbsOrigin(); DevWarning("ERROR: Dynamic link at %f %f %f pointing to invalid node ID!!/n", pos.x, pos.y, pos.z); return; } // ------------------------------------------------------------------ // Now update the node links... // Nodes share links so we only have to find the node from the src // For now just using one big AINetwork so find src node on that network // ------------------------------------------------------------------ CAI_Node *pSrcNode = g_pBigAINet->GetNode( m_nSrcID, false ); if ( !pSrcNode ) return; CAI_Link* pLink = FindLink(); if ( !pLink ) { DevMsg("Dynamic Link Error: (%s) unable to form between nodes %d and %d/n", GetDebugName(), m_nSrcID, m_nDestID ); return; } pLink->m_pDynamicLink = this; if (m_nLinkState == LINK_OFF) { pLink->m_LinkInfo |= bits_LINK_OFF; } else { pLink->m_LinkInfo &= ~bits_LINK_OFF; } if ( m_bPreciseMovement ) { pLink->m_LinkInfo |= bits_LINK_PRECISE_MOVEMENT; } else { pLink->m_LinkInfo &= ~bits_LINK_PRECISE_MOVEMENT; } if ( m_nPriority == 0 ) { pLink->m_LinkInfo &= ~bits_PREFER_AVOID; } else { pLink->m_LinkInfo |= bits_PREFER_AVOID; }}
开发者ID:BenLubar,项目名称:riflemod,代码行数:64,
示例9: definedbool bf_write::WriteBits(const void *pInData, int nBits){#if defined( BB_PROFILING ) VPROF( "bf_write::WriteBits" );#endif unsigned char *pOut = (unsigned char*)pInData; int nBitsLeft = nBits; if((m_iCurBit+nBits) > m_nDataBits) { SetOverflowFlag(); CallErrorHandler( BITBUFERROR_BUFFER_OVERRUN, GetDebugName() ); return false; } // Get output dword-aligned. while(((unsigned long)pOut & 3) != 0 && nBitsLeft >= 8) { WriteUBitLong( *pOut, 8, false ); ++pOut; nBitsLeft -= 8; } // check if we can use fast memcpy if m_iCurBit is byte aligned if ( (nBitsLeft >= 32) && (m_iCurBit & 7) == 0 ) { int numbytes = (nBitsLeft >> 3); int numbits = numbytes << 3; // Bounds checking.. // TODO: May not need this check anymore if((m_iCurBit+numbits) > m_nDataBits) { m_iCurBit = m_nDataBits; SetOverflowFlag(); CallErrorHandler( BITBUFERROR_BUFFER_OVERRUN, GetDebugName() ); return false; } Q_memcpy( m_pData+(m_iCurBit>>3), pOut, numbytes ); pOut += numbytes; nBitsLeft -= numbits; m_iCurBit += numbits; }
开发者ID:paralin,项目名称:hl2sdk,代码行数:46,
示例10: GetDebugNameint CDialogSession::ScheduleNextLine(float dt){ m_bHaveSchedule = true; m_nextTimeDelay = dt; ++m_nextScriptLine; if (m_nextScriptLine < m_pScript->GetNumLines()) { DiaLOG::Log(DiaLOG::eAlways, "[DIALOG] CDialogSession: %s Scheduling next line %d/%d [cur=%d] at %f", GetDebugName(), m_nextScriptLine, m_pScript->GetNumLines()-1, m_curScriptLine, m_curTime+m_nextTimeDelay); } else { DiaLOG::Log(DiaLOG::eAlways, "[DIALOG] CDialogSession: %s Scheduling END [cur=%d] at %f", GetDebugName(), m_curScriptLine, m_curTime+m_nextTimeDelay); } return m_nextScriptLine;}
开发者ID:aronarts,项目名称:FireNET,代码行数:18,
示例11: Msg//-----------------------------------------------------------------------------// Purpose: // Input : *pOther - //-----------------------------------------------------------------------------void CTriggerPortalCleanser::EndTouch(CBaseEntity *pOther){ BaseClass::EndTouch(pOther); if ( portal_cleanser_debug.GetBool() ) { Msg("%s END-TOUCH: for %s/n", GetDebugName(), pOther->GetDebugName() ); }}
开发者ID:wrenchmods,项目名称:Sleepless,代码行数:13,
示例12: 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,
示例13: AssertMsg1//-----------------------------------------------------------------------------// Purpose: //-----------------------------------------------------------------------------CAI_Expresser *CFlexExpresser::CreateExpresser( void ){ AssertMsg1( !m_pExpresser, "LEAK: Double-created expresser for FlexExpresser %s", GetDebugName() ); m_pExpresser = new CAI_ExpresserWithFollowup(this); if ( !m_pExpresser ) return NULL; m_pExpresser->Connect(this); return m_pExpresser;}
开发者ID:Au-heppa,项目名称:swarm-sdk,代码行数:14,
示例14: Msg//-----------------------------------------------------------------------------// Purpose: // Input : *pOther - //-----------------------------------------------------------------------------void CTriggerPortal::EndTouch(CBaseEntity *pOther){ BaseClass::EndTouch(pOther); if ( portal_debug.GetBool() ) { Msg("%s ENDTOUCH: for %s/n", GetDebugName(), pOther->GetDebugName() ); } EHANDLE hHandle; hHandle = pOther; m_hDisabledForEntities.FindAndRemove( hHandle );}
开发者ID:Filip98,项目名称:source-sdk-2013,代码行数:17,
示例15: DevMsg//-----------------------------------------------------------------------------// Purpose: Changes the team controlling this zone// Input : newTeam - the new team to change to//-----------------------------------------------------------------------------void CControlZone::SetControllingTeam( CBaseEntity *pActivator, int newTeam ){ DevMsg( 1, "trigger_controlzone: (%s) changing team to: %d/n", GetDebugName(), newTeam ); // remember this team as the defenders of the zone m_iDefendingTeam = GetTeamNumber(); // reset state, firing the output ChangeTeam(newTeam); m_ControllingTeam.Set( GetTeamNumber(), pActivator, this ); m_iLocked = FALSE; m_iTryingToChangeToTeam = 0; SetNextThink( TICK_NEVER_THINK );}
开发者ID:RaisingTheDerp,项目名称:raisingthebar,代码行数:18,
示例16: GetAbsOrigin//------------------------------------------------------------------------------// Purpose :// Input :// Output ://------------------------------------------------------------------------------void CGrenadePathfollower::Launch( float flLaunchSpeed, string_t sPathCornerName){ m_pPathTarget = gEntList.FindEntityByName( NULL, sPathCornerName ); if (m_pPathTarget) { m_flFlySpeed = flLaunchSpeed; Vector vTargetDir = (m_pPathTarget->GetAbsOrigin() - GetAbsOrigin()); VectorNormalize(vTargetDir); SetAbsVelocity( m_flFlySpeed * vTargetDir ); QAngle angles; VectorAngles( GetAbsVelocity(), angles ); SetLocalAngles( angles ); } else { Warning( "ERROR: Grenade_Pathfollower (%s) with no pathcorner!/n",GetDebugName()); return; } // Make this thing come to life RemoveSolidFlags( FSOLID_NOT_SOLID ); SetMoveType( MOVETYPE_FLYGRAVITY ); RemoveEffects( EF_NODRAW ); SetUse( &CGrenadePathfollower::DetonateUse ); SetTouch( &CGrenadePathfollower::GrenadeTouch ); SetThink( &CGrenadePathfollower::AimThink ); SetNextThink( gpGlobals->curtime + 0.1f ); // Make the trail m_hRocketTrail = RocketTrail::CreateRocketTrail(); if ( m_hRocketTrail ) { m_hRocketTrail->m_Opacity = 0.2f; m_hRocketTrail->m_SpawnRate = 100; m_hRocketTrail->m_ParticleLifetime = 0.5f; m_hRocketTrail->m_StartColor.Init( 0.65f, 0.65f , 0.65f ); m_hRocketTrail->m_EndColor.Init( 0.0, 0.0, 0.0 ); m_hRocketTrail->m_StartSize = 8; m_hRocketTrail->m_EndSize = 16; m_hRocketTrail->m_SpawnRadius = 4; m_hRocketTrail->m_MinSpeed = 2; m_hRocketTrail->m_MaxSpeed = 16; m_hRocketTrail->SetLifetime( 999 ); m_hRocketTrail->FollowEntity( this, "0" ); }}
开发者ID:0xFEEDC0DE64,项目名称:UltraGame,代码行数:55,
示例17: Warning//-----------------------------------------------------------------------------// Purpose: //-----------------------------------------------------------------------------void CPointCommentaryNode::Activate( void ){ m_iNodeNumberMax = g_CommentarySystem.GetCommentaryNodeCount(); if ( m_iszViewTarget != NULL_STRING ) { m_hViewTarget = gEntList.FindEntityByName( NULL, m_iszViewTarget ); if ( !m_hViewTarget ) { Warning("%s: %s could not find viewtarget %s./n", GetClassName(), GetDebugName(), STRING(m_iszViewTarget) ); } } if ( m_iszViewPosition != NULL_STRING ) { m_hViewPosition = gEntList.FindEntityByName( NULL, m_iszViewPosition ); if ( !m_hViewPosition.Get() ) { Warning("%s: %s could not find viewposition %s./n", GetClassName(), GetDebugName(), STRING(m_iszViewPosition) ); } } BaseClass::Activate();}
开发者ID:Bubbasacs,项目名称:FinalProj,代码行数:27,
示例18: Warning//------------------------------------------------------------------------------// Purpose://------------------------------------------------------------------------------void CPointTeleport::InputTeleport( inputdata_t &inputdata ){ // Attempt to find the entity in question CBaseEntity *pTarget = gEntList.FindEntityByName( NULL, m_target, this, inputdata.pActivator, inputdata.pCaller ); if ( pTarget == NULL ) return; // If teleport object is in a movement hierarchy, remove it first if ( EntityMayTeleport( pTarget ) == false ) { Warning("ERROR: (%s) can't teleport object (%s) as it has a parent (%s)!/n",GetDebugName(),pTarget->GetDebugName(),pTarget->GetMoveParent()->GetDebugName()); return; } pTarget->Teleport( &m_vSaveOrigin, &m_vSaveAngles, NULL );}
开发者ID:EspyEspurr,项目名称:game,代码行数:18,
示例19: GetAbsOrigin//------------------------------------------------------------------------------//------------------------------------------------------------------------------void CPointTeleport::Activate( void ){ // Start with our origin point m_vSaveOrigin = GetAbsOrigin(); m_vSaveAngles = GetAbsAngles(); // Save off the spawn position of the target if instructed to do so if ( m_spawnflags & SF_TELEPORT_TO_SPAWN_POS ) { CBaseEntity *pTarget = gEntList.FindEntityByName( NULL, m_target ); if ( pTarget ) { // If teleport object is in a movement hierarchy, remove it first if ( EntityMayTeleport( pTarget ) ) { // Save the points m_vSaveOrigin = pTarget->GetAbsOrigin(); m_vSaveAngles = pTarget->GetAbsAngles(); } else { Warning("ERROR: (%s) can't teleport object (%s) as it has a parent (%s)!/n",GetDebugName(),pTarget->GetDebugName(),pTarget->GetMoveParent()->GetDebugName()); BaseClass::Activate(); return; } } else { Warning("ERROR: (%s) target '%s' not found. Deleting./n", GetDebugName(), STRING(m_target)); UTIL_Remove( this ); return; } } BaseClass::Activate();}
开发者ID:Au-heppa,项目名称:swarm-sdk,代码行数:38,
示例20: SetThink//---------------------------------------------------------//---------------------------------------------------------void CGameWeaponManager::Spawn(){ SetThink( &CGameWeaponManager::Think ); SetNextThink( gpGlobals->curtime ); CBaseEntity *pEntity = CreateEntityByName( STRING(m_iszWeaponName) ); if ( !pEntity ) { DevMsg("%s removed itself!/n", GetDebugName() ); UTIL_Remove(this); } else { m_bExpectingWeapon = ( dynamic_cast<CBaseCombatWeapon *>(pEntity) != NULL ); UTIL_Remove(pEntity); }}
开发者ID:NEITMod,项目名称:HL2BM2,代码行数:18,
示例21: GetModelName// does not call to base class spawn.void CFlexExpresser::Spawn( void ){ const char *szModel = (char *)STRING( GetModelName() ); if (!szModel || !*szModel) { Warning( "WARNING: %s at %.0f %.0f %0.f missing modelname/n", GetDebugName(), GetAbsOrigin().x, GetAbsOrigin().y, GetAbsOrigin().z ); } else { PrecacheModel( szModel ); SetModel( szModel ); } Precache(); if ( m_spawnflags & FCYCLER_NOTSOLID ) { SetSolid( SOLID_NONE ); } else { SetSolid( SOLID_BBOX ); AddSolidFlags( FSOLID_NOT_STANDABLE ); } SetMoveType( MOVETYPE_NONE ); // funcorators are immortal m_takedamage = DAMAGE_NO; m_iHealth = 80000;// no cycler should die m_flPlaybackRate = 1.0f; m_flGroundSpeed = 0; SetNextThink( gpGlobals->curtime + 1.0f ); ResetSequenceInfo( ); InitBoneControllers(); /* if (GetNumFlexControllers() < 5) Warning( "cycler_flex used on model %s without enough flexes./n", szModel ); */ CreateExpresser();}
开发者ID:Au-heppa,项目名称:swarm-sdk,代码行数:47,
示例22: DevWarningCBaseEntity* CASW_Base_Spawner::GetOrderTarget(){ // find entity with name m_AlienOrderTargetName if (GetAlienOrderTarget() == NULL && (m_AlienOrders == AOT_MoveTo || m_AlienOrders == AOT_MoveToIgnoringMarines ) ) { m_hAlienOrderTarget = gEntList.FindEntityByName( NULL, m_AlienOrderTargetName, NULL ); if( !GetAlienOrderTarget() ) { DevWarning("%s: asw_spawner can't find order object: %s/n", GetDebugName(), STRING(m_AlienOrderTargetName) ); return NULL; } } return GetAlienOrderTarget();}
开发者ID:Au-heppa,项目名称:swarm-sdk,代码行数:17,
示例23: Warning//------------------------------------------------------------------------------// Purpose ://------------------------------------------------------------------------------void CLookDoor::Spawn(void){ BaseClass::Spawn(); if (m_target == NULL_STRING) { Warning( "ERROR: DoorLook (%s) given no target. Rejecting spawn./n",GetDebugName()); return; } CLookDoorThinker* pLookThinker = (CLookDoorThinker*)CreateEntityByName("lookdoorthinker"); if (pLookThinker) { pLookThinker->SetThink(CLookDoorThinker::LookThink); pLookThinker->m_hLookDoor = this; pLookThinker->SetNextThink( gpGlobals->curtime + 0.1f ); }}
开发者ID:RaisingTheDerp,项目名称:raisingthebar,代码行数:20,
示例24: Msgint CHL1NPCTalker::PlayScriptedSentence( const char *pszSentence, float delay, float volume, soundlevel_t soundlevel, bool bConcurrent, CBaseEntity *pListener ){ if( hl1_debug_sentence_volume.GetBool() ) { Msg( "SENTENCE: %s Vol:%f SndLevel:%d/n", GetDebugName(), volume, soundlevel ); } if( hl1_fixup_sentence_sndlevel.GetBool() ) { if( soundlevel < SNDLVL_TALKING ) { soundlevel = SNDLVL_TALKING; } } return BaseClass::PlayScriptedSentence( pszSentence, delay, volume, soundlevel, bConcurrent, pListener );}
开发者ID:AgentAgrimar,项目名称:source-sdk-trilogy,代码行数:17,
示例25: Warning//------------------------------------------------------------------------------//------------------------------------------------------------------------------void CPointTeleport::DoTeleport( inputdata_t &inputdata, const Vector &vecOrigin, const QAngle &angRotation, bool bOverrideTarget ){ // Attempt to find the entity in question CBaseEntity *pTarget; if( bOverrideTarget ) { // Use the inputdata to find the entity that the designer supplied in the parameter override pTarget = gEntList.FindEntityByName( NULL, inputdata.value.String(), this, inputdata.pActivator, inputdata.pCaller ); } else { // Default behavior: Just find the entity that I am hardwired in Hammer to teleport. pTarget = gEntList.FindEntityByName( NULL, m_target, this, inputdata.pActivator, inputdata.pCaller ); } if ( pTarget == NULL ) return; // If teleport object is in a movement hierarchy, remove it first if ( EntityMayTeleport( pTarget ) == false ) { Warning("ERROR: (%s) can't teleport object (%s) as it has a parent (%s)!/n",GetDebugName(),pTarget->GetDebugName(),pTarget->GetMoveParent()->GetDebugName()); return; } // in episodic, we have a special spawn flag that forces Gordon into a duck#ifdef HL2_EPISODIC if ( (m_spawnflags & SF_TELEPORT_INTO_DUCK) && pTarget->IsPlayer() ) { CBasePlayer *pPlayer = ToBasePlayer( pTarget ); if ( pPlayer != NULL ) { pPlayer->m_nButtons |= IN_DUCK; pPlayer->AddFlag( FL_DUCKING ); pPlayer->m_Local.m_bDucked = true; pPlayer->m_Local.m_bDucking = true; pPlayer->m_Local.m_nDuckTimeMsecs = 0; pPlayer->SetViewOffset( VEC_DUCK_VIEW ); pPlayer->SetCollisionBounds( VEC_DUCK_HULL_MIN, VEC_DUCK_HULL_MAX ); } } #endif pTarget->Teleport( &vecOrigin, &angRotation, NULL );}
开发者ID:Au-heppa,项目名称:swarm-sdk,代码行数:47,
示例26: Warning//-----------------------------------------------------------------------------// Connects up the previons + next pointers //-----------------------------------------------------------------------------void CPathTrack::Link( void ){ CBaseEntity *pTarget; if ( m_target != NULL_STRING ) { pTarget = gEntList.FindEntityByName( NULL, m_target ); if ( pTarget == this) { Warning("ERROR: path_track (%s) refers to itself as a target!/n", GetDebugName()); //FIXME: Why were we removing this? If it was already connected to, we weren't updating the other linked // end, causing problems with walking through bogus memory links! -- jdw //UTIL_Remove(this); //return; } else if ( pTarget ) { m_pnext = dynamic_cast<CPathTrack*>( pTarget ); if ( m_pnext ) // If no next pointer, this is the end of a path { m_pnext->SetPrevious( this ); } } else { Warning("Dead end link: %s/n", STRING( m_target ) ); } } // Find "alternate" path if ( m_altName != NULL_STRING ) { pTarget = gEntList.FindEntityByName( NULL, m_altName ); if ( pTarget ) { m_paltpath = dynamic_cast<CPathTrack*>( pTarget ); m_paltpath->SetPrevious( this ); } }}
开发者ID:AluminumKen,项目名称:hl2sb-src,代码行数:47,
示例27: Warning//-----------------------------------------------------------------------------// Spawn//-----------------------------------------------------------------------------void CAmbientGenericFMOD::Spawn( void ){ char *szSoundFile = (char *)STRING( m_iszSound ); if ( !m_iszSound || strlen( szSoundFile ) < 1 ) { Warning( "Empty %s (%s) at %.2f, %.2f, %.2f/n", GetClassname(), GetDebugName(), GetAbsOrigin().x, GetAbsOrigin().y, GetAbsOrigin().z ); UTIL_Remove(this); return; } if ( m_iszSound == NULL_STRING ) { UTIL_Remove(this); return; } SetSolid( SOLID_NONE ); SetMoveType( MOVETYPE_NONE );}
开发者ID:KyleGospo,项目名称:City-17-Episode-One-Source-2013,代码行数:22,
示例28: LookupSequence//------------------------------------------------------------------------------// Purpose://------------------------------------------------------------------------------void CPropVehicleChoreoGeneric::InputOpen( inputdata_t &inputdata ){ int nSequence = LookupSequence( "open" ); // Set to the desired anim, or default anim if the desired is not present if ( nSequence > ACTIVITY_NOT_AVAILABLE ) { SetCycle( 0 ); m_flAnimTime = gpGlobals->curtime; ResetSequence( nSequence ); ResetClientsideFrame(); } else { // Not available try to get default anim Msg( "Choreo Generic Vehicle %s: missing open sequence/n", GetDebugName() ); SetSequence( 0 ); }}
开发者ID:P1x3lF3v3r,项目名称:Estranged-Act-1,代码行数:22,
示例29: ComputeSoundlevel//-----------------------------------------------------------------------------// Spawn//-----------------------------------------------------------------------------void CAmbientGeneric::Spawn( void ){ m_iSoundLevel = ComputeSoundlevel( m_radius, FBitSet( m_spawnflags, SF_AMBIENT_SOUND_EVERYWHERE )?true:false ); ComputeMaxAudibleDistance( ); char *szSoundFile = (char *)STRING( m_iszSound ); if ( !m_iszSound || strlen( szSoundFile ) < 1 ) { Warning( "Empty %s (%s) at %.2f, %.2f, %.2f/n", GetClassname(), GetDebugName(), GetAbsOrigin().x, GetAbsOrigin().y, GetAbsOrigin().z ); UTIL_Remove(this); return; } SetSolid( SOLID_NONE ); SetMoveType( MOVETYPE_NONE ); // Set up think function for dynamic modification // of ambient sound's pitch or volume. Don't // start thinking yet. SetThink(&CAmbientGeneric::RampThink); SetNextThink( TICK_NEVER_THINK ); m_fActive = false; if ( FBitSet ( m_spawnflags, SF_AMBIENT_SOUND_NOT_LOOPING ) ) { m_fLooping = false; } else { m_fLooping = true; } m_hSoundSource = NULL; m_nSoundSourceEntIndex = -1; Precache( ); // init all dynamic modulation parms InitModulationParms();}
开发者ID:Rayman1103,项目名称:HLComplete,代码行数:45,
注:本文中的GetDebugName函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ GetDefaultByType函数代码示例 C++ GetDateFormat函数代码示例 |