diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-07-29 00:52:56 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-07-29 00:52:56 +1000 |
commit | 35fc2679dea7b625bf559c6855e101fc62e613f4 (patch) | |
tree | b8dd025f4a38d71eb828be590e14a3c80231d411 /source/game/StarWorldClient.cpp | |
parent | b17b935c10d5ecc82a7ad2d08903c418049d8dae (diff) |
Allow desired entity ID to be specified in addEntity
Diffstat (limited to 'source/game/StarWorldClient.cpp')
-rw-r--r-- | source/game/StarWorldClient.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/game/StarWorldClient.cpp b/source/game/StarWorldClient.cpp index 3f80682..ee16a91 100644 --- a/source/game/StarWorldClient.cpp +++ b/source/game/StarWorldClient.cpp @@ -1203,7 +1203,7 @@ EntityPtr WorldClient::entity(EntityId entityId) const { return m_entityMap->entity(entityId); } -void WorldClient::addEntity(EntityPtr const& entity) { +void WorldClient::addEntity(EntityPtr const& entity, EntityId entityId) { if (!entity) return; @@ -1211,7 +1211,7 @@ void WorldClient::addEntity(EntityPtr const& entity) { return; if (entity->clientEntityMode() != ClientEntityMode::ClientSlaveOnly) { - entity->init(this, m_entityMap->reserveEntityId(), EntityMode::Master); + entity->init(this, m_entityMap->reserveEntityId(entityId), EntityMode::Master); m_entityMap->addEntity(entity); } else { auto entityFactory = Root::singleton().entityFactory(); |