IMPLEMENT_RMI(CGameRules, ClPlayerJoined) { auto ent = oohh::GetEntityFromId(params.entityId); my->CallHook("PlayerEntered", ent); NOTIFY_UI_MP( PlayerJoined(params.entityId, params.name) ); return true; }
void CUIMultiPlayer::RequestPlayers( const SUIEvent& event ) { IActorIteratorPtr actors = gEnv->pGame->GetIGameFramework()->GetIActorSystem()->CreateActorIterator(); while (IActor* pActor = actors->Next()) { if (pActor->IsPlayer()) PlayerJoined(pActor->GetEntityId(), pActor->GetEntity()->GetName()); } }
void CUIMultiPlayer::RequestPlayers() { IActorIteratorPtr actors = gEnv->pGame->GetIGameFramework()->GetIActorSystem()->CreateActorIterator(); while (IActor* pActor = actors->Next()) { if (pActor->IsPlayer() && m_Players.find(pActor->GetEntityId()) == m_Players.end()) { PlayerJoined(pActor->GetEntityId(), pActor->GetEntity()->GetName()); } } }
IMPLEMENT_RMI(CGameRules, ClPlayerJoined) { NOTIFY_UI_MP( PlayerJoined(params.entityId, params.name) ); return true; }