mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-06-10 09:47:46 +00:00
don't start instance until all bound players are present
This commit is contained in:
parent
801bb1b732
commit
65d7bb3fef
1 changed files with 8 additions and 5 deletions
|
@ -104,17 +104,20 @@ void Core::InstanceContent::onUpdate( uint32_t currTime )
|
|||
{
|
||||
case Created:
|
||||
{
|
||||
// temporary handling for instance state progression
|
||||
if( m_playerMap.size() < 1 )
|
||||
if( m_boundPlayerIds.size() == 0 )
|
||||
return;
|
||||
|
||||
for( const auto& playerId : m_boundPlayerIds )
|
||||
{
|
||||
auto it = m_playerMap.find( playerId );
|
||||
if( it == m_playerMap.end() )
|
||||
return;
|
||||
}
|
||||
|
||||
for( const auto& playerIt : m_playerMap )
|
||||
{
|
||||
const auto& player = playerIt.second;
|
||||
|
||||
if( !isPlayerBound( player->getId() ) )
|
||||
continue;
|
||||
|
||||
if( !player->isLoadingComplete() ||
|
||||
!player->isDirectorInitialized() ||
|
||||
!player->isOnEnterEventDone() ||
|
||||
|
|
Loading…
Add table
Reference in a new issue