diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-09-05 19:15:47 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-09-11 15:19:17 +1000 |
commit | 37f3178d33ab77de064bcbf10b4b03ddb47cc979 (patch) | |
tree | 76e3b3ce2d8716577af98e2bbbc4a41021db5107 /source/game/StarTechController.cpp | |
parent | 90db1e0fbadaeb625691d3d0d13f5ae6ef057109 (diff) |
Network compatibility changes
Diffstat (limited to 'source/game/StarTechController.cpp')
-rw-r--r-- | source/game/StarTechController.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/source/game/StarTechController.cpp b/source/game/StarTechController.cpp index 90926de..4c0ed55 100644 --- a/source/game/StarTechController.cpp +++ b/source/game/StarTechController.cpp @@ -358,15 +358,17 @@ void TechController::TechAnimator::initNetVersion(NetElementVersion const* versi netGroup.initNetVersion(version); } -void TechController::TechAnimator::netStore(DataStream& ds) const { +void TechController::TechAnimator::netStore(DataStream& ds, NetCompatibilityRules rules) const { + if (!checkWithRules(rules)) return; ds << animationConfig; - netGroup.netStore(ds); + netGroup.netStore(ds, rules); } -void TechController::TechAnimator::netLoad(DataStream& ds) { +void TechController::TechAnimator::netLoad(DataStream& ds, NetCompatibilityRules rules) { + if (!checkWithRules(rules)) return; ds >> animationConfig; animator = animationConfig ? NetworkedAnimator(*animationConfig) : NetworkedAnimator(); - netGroup.netLoad(ds); + netGroup.netLoad(ds, rules); } void TechController::TechAnimator::enableNetInterpolation(float extrapolationHint) { @@ -381,12 +383,12 @@ void TechController::TechAnimator::tickNetInterpolation(float dt) { netGroup.tickNetInterpolation(dt); } -bool TechController::TechAnimator::writeNetDelta(DataStream& ds, uint64_t fromVersion) const { - return netGroup.writeNetDelta(ds, fromVersion); +bool TechController::TechAnimator::writeNetDelta(DataStream& ds, uint64_t fromVersion, NetCompatibilityRules rules) const { + return netGroup.writeNetDelta(ds, fromVersion, rules); } -void TechController::TechAnimator::readNetDelta(DataStream& ds, float interpolationTime) { - netGroup.readNetDelta(ds, interpolationTime); +void TechController::TechAnimator::readNetDelta(DataStream& ds, float interpolationTime, NetCompatibilityRules rules) { + netGroup.readNetDelta(ds, interpolationTime, rules); } void TechController::TechAnimator::blankNetDelta(float interpolationTime) { |