Skip to content

Commit

Permalink
Server/Visibility: Fix entity deletion not removing entity from envir…
Browse files Browse the repository at this point in the history
…onment
  • Loading branch information
SirLynix committed Nov 10, 2024
1 parent c029059 commit e82bc4b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ServerLib/SessionVisibilityHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,9 @@ namespace tsom
Nz::UInt32 entityId = Nz::Retrieve(m_entityIndices, handle);
deletePacket.entities.push_back(entityId);

auto& entityEnv = m_visibleEnvironments[m_visibleEntities[entityId].envIndex];
entityEnv.entities.Reset(entityId);

m_freeEntityIds.Set(entityId, true);
m_visibleEntities[entityId].entity = entt::handle{};
m_visibleEntities[entityId].envIndex = Nz::MaxValue();
Expand Down

0 comments on commit e82bc4b

Please sign in to comment.