diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-21 15:48:27 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-21 15:48:27 +1000 |
commit | acc8bc02800ce97dbc5424a3d83a1add1593349d (patch) | |
tree | e1134bc87dbc7ff3a75cbe8766f3fb45ef0ffe9d /source/game/StarWorldClient.cpp | |
parent | d6fdd960768cbb94a67a1d3cdd34c606807ac180 (diff) |
EntityUpdate server-side optimization
Cache net states of the same net version. Also moved readNetState after init in EntityCreate, should fix bugs like MovementController rotation not being read.
Diffstat (limited to 'source/game/StarWorldClient.cpp')
-rw-r--r-- | source/game/StarWorldClient.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/game/StarWorldClient.cpp b/source/game/StarWorldClient.cpp index 0dfddf8..f8942d2 100644 --- a/source/game/StarWorldClient.cpp +++ b/source/game/StarWorldClient.cpp @@ -656,8 +656,8 @@ void WorldClient::handleIncomingPackets(List<PacketPtr> const& packets) { } auto entity = entityFactory->netLoadEntity(entityCreate->entityType, entityCreate->storeData); - entity->readNetState(entityCreate->firstNetState); entity->init(this, entityCreate->entityId, EntityMode::Slave); + entity->readNetState(entityCreate->firstNetState); m_entityMap->addEntity(entity); if (m_interpolationTracker.interpolationEnabled()) { |