diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-09-11 18:22:44 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-09-11 18:22:44 +1000 |
commit | 7408981e131f7cdd897a3c5924ea14b272986e88 (patch) | |
tree | 4e99c67e587aa7c1e9b4dbd046177efbc4ba4011 /source/core/StarDataStream.cpp | |
parent | 5a75473e16afb8152aab943fd316d9820835f465 (diff) |
use a version number rather than a bool
more flexible, allows for backwards compat with older OpenSB versions & not just vanilla Starbound
Diffstat (limited to 'source/core/StarDataStream.cpp')
-rw-r--r-- | source/core/StarDataStream.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/source/core/StarDataStream.cpp b/source/core/StarDataStream.cpp index 1224f54..3a4ed0c 100644 --- a/source/core/StarDataStream.cpp +++ b/source/core/StarDataStream.cpp @@ -36,10 +36,7 @@ void DataStream::setStreamCompatibilityVersion(unsigned streamCompatibilityVersi } void DataStream::setStreamCompatibilityVersion(NetCompatibilityRules const& rules) { - if (rules.isLegacy) - m_streamCompatibilityVersion = 1; - else - m_streamCompatibilityVersion = CurrentStreamVersion; + m_streamCompatibilityVersion = rules.version(); } ByteArray DataStream::readBytes(size_t len) { |