Skip to content

Commit

Permalink
fix: entt corruption bug
Browse files Browse the repository at this point in the history
  • Loading branch information
RobbeBryssinck committed May 11, 2022
1 parent 4c4ceab commit e977810
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Code/server/GameServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,12 @@ void GameServer::SendToPlayers(const ServerMessage& acServerMessage, const Playe
void GameServer::SendToPlayersInRange(const ServerMessage& acServerMessage, const entt::entity acOrigin,
const Player* apExcludedPlayer) const
{
if (!m_pWorld->valid(acOrigin))
{
spdlog::error("Entity is invalid: {:X}", World::ToInteger(acOrigin));
return;
}

const auto view = m_pWorld->view<CellIdComponent>();
const auto it = view.find(acOrigin);

Expand Down

0 comments on commit e977810

Please sign in to comment.