• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ GetGlobalTeam函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: GetGlobalTeam

const char * C_PlayerResource::GetTeamName(int index)
{
	C_Team *team = GetGlobalTeam( index );

	if ( !team )
		return "Unknown";

	return team->Get_Name();
}
开发者ID:1n73rf4c3,项目名称:source-sdk-2013,代码行数:9,代码来源:c_playerresource.cpp


示例2: GetGlobalTeam

//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CTeamplayRules::Precache( void )
{
	// Call the Team Manager's precaches
	for ( int i = 0; i < GetNumberOfTeams(); i++ )
	{
		CTeam *pTeam = GetGlobalTeam( i );
		pTeam->Precache();
	}
}
开发者ID:KermitAudio,项目名称:MSS,代码行数:12,代码来源:teamplay_gamerules.cpp


示例3: CreateRagdollEntity

void CHL2MP_Player::Event_Killed( const CTakeDamageInfo &info )
{
    //update damage info with our accumulated physics force
    CTakeDamageInfo subinfo = info;
    subinfo.SetDamageForce( m_vecTotalBulletForce );

#ifdef GE_DLL
    // Since we fixed force application, give the ragdoll an extra oomph to emphasize his death
    m_vecTotalBulletForce.x *= 2.5f;
    m_vecTotalBulletForce.y *= 2.5f;
    m_vecTotalBulletForce.z *= 2.0f;
#endif

    // Note: since we're dead, it won't draw us on the client, but we don't set EF_NODRAW
    // because we still want to transmit to the clients in our PVS.
    CreateRagdollEntity();

#ifndef GE_DLL
    DetonateTripmines();
#endif

    BaseClass::Event_Killed( subinfo );

    if ( info.GetDamageType() & DMG_DISSOLVE )
    {
        if ( m_hRagdoll )
        {
            m_hRagdoll->GetBaseAnimating()->Dissolve( NULL, gpGlobals->curtime, false, ENTITY_DISSOLVE_NORMAL );
        }
    }

#ifndef GE_DLL
    CBaseEntity *pAttacker = info.GetAttacker();

    if ( pAttacker )
    {
        int iScoreToAdd = 1;

        if ( pAttacker == this )
        {
            iScoreToAdd = -1;
        }

        GetGlobalTeam( pAttacker->GetTeamNumber() )->AddMatchScore( iScoreToAdd );
    }
#endif

    FlashlightTurnOff();

    m_lifeState = LIFE_DEAD;

    RemoveEffects( EF_NODRAW );	// still draw player body
    StopZooming();
}
开发者ID:Entropy-Soldier,项目名称:ges-legacy-code,代码行数:54,代码来源:hl2mp_player.cpp


示例4: switch

//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CTriggerAreaCapture::BreakCapture( bool bNotEnoughPlayers )
{
	if( m_bCapturing )
	{
		// Remap team to get first game team = 1
		switch ( m_nCapturingTeam - FIRST_GAME_TEAM+1 )
		{
		case 1: 
			m_OnBreakTeam1.FireOutput( this, this );
			break;
		case 2: 
			m_OnBreakTeam2.FireOutput( this, this );
			break;
		default:
			Assert(0);
			break;
		}

		m_BreakOutput.FireOutput(this,this);

		m_bCapturing = false;
		m_nCapturingTeam = TEAM_UNASSIGNED;

		UpdateCappingTeam( TEAM_UNASSIGNED );

		if ( bNotEnoughPlayers )
		{
			IncrementCapAttemptNumber();
		}

		SetCapTimeRemaining( 0 );

		if( m_hPoint )
		{
			m_hPoint->CaptureEnd();
		}

		m_OnNumCappersChanged.Set( 0, this, this );

		// tell all touching players to stop racking up capture points
		CTeam *pTeam = GetGlobalTeam( m_nCapturingTeam );
		if ( pTeam )
		{
			for ( int i=0;i<pTeam->GetNumPlayers();i++ )
			{
				CBaseMultiplayerPlayer *pPlayer = ToBaseMultiplayerPlayer( pTeam->GetPlayer(i) );
				if ( pPlayer && IsTouching( pPlayer ) )
				{
					pPlayer->StopScoringEscortPoints();					
				}
			}
		}
	}
}
开发者ID:BenLubar,项目名称:SwarmDirector2,代码行数:57,代码来源:trigger_area_capture.cpp


示例5: Q_snprintf

void CTextureProxy::OnBind( void *pEntity )
{
	// Bail if no base variable
	if ( !m_pBaseTextureVar )
		return;

	char texture[128];

	if (Q_stricmp(m_szTextureType, "hometeamcrest") == 0 && GetGlobalTeam(TEAM_A)->HasCrest())
		Q_snprintf(texture, sizeof(texture), "%s/%s/teamcrest", TEAMKITS_PATH, GetGlobalTeam(TEAM_A)->GetFolderName());
	else if (Q_stricmp(m_szTextureType, "awayteamcrest") == 0 && GetGlobalTeam(TEAM_B)->HasCrest())
		Q_snprintf(texture, sizeof(texture), "%s/%s/teamcrest", TEAMKITS_PATH, GetGlobalTeam(TEAM_B)->GetFolderName());
	else
		Q_snprintf(texture, sizeof(texture), "%s", m_pDefaultTexture->GetName());

	m_pNewTexture = materials->FindTexture(texture, NULL, true);
		
	m_pBaseTextureVar->SetTextureValue(m_pNewTexture);

	GetMaterial()->RecomputeStateSnapshots();
}
开发者ID:Rahmstein,项目名称:IOS,代码行数:21,代码来源:ios_playertextureproxy.cpp


示例6: ChangeTeam

void CSDKPlayer::ChangeTeam( int iTeamNum )
{
	if ( !GetGlobalTeam( iTeamNum ) )
	{
		Warning( "CSDKPlayer::ChangeTeam( %d ) - invalid team index.\n", iTeamNum );
		return;
	}

	int iOldTeam = GetTeamNumber();

	// if this is our current team, just abort
	if ( iTeamNum == iOldTeam )
		return;
	
	m_bTeamChanged = true;

	// do the team change:
	BaseClass::ChangeTeam( iTeamNum );

	// update client state 
	if ( iTeamNum == TEAM_UNASSIGNED )
	{
		State_Transition( STATE_OBSERVER_MODE );
	}
	else if ( iTeamNum == TEAM_SPECTATOR )
	{
		RemoveAllItems( true );
		
		State_Transition( STATE_OBSERVER_MODE );
	}
	else // active player
	{
		if ( !IsDead() )
		{
			// Kill player if switching teams while alive
			CommitSuicide();

			// add 1 to frags to balance out the 1 subtracted for killing yourself
			IncrementFragCount( 1 );
		}

		if( iOldTeam == TEAM_SPECTATOR )
			SetMoveType( MOVETYPE_NONE );
//Tony; pop up the class menu if we're using classes, otherwise just spawn.
#if defined ( SDK_USE_PLAYERCLASSES )
		// Put up the class selection menu.
		State_Transition( STATE_PICKINGCLASS );
#else
		State_Transition( STATE_ACTIVE );
#endif
	}
}
开发者ID:0xFEEDC0DE64,项目名称:UltraGame,代码行数:52,代码来源:sdk_player.cpp


示例7: GetGlobalTeam

//-----------------------------------------------------------------------------
// Purpose: Attach this spawnpoint to it's team
//-----------------------------------------------------------------------------
void CTeamSpawnPoint::Activate( void )
{
	BaseClass::Activate();
	if ( GetTeamNumber() > 0 && GetTeamNumber() <= MAX_TEAMS )
	{
		GetGlobalTeam( GetTeamNumber() )->AddSpawnpoint( this );
	}
	else
	{
		Warning( "info_player_teamspawn with invalid team number: %d\n", GetTeamNumber() );
		UTIL_Remove( this );
	}
}
开发者ID:Adidasman1,项目名称:source-sdk-2013,代码行数:16,代码来源:team_spawnpoint.cpp


示例8:

Color &C_Team::GetHudKitColor()
{
	Color *color;

	if (GetTeamNumber() == TEAM_HOME || GetTeamNumber() == TEAM_AWAY)
		color = &m_pKitInfo->m_HudPrimaryColor;
	else
		color = &g_ColorGray;

	if (GetTeamNumber() == TEAM_AWAY)
	{
		if (*color == GetGlobalTeam(TEAM_HOME)->GetHudKitColor())
		{
			color = &m_pKitInfo->m_HudSecondaryColor;

			if (*color == GetGlobalTeam(TEAM_HOME)->GetHudKitColor())
				color = &g_HudAlternativeColors[m_pKitInfo->m_HudPrimaryColorClass];
		}
	}

	return *color;
}
开发者ID:iosoccer,项目名称:iosoccer-game,代码行数:22,代码来源:c_team.cpp


示例9: TeamFortress_TeamGetScoreFrags

//=========================================================================
// Return the score/frags of a team, depending on whether TeamFrags is on
int TeamFortress_TeamGetScoreFrags(int tno)
{
	CTeam *pTeam = GetGlobalTeam( tno );
	if ( pTeam )
	{
		return pTeam->GetScore();
	}
	else
	{
		Assert( false );
		return -1;
	}
}
开发者ID:Axitonium,项目名称:SourceEngine2007,代码行数:15,代码来源:tfc_team.cpp


示例10: GetGlobalTeam

//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CTeamControlPoint::HandleScoring( int iTeam )
{
	if ( TeamplayRoundBasedRules() && !TeamplayRoundBasedRules()->ShouldScorePerRound() )
	{
		GetGlobalTeam( iTeam )->AddScore( 1 );
		TeamplayRoundBasedRules()->HandleTeamScoreModify( iTeam, 1 );

		CTeamControlPointMaster *pMaster = g_hControlPointMasters.Count() ? g_hControlPointMasters[0] : NULL;
		if ( pMaster && !pMaster->WouldNewCPOwnerWinGame( this, iTeam ) )
		{
			CTeamRecipientFilter filter( iTeam );
			EmitSound( filter, entindex(), "Hud.EndRoundScored" );
		}
	}
}
开发者ID:xxauroraxx,项目名称:Source.Python,代码行数:18,代码来源:team_control_point.cpp


示例11: ToSOPlayer

void CNPC_SO_BaseZombie::Event_Killed( const CTakeDamageInfo &info )
{
	CBaseEntity *pEnt = info.GetAttacker();
	if ( pEnt && pEnt->IsPlayer() )
	{
		CSO_Player *pPlayer = ToSOPlayer( pEnt );
		if ( pPlayer )
		{
			// Give players some credit for killing zombie NPCs
			pPlayer->IncrementFragCount( 1 );
			GetGlobalTeam( pPlayer->GetTeamNumber() )->AddScore( 1 );
		}
	}

	BaseClass::Event_Killed( info );
}
开发者ID:jonnyboy0719,项目名称:situation-outbreak-two,代码行数:16,代码来源:npc_so_BaseZombie.cpp


示例12: CreateRagdollEntity

void CHL2MP_Player::Event_Killed( const CTakeDamageInfo &info )
{
	//update damage info with our accumulated physics force
	CTakeDamageInfo subinfo = info;
	subinfo.SetDamageForce( m_vecTotalBulletForce );

	// Note: since we're dead, it won't draw us on the client, but we don't set EF_NODRAW
	// because we still want to transmit to the clients in our PVS.
	CreateRagdollEntity();

	//DHL - Skillet - SLAMs are removed, plus the sound is cheesy at death
	//DetonateTripmines();

	BaseClass::Event_Killed( subinfo );

	if ( info.GetDamageType() & DMG_DISSOLVE )
	{
		if ( m_hRagdoll )
		{
			m_hRagdoll->GetBaseAnimating()->Dissolve( NULL, gpGlobals->curtime, false, ENTITY_DISSOLVE_NORMAL );
		}
	}

	CBaseEntity *pAttacker = info.GetAttacker();

	if ( pAttacker )
	{
		int iScoreToAdd = 1;

		if ( pAttacker == this )
		{
			iScoreToAdd = -1;
		}

		if ( !DHLRules()->IsGameWaiting() ) //DHL
		{
			GetGlobalTeam( pAttacker->GetTeamNumber() )->AddScore( iScoreToAdd );
		}
	}

	FlashlightTurnOff();

	m_lifeState = LIFE_DEAD;

	RemoveEffects( EF_NODRAW );	// still draw player body
	StopZooming();
}
开发者ID:dreckard,项目名称:dhl2,代码行数:47,代码来源:hl2mp_player.cpp


示例13: Warning

bool CHL2MP_Player::HandleCommand_JoinTeam( int team )
{
#ifndef GE_DLL
    if ( !GetGlobalTeam( team ) || team == 0 )
    {
        Warning( "HandleCommand_JoinTeam( %d ) - invalid team index.\n", team );
        return false;
    }

    if ( team == TEAM_SPECTATOR )
    {
        // Prevent this is the cvar is set
        if ( !mp_allowspectators.GetInt() )
        {
            ClientPrint( this, HUD_PRINTCENTER, "#Cannot_Be_Spectator" );
            return false;
        }

        if ( GetTeamNumber() != TEAM_UNASSIGNED && !IsDead() )
        {
            m_fNextSuicideTime = gpGlobals->curtime;	// allow the suicide to work

            CommitSuicide();

            // add 1 to frags to balance out the 1 subtracted for killing yourself
            IncrementFragCount( 1 );
        }

        ChangeTeam( TEAM_SPECTATOR );

        return true;
    }
    else
    {
        StopObserverMode();
        State_Transition(STATE_ACTIVE);
    }

    // Switch their actual team...
    ChangeTeam( team );

    return true;
#else
    return false;
#endif
}
开发者ID:Entropy-Soldier,项目名称:ges-legacy-code,代码行数:46,代码来源:hl2mp_player.cpp


示例14: GetReplayStartTime

void CReplayManager::AddMatchEvent(match_event_t type, int team, CSDKPlayer *pPlayer1, CSDKPlayer *pPlayer2/* = NULL*/, CSDKPlayer *pPlayer3/* = NULL*/)
{
	MatchEvent *pMatchEvent = new MatchEvent;

	if (type == MATCH_EVENT_GOAL || type == MATCH_EVENT_OWNGOAL || type == MATCH_EVENT_MISS || type == MATCH_EVENT_KEEPERSAVE || type == MATCH_EVENT_REDCARD)
	{
		float replayStartTime = GetReplayStartTime() + 1.0f;

		for (int i = 0; i < m_Snapshots.Count(); i++)
		{
			if (m_Snapshots[i]->snaptime >= replayStartTime)
			{
				pMatchEvent->snapshots.AddToTail(m_Snapshots[i]);
				m_Snapshots[i]->replayCount += 1;
			}
		}

		pMatchEvent->snapshotEndTime = gpGlobals->curtime + 1.0f;
	}
	else
		pMatchEvent->snapshotEndTime = 0;
	
	pMatchEvent->matchPeriod = SDKGameRules()->State_Get();
	pMatchEvent->matchEventType = type;
	pMatchEvent->second = SDKGameRules()->GetMatchDisplayTimeSeconds();
	pMatchEvent->team = team;
	pMatchEvent->atMinGoalPos = GetMatchBall()->GetPos().y < SDKGameRules()->m_vKickOff.GetY();
	pMatchEvent->pPlayer1Data = pPlayer1 ? pPlayer1->GetPlayerData() : NULL;
	pMatchEvent->pPlayer2Data = pPlayer2 ? pPlayer2->GetPlayerData() : NULL;
	pMatchEvent->pPlayer3Data = pPlayer3 ? pPlayer3->GetPlayerData() : NULL;

	m_MatchEvents.AddToTail(pMatchEvent);

	if (type == MATCH_EVENT_GOAL || type == MATCH_EVENT_OWNGOAL || type == MATCH_EVENT_YELLOWCARD || type == MATCH_EVENT_SECONDYELLOWCARD || type == MATCH_EVENT_REDCARD)
	{
		char matchEventPlayerNames[MAX_MATCH_EVENT_PLAYER_NAME_LENGTH] = {};
		if (pPlayer1 && !pPlayer2 && !pPlayer3)
			Q_strncpy(matchEventPlayerNames, UTIL_VarArgs("%s", pPlayer1->GetPlayerName()), MAX_MATCH_EVENT_PLAYER_NAME_LENGTH);
		else if (pPlayer1 && pPlayer2 && !pPlayer3)
			Q_strncpy(matchEventPlayerNames, UTIL_VarArgs("%.15s (%.15s)", pPlayer1->GetPlayerName(), pPlayer2->GetPlayerName()), MAX_MATCH_EVENT_PLAYER_NAME_LENGTH);
		else if (pPlayer1 && pPlayer2 && pPlayer3)
			Q_strncpy(matchEventPlayerNames, UTIL_VarArgs("%.10s (%.10s, %.10s)", pPlayer1->GetPlayerName(), pPlayer2->GetPlayerName(), pPlayer3->GetPlayerName()), MAX_MATCH_EVENT_PLAYER_NAME_LENGTH);

		GetGlobalTeam(pMatchEvent->team)->AddMatchEvent(pMatchEvent->matchPeriod, pMatchEvent->second, pMatchEvent->matchEventType, matchEventPlayerNames);
	}
}
开发者ID:rain2372,项目名称:IOS-1,代码行数:46,代码来源:ios_replaymanager.cpp


示例15: CreateRagdollEntity

void CHL2MP_Player::Event_Killed( const CTakeDamageInfo &info )
{
	//update damage info with our accumulated physics force
	CTakeDamageInfo subinfo = info;
	subinfo.SetDamageForce( m_vecTotalBulletForce );

	//BP empêche de créer un ragdoll si on change de team en mode spectateur
	if(GetTeamNumber() != TEAM_SPECTATOR)
		CreateRagdollEntity();

	BaseClass::Event_Killed( subinfo );

	if ( info.GetDamageType() & DMG_DISSOLVE )
		if ( m_hRagdoll )
			m_hRagdoll->GetBaseAnimating()->Dissolve( NULL, gpGlobals->curtime, false, ENTITY_DISSOLVE_NORMAL );

	CBaseEntity *pAttacker = info.GetAttacker();
	if ( pAttacker )
	{
		int iScoreToAdd = 1;

		if ( pAttacker == this)
		{
			if(HL2MPRules()->GetGameType() == GAME_TDM)
				iScoreToAdd = 0;
			else
				iScoreToAdd = -1;
		}

		if((HL2MPRules()->GetGameType() == GAME_FORTS) || (HL2MPRules()->GetGameType() == GAME_PUSH))
			iScoreToAdd = 0;

		GetGlobalTeam( pAttacker->GetTeamNumber() )->AddScore( iScoreToAdd );
	}

	FlashlightTurnOff();

	m_lifeState = LIFE_DEAD;

	RemoveEffects( EF_NODRAW );	// still draw player body
	StopZooming();
	DetonateTripmines();
//BP enregistre le tueur
	SetKiller(info.GetAttacker());
}
开发者ID:Orygin,项目名称:BisounoursParty,代码行数:45,代码来源:hl2mp_player.cpp


示例16: CheckObserverSettings

void CSDKPlayer::State_Enter_OBSERVER_MODE()
{
	// Always start a spectator session in roaming mode
	m_iObserverLastMode = OBS_MODE_ROAMING;

	if( m_hObserverTarget == NULL )
	{
		// find a new observer target
		CheckObserverSettings();
	}

	// Change our observer target to the nearest teammate
	CTeam *pTeam = GetGlobalTeam( GetTeamNumber() );

	CBasePlayer *pPlayer;
	Vector localOrigin = GetAbsOrigin();
	Vector targetOrigin;
	float flMinDist = FLT_MAX;
	float flDist;

	for ( int i=0;i<pTeam->GetNumPlayers();i++ )
	{
		pPlayer = pTeam->GetPlayer(i);

		if ( !pPlayer )
			continue;

		if ( !IsValidObserverTarget(pPlayer) )
			continue;

		targetOrigin = pPlayer->GetAbsOrigin();

		flDist = ( targetOrigin - localOrigin ).Length();

		if ( flDist < flMinDist )
		{
			m_hObserverTarget.Set( pPlayer );
			flMinDist = flDist;
		}
	}

	StartObserverMode( m_iObserverLastMode );
	PhysObjectSleep();
}
开发者ID:0xFEEDC0DE64,项目名称:UltraGame,代码行数:44,代码来源:sdk_player.cpp


示例17:

bool CHL2MP_Player::HandleCommand_JoinTeam( int team )
{
	if ( !GetGlobalTeam( team ) || team == 0 )
	{
		Warning( "HandleCommand_JoinTeam( %d ) - invalid team index.\n", team );
		return false;
	}

	if ( team == TEAM_SPECTATOR )
	{
		// Prevent this is the cvar is set
		if ( !mp_allowspectators.GetInt() )
		{
			ClientPrint( this, HUD_PRINTCENTER, "#Cannot_Be_Spectator" );
			return false;
		}

		if ( /*GetTeamNumber() != TEAM_UNASSIGNED &&*/ !IsDead() ) //DHL - Skillet - Players in deathmatch are unassigned
		{
			m_fNextSuicideTime = gpGlobals->curtime;	// allow the suicide to work

			CommitSuicide();

			// add 1 to frags to balance out the 1 subtracted for killing yourself
			IncrementFragCount( 1 );
			GetTeam()->AddScore( 1 ); //DHL - Skillet - Required to keep the scoreboard headers from getting out of sync
		}

		ChangeTeam( TEAM_SPECTATOR );

		return true;
	}
	else
	{
		StopObserverMode();
		State_Transition(STATE_ACTIVE);
	}

	// Switch their actual team...
	ChangeTeam( team );

	return true;
}
开发者ID:dreckard,项目名称:dhl2,代码行数:43,代码来源:hl2mp_player.cpp


示例18: TeamFortress_TeamShowScores

// Display all the Team Scores
void TeamFortress_TeamShowScores(BOOL bLong, CBasePlayer *pPlayer)
{
	for (int i = 1; i < g_Teams.Count(); i++)
	{
		if (!bLong)
		{
			// Dump short scores
			UTIL_ClientPrintAll( HUD_PRINTNOTIFY, UTIL_VarArgs("%s: %d\n", g_szTeamColors[i], GetGlobalTeam(i)->GetScore()) );
		}
		else
		{
			// Dump long scores
			if (pPlayer == NULL)
				UTIL_ClientPrintAll( HUD_PRINTNOTIFY, UTIL_VarArgs("Team %d (%s): %d\n", i, g_szTeamColors[i], GetGlobalTeam(i)->GetScore()) );
			else // Print to just one client
				ClientPrint( pPlayer, HUD_PRINTNOTIFY,  UTIL_VarArgs("Team %d (%s): %d\n", i, g_szTeamColors[i], GetGlobalTeam(i)->GetScore()) );
		}
	}
}
开发者ID:Axitonium,项目名称:SourceEngine2007,代码行数:20,代码来源:tfc_team.cpp


示例19: GetGlobalTeam

//-----------------------------------------------------------------------------------------------------
int CFuncNavBlocker::DrawDebugTextOverlays( void )
{
	int offset = BaseClass::DrawDebugTextOverlays();

	if (m_debugOverlays & OVERLAY_TEXT_BIT) 
	{
		CFmtStr str;

		// FIRST_GAME_TEAM skips TEAM_SPECTATOR and TEAM_UNASSIGNED, so we can print
		// useful team names in a non-game-specific fashion.
		for ( int i=FIRST_GAME_TEAM; i<FIRST_GAME_TEAM + MAX_NAV_TEAMS; ++i )
		{
			if ( IsBlockingNav( i ) )
			{
				CTeam *team = GetGlobalTeam( i );
				if ( team )
				{
					EntityText( offset++, str.sprintf( "blocking team %s", team->GetName() ), 0 );
				}
				else
				{
					EntityText( offset++, str.sprintf( "blocking team %d", i ), 0 );
				}
			}
		}

		NavAreaCollector collector( true );
		Extent extent;
		extent.Init( this );
		TheNavMesh->ForAllAreasOverlappingExtent( collector, extent );

		for ( int i=0; i<collector.m_area.Count(); ++i )
		{
			CNavArea *area = collector.m_area[i];
			Extent areaExtent;
			area->GetExtent( &areaExtent );
			debugoverlay->AddBoxOverlay( vec3_origin, areaExtent.lo, areaExtent.hi, vec3_angle, 0, 255, 0, 10, NDEBUG_PERSIST_TILL_NEXT_SERVER );
		}
	}

	return offset;
}
开发者ID:WootsMX,项目名称:InSource,代码行数:43,代码来源:nav_entities.cpp


示例20: GetGlobalTeam

void CSF132FlagBase::OnScore()
{
	CTeam *pTeam = GetGlobalTeam((GetTeamNumber() == SDK_TEAM_RED) ? SDK_TEAM_BLUE : SDK_TEAM_RED);
	if ( !pTeam )
	{
		Error( "Flag has no team" );
	}

	pTeam->AddCapturePoints( FLAG_CLASSIC_CAPTURE_POINTS );

	switch( GetTeamNumber() )
	{
		case SDK_TEAM_BLUE:
			PlaySound( FLAG_RED_SCORE );
			break;

		case SDK_TEAM_RED:
			PlaySound( FLAG_BLUE_SCORE );
			break;
	}
}
开发者ID:hekar,项目名称:luminousforts-2013,代码行数:21,代码来源:SF132_Flag.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetGraph函数代码示例发布时间:2022-05-30
下一篇:
C++ GetGlobalColor函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap