From 37f3178d33ab77de064bcbf10b4b03ddb47cc979 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Thu, 5 Sep 2024 19:15:47 +1000 Subject: Network compatibility changes --- source/game/StarWorldClientState.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'source/game/StarWorldClientState.cpp') diff --git a/source/game/StarWorldClientState.cpp b/source/game/StarWorldClientState.cpp index 21552cd..4fbefc9 100644 --- a/source/game/StarWorldClientState.cpp +++ b/source/game/StarWorldClientState.cpp @@ -22,8 +22,6 @@ WorldClientState::WorldClientState() { m_netGroup.addNetElement(&m_playerId); m_netGroup.addNetElement(&m_clientPresenceEntities); - - m_legacy = false; } RectI WorldClientState::window() const { @@ -81,20 +79,20 @@ List WorldClientState::monitoringRegions(function(EntityId)> ByteArray WorldClientState::writeDelta() { ByteArray delta; - tie(delta, m_netVersion) = m_netGroup.writeNetState(m_netVersion); + tie(delta, m_netVersion) = m_netGroup.writeNetState(m_netVersion, m_netCompatibilityRules); return delta; } void WorldClientState::readDelta(ByteArray delta) { - m_netGroup.readNetState(std::move(delta)); + m_netGroup.readNetState(std::move(delta), 0.0f, m_netCompatibilityRules); } -void WorldClientState::setLegacy(bool legacy) { - m_legacy = legacy; +void WorldClientState::setNetCompatibilityRules(NetCompatibilityRules netCompatibilityRules) { + m_netCompatibilityRules = netCompatibilityRules; } -bool WorldClientState::legacy() const { - return m_legacy; +NetCompatibilityRules WorldClientState::netCompatibilityRules() const { + return m_netCompatibilityRules; } void WorldClientState::reset() { -- cgit v1.2.3