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:
David Markowitz 2025-06-07 16:30:22 -07:00 committed by GitHub
parent 820c0f0083
commit b509fd4f10
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 {