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/StarWorldServer.hpp | |
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/StarWorldServer.hpp')
-rw-r--r-- | source/game/StarWorldServer.hpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/game/StarWorldServer.hpp b/source/game/StarWorldServer.hpp index 1def4f3..7609cdc 100644 --- a/source/game/StarWorldServer.hpp +++ b/source/game/StarWorldServer.hpp @@ -347,6 +347,7 @@ private: CollisionGenerator m_collisionGenerator; List<CollisionBlock> m_workingCollisionBlocks; + HashMap<pair<EntityId, uint64_t>, pair<ByteArray, uint64_t>> m_netStateCache; OrderedHashMap<ConnectionId, shared_ptr<ClientInfo>> m_clientInfo; GameTimer m_tileEntityBreakCheckTimer; |