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


C++ playerhandler::const_iterator类代码示例

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


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

示例1: RT_ProcessOnTick

void RadarHackBlocker::RT_ProcessOnTick ( float const curtime )
{
	ProcessFilter::HumanAtLeastConnectedOrBot const filter_class;

	for( PlayerHandler::const_iterator ph ( &filter_class ); ph != PlayerHandler::end (); ph += &filter_class )
	{
		int const index ( ph.GetIndex () );

		ClientRadarData * pData ( GetPlayerDataStructByIndex ( index ) );

		if( pData->m_last_spotted_status )
		{
			RT_UpdatePlayerData ( *ph );
			RT_ProcessEntity ( ph->GetEdict () );
		}
		else
		{
			if( curtime > m_next_process )
			{
				RT_UpdatePlayerData ( *ph );
				RT_ProcessEntity ( ph->GetEdict () );
			}
		}
	}

	if( curtime > m_next_process )
	{
		m_next_process = curtime + 2.0f;
	}
}
开发者ID:L-EARN,项目名称:NoCheatZ-4,代码行数:30,代码来源:RadarHackBlocker.cpp

示例2: UnPause

//---------------------------------------------------------------------------------
// Purpose: called when the plugin is unpaused (i.e should start executing again)
//---------------------------------------------------------------------------------
void CNoCheatZPlugin::UnPause ( void )
{
	GlobalTimer::GetInstance ()->EnterSection ();

	Logger::GetInstance ()->Msg<MSG_CONSOLE> ( "Unpausing ..." );
	BaseSystem::InitSystems ();
	BanRequest::GetInstance ()->Init ();

	NczPlayerManager::GetInstance ()->LoadPlayerManager (); // Mark any present player as PLAYER_CONNECTED

	SourceSdk::InterfacesProxy::Call_ServerExecute ();
	SourceSdk::InterfacesProxy::Call_ServerCommand ( "exec nocheatz.cfg\n" );
	SourceSdk::InterfacesProxy::Call_ServerExecute ();

	for( int i ( 1 ); i < MAX_PLAYERS; ++i )
	{
		PlayerHandler::const_iterator ph ( NczPlayerManager::GetInstance ()->GetPlayerHandlerByIndex ( i ) );
		if( ph >= SlotStatus::BOT )
		{
			HookEntity ( ph->GetEdict () );
			WeaponHookListener::HookWeapon ( ph );

			if( ph >= SlotStatus::PLAYER_CONNECTED )
			{
				HookBasePlayer ( ph );
			}
		}
	}
	BaseSystem::ManageSystems ();

	Logger::GetInstance ()->Msg<MSG_CHAT> ( "Plugin unpaused" );
}
开发者ID:askovpen,项目名称:NoCheatZ-4,代码行数:35,代码来源:plugin.cpp

示例3: RT_ThinkPostCallback

void RadarHackBlocker::RT_ThinkPostCallback ( SourceSdk::edict_t const * const pent )
{
	ProcessFilter::HumanAtLeastConnectedOrBot const filter_class;

	for( PlayerHandler::const_iterator ph ( &filter_class ); ph != PlayerHandler::end (); ph += &filter_class )
	{
		int const index ( ph.GetIndex () );
		ClientRadarData * pData ( GetPlayerDataStructByIndex ( index ) );
		if( pData->m_last_spotted_status != m_players_spotted[ index ] )
		{
			pData->m_last_spotted_status = m_players_spotted[ index ];

			if( pData->m_last_spotted_status )
			{
				RT_UpdatePlayerData ( *ph );
				RT_ProcessEntity ( ph->GetEdict () );
			}
			else
			{
				//pData->m_next_update = curtime + 1.0f;
				//UpdatePlayerData(ph->playerClass);
				//ProcessEntity(Helpers::PEntityOfEntIndex(x));
			}
		}
	}
}
开发者ID:L-EARN,项目名称:NoCheatZ-4,代码行数:26,代码来源:RadarHackBlocker.cpp

示例4: HookOnGround

void OnGroundHookListener::HookOnGround ( PlayerHandler::const_iterator ph )
{
	Assert ( Helpers::isValidEdict ( ph->GetEdict () ) );
	void* unk ( ph->GetEdict ()->m_pUnk );

	HookInfo info ( unk, ConfigManager::GetInstance ()->vfid_mhgroundentity, ( DWORD ) RT_nNetworkStateChanged_m_hGroundEntity );
	HookGuard<OnGroundHookListener>::GetInstance ()->VirtualTableHook ( info );
}
开发者ID:askovpen,项目名称:NoCheatZ-4,代码行数:8,代码来源:OnGroundHookListener.cpp

示例5: FireGameEvent

void EyeAnglesTester::FireGameEvent ( SourceSdk::IGameEvent *ev ) // round_end
{
	ProcessFilter::HumanAtLeastConnected filter_class;
	for( PlayerHandler::const_iterator ph ( &filter_class ); ph != PlayerHandler::end (); ph+=&filter_class )
	{
		++( GetPlayerDataStructByIndex ( ph.GetIndex () )->ignore_last );
	}
}
开发者ID:L-EARN,项目名称:NoCheatZ-4,代码行数:8,代码来源:EyeAnglesTester.cpp

示例6: Load

void AutoAttackTester::Load ()
{
	for( PlayerHandler::const_iterator it ( PlayerHandler::begin () ); it != PlayerHandler::end (); ++it )
	{
		ResetPlayerDataStructByIndex ( it.GetIndex () );
	}

	PlayerRunCommandHookListener::RegisterPlayerRunCommandHookListener ( this, SystemPriority::UserCmdHookListener::AutoAttackTester );
}
开发者ID:L-EARN,项目名称:NoCheatZ-4,代码行数:9,代码来源:AutoAttackTester.cpp

示例7: HookWeapon

void WeaponHookListener::HookWeapon ( PlayerHandler::const_iterator ph )
{
	LoggerAssert ( Helpers::isValidEdict ( ph->GetEdict () ) );
	void* unk ( ph->GetEdict ()->m_pUnk );

	HookInfo info_equip ( unk, ConfigManager::GetInstance ()->vfid_weaponequip, ( DWORD ) RT_nWeapon_Equip );
	HookInfo info_drop ( unk, ConfigManager::GetInstance ()->vfid_weapondrop, ( DWORD ) RT_nWeapon_Drop );
	HookGuard<WeaponHookListener>::GetInstance ()->VirtualTableHook ( info_equip );
	HookGuard<WeaponHookListener>::GetInstance ()->VirtualTableHook ( info_drop );
}
开发者ID:L-EARN,项目名称:NoCheatZ-4,代码行数:10,代码来源:WeaponHookListener.cpp

示例8: Load

void EyeAnglesTester::Load ()
{
	for( PlayerHandler::const_iterator it ( PlayerHandler::begin () ); it != PlayerHandler::end (); ++it )
	{
		ResetPlayerDataStructByIndex ( it.GetIndex () );
	}

	SourceSdk::InterfacesProxy::GetGameEventManager ()->AddListener ( this, "round_end", true );
	PlayerRunCommandHookListener::RegisterPlayerRunCommandHookListener ( this, SystemPriority::UserCmdHookListener::EyeAnglesTester );
}
开发者ID:L-EARN,项目名称:NoCheatZ-4,代码行数:10,代码来源:EyeAnglesTester.cpp

示例9: Load

void AntiSmokeBlocker::Load ()
{
	for( PlayerHandler::const_iterator it ( PlayerHandler::begin () ); it != PlayerHandler::end (); ++it )
	{
		ResetPlayerDataStructByIndex ( it.GetIndex () );
	}

	SourceSdk::InterfacesProxy::GetGameEventManager ()->AddListener ( this, "smokegrenade_detonate", true );
	SourceSdk::InterfacesProxy::GetGameEventManager ()->AddListener ( this, "round_start", true );
	OnTickListener::RegisterOnTickListener ( this );
	SetTransmitHookListener::RegisterSetTransmitHookListener ( this, 1 );
}
开发者ID:L-EARN,项目名称:NoCheatZ-4,代码行数:12,代码来源:AntiSmokeBlocker.cpp

示例10: RT_SetTransmitCallback

bool AntiSmokeBlocker::RT_SetTransmitCallback ( PlayerHandler::const_iterator sender, PlayerHandler::const_iterator receiver )
{
	//if(!receiver) return false;

	if( GetPlayerDataStructByIndex ( receiver.GetIndex () )->is_in_smoke )
		return true;

	if( GetPlayerDataStructByIndex ( receiver.GetIndex () )->can_not_see_this_player[ sender.GetIndex () ] == true )
		return true;

	return false;
}
开发者ID:L-EARN,项目名称:NoCheatZ-4,代码行数:12,代码来源:AntiSmokeBlocker.cpp

示例11: GetPlayerHandlerBySteamID

PlayerHandler::const_iterator NczPlayerManager::GetPlayerHandlerBySteamID ( const char * steamid ) const
{
	const char * tSteamId;

	for( PlayerHandler::const_iterator it ( PlayerHandler::begin () ); it != PlayerHandler::end (); ++it )
	{
		if( it )
		{
			tSteamId = it->GetSteamID ();
			if( strcmp ( tSteamId, steamid ) == 0 ) return it;
		}
	}

	return PlayerHandler::end ();
}
开发者ID:L-EARN,项目名称:NoCheatZ-4,代码行数:15,代码来源:NczPlayerManager.cpp

示例12: GetPlayerHandlerByName

PlayerHandler::const_iterator NczPlayerManager::GetPlayerHandlerByName ( const char * playerName ) const
{
	const char * tName;

	for( PlayerHandler::const_iterator it ( PlayerHandler::begin () ); it != PlayerHandler::end (); ++it )
	{
		if( it )
		{
			tName = it->GetName ();
			if( strcmp ( tName, playerName ) ) return it;
		}
	}

	return PlayerHandler::end ();
}
开发者ID:L-EARN,项目名称:NoCheatZ-4,代码行数:15,代码来源:NczPlayerManager.cpp

示例13: ClientActive

//---------------------------------------------------------------------------------
// Purpose: called when a client spawns into a server (i.e as they begin to play)
//---------------------------------------------------------------------------------
void CNoCheatZPlugin::ClientActive ( SourceSdk::edict_t *pEntity )
{
	DebugMessage ( Helpers::format ( "CNoCheatZPlugin::ClientActive (%X -> %s)", pEntity, pEntity->GetClassName () ) );

	NczPlayerManager::GetInstance ()->ClientActive ( pEntity );

	PlayerHandler::const_iterator ph ( NczPlayerManager::GetInstance ()->GetPlayerHandlerByEdict ( pEntity ) );
	if( ph >= SlotStatus::PLAYER_CONNECTED ) HookBasePlayer ( ph );
	if( ph >= SlotStatus::BOT )
	{
		WeaponHookListener::HookWeapon ( ph );
		HookEntity ( ph->GetEdict () );
	}

	ProcessFilter::HumanAtLeastConnected filter_class;
	if( NczPlayerManager::GetInstance ()->GetPlayerCount ( &filter_class ) == 1 ) AutoTVRecord::GetInstance ()->SpawnTV ();
}
开发者ID:askovpen,项目名称:NoCheatZ-4,代码行数:20,代码来源:plugin.cpp

示例14: GetPlayerHandlerByBasePlayer

PlayerHandler::const_iterator NczPlayerManager::GetPlayerHandlerByBasePlayer ( void * const BasePlayer ) const
{
	SourceSdk::edict_t * tEdict;
	for( PlayerHandler::const_iterator it ( PlayerHandler::begin () ); it != PlayerHandler::end (); ++it )
	{
		if( it )
		{
			tEdict = it->GetEdict ();
			if( Helpers::isValidEdict ( tEdict ) )
			{
				if( tEdict->GetUnknown () == BasePlayer ) return it;
			}
		}
	}

	return PlayerHandler::end ();
}
开发者ID:L-EARN,项目名称:NoCheatZ-4,代码行数:17,代码来源:NczPlayerManager.cpp

示例15: pdata

void AutoAttackTester::OnAttack2Up ( PlayerHandler::const_iterator ph, int game_tick )
{
	AttackTriggerStats * const pdata ( GetPlayerDataStructByIndex ( ph.GetIndex () ) );

	pdata->attack2_up_tick = game_tick;
	pdata->attack2_sustain_stats.Store ( game_tick - pdata->attack2_down_tick , pdata->attack2_down_tick );

	FindDetection ( ph, &( pdata->attack2_sustain_stats ) );
}
开发者ID:L-EARN,项目名称:NoCheatZ-4,代码行数:9,代码来源:AutoAttackTester.cpp


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