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

summaryrefslogtreecommitdiff
path: root/source/game/StarWorldClientState.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2024-09-05 19:15:47 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2024-09-11 15:19:17 +1000
commit37f3178d33ab77de064bcbf10b4b03ddb47cc979 (patch)
tree76e3b3ce2d8716577af98e2bbbc4a41021db5107 /source/game/StarWorldClientState.cpp
parent90db1e0fbadaeb625691d3d0d13f5ae6ef057109 (diff)
Network compatibility changes
Diffstat (limited to 'source/game/StarWorldClientState.cpp')
-rw-r--r--source/game/StarWorldClientState.cpp14
1 files changed, 6 insertions, 8 deletions
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<RectI> WorldClientState::monitoringRegions(function<Maybe<RectI>(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() {