Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/game/StarWorldServer.hpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2023-06-21 15:48:27 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2023-06-21 15:48:27 +1000
commitacc8bc02800ce97dbc5424a3d83a1add1593349d (patch)
treee1134bc87dbc7ff3a75cbe8766f3fb45ef0ffe9d /source/game/StarWorldServer.hpp
parentd6fdd960768cbb94a67a1d3cdd34c606807ac180 (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.hpp1
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;