mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-06-12 18:37: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:
|
case Created:
|
||||||
{
|
{
|
||||||
// temporary handling for instance state progression
|
if( m_boundPlayerIds.size() == 0 )
|
||||||
if( m_playerMap.size() < 1 )
|
|
||||||
return;
|
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 )
|
for( const auto& playerIt : m_playerMap )
|
||||||
{
|
{
|
||||||
const auto& player = playerIt.second;
|
const auto& player = playerIt.second;
|
||||||
|
|
||||||
if( !isPlayerBound( player->getId() ) )
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if( !player->isLoadingComplete() ||
|
if( !player->isLoadingComplete() ||
|
||||||
!player->isDirectorInitialized() ||
|
!player->isDirectorInitialized() ||
|
||||||
!player->isOnEnterEventDone() ||
|
!player->isOnEnterEventDone() ||
|
||||||
|
|
Loading…
Add table
Reference in a new issue