mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-06-11 04:35:39 +00:00
fix: Constructing player to themself (#1808)
tested that I can see other players leave and join a world and that i no longer see a white screen when loading between worlds
This commit is contained in:
parent
820c0f0083
commit
b509fd4f10
@ -364,6 +364,8 @@ void EntityManager::ConstructEntity(Entity* entity, const SystemAddress& sysAddr
|
||||
|
||||
if (sysAddr == UNASSIGNED_SYSTEM_ADDRESS) {
|
||||
for (auto* player : PlayerManager::GetAllPlayers()) {
|
||||
// Don't need to construct the player to themselves
|
||||
if (entity->GetObjectID() == player->GetObjectID()) continue;
|
||||
if (player->GetPlayerReadyForUpdates()) {
|
||||
Game::server->Send(stream, player->GetSystemAddress(), false);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user