Fixed players not appearing/disappearing when traveling to a new world.
This commit is contained in:
parent
e5a7a730ed
commit
399392195f
@ -1603,6 +1603,9 @@ bool cPlayer::DoMoveToWorld(cWorld * a_World, bool a_ShouldSendRespawn)
|
|||||||
m_ClientHandle->SendRespawn(a_World->GetDimension());
|
m_ClientHandle->SendRespawn(a_World->GetDimension());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Broadcast for other people that the player is gone.
|
||||||
|
GetWorld()->BroadcastDestroyEntity(*this);
|
||||||
|
|
||||||
// Remove player from the old world
|
// Remove player from the old world
|
||||||
SetWorldTravellingFrom(GetWorld()); // cChunk handles entity removal
|
SetWorldTravellingFrom(GetWorld()); // cChunk handles entity removal
|
||||||
GetWorld()->RemovePlayer(this, false);
|
GetWorld()->RemovePlayer(this, false);
|
||||||
@ -1620,6 +1623,9 @@ bool cPlayer::DoMoveToWorld(cWorld * a_World, bool a_ShouldSendRespawn)
|
|||||||
m_ClientHandle->SendWeather(a_World->GetWeather());
|
m_ClientHandle->SendWeather(a_World->GetWeather());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Broadcast the player into the new world.
|
||||||
|
a_World->BroadcastSpawnEntity(*this);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user