diff --git a/samples/rmc3-rta-1-17-843.krkg b/samples/rmc3-rta-1-17-843.krkg index 4c10d1cd..267b5a5f 100644 Binary files a/samples/rmc3-rta-1-17-843.krkg and b/samples/rmc3-rta-1-17-843.krkg differ diff --git a/source/game/kart/KartObjectProxy.cc b/source/game/kart/KartObjectProxy.cc index bcf62d8c..79bc277a 100644 --- a/source/game/kart/KartObjectProxy.cc +++ b/source/game/kart/KartObjectProxy.cc @@ -193,6 +193,14 @@ const EGG::Quatf &KartObjectProxy::fullRot() const { return dynamics()->fullRot(); } +const EGG::Vector3f &KartObjectProxy::extVel() const { + return dynamics()->extVel(); +} + +const EGG::Vector3f &KartObjectProxy::intVel() const { + return dynamics()->intVel(); +} + bool KartObjectProxy::isBike() const { return param()->isBike(); } diff --git a/source/game/kart/KartObjectProxy.hh b/source/game/kart/KartObjectProxy.hh index f514e688..4c75f419 100644 --- a/source/game/kart/KartObjectProxy.hh +++ b/source/game/kart/KartObjectProxy.hh @@ -92,6 +92,8 @@ public: const EGG::Vector3f &pos() const; const EGG::Quatf &fullRot() const; + const EGG::Vector3f &extVel() const; + const EGG::Vector3f &intVel() const; bool isBike() const; u16 suspCount() const; u16 tireCount() const; diff --git a/source/test/Test.hh b/source/test/Test.hh index bc7bf25a..e96e765c 100644 --- a/source/test/Test.hh +++ b/source/test/Test.hh @@ -4,6 +4,12 @@ namespace Test { +enum Changelog { + INITIAL = 1, + ADDED_EXT_VEL = 2, + ADDED_INT_VEL = 3, +}; + struct TestHeader { u32 signature; u16 byteOrderMark; @@ -16,6 +22,10 @@ struct TestHeader { struct TestData { EGG::Vector3f pos; EGG::Quatf fullRot; + // Added in maj0 min2 + EGG::Vector3f extVel; + // Added in maj0 min3 + EGG::Vector3f intVel; }; } // namespace Test diff --git a/source/test/TestDirector.cc b/source/test/TestDirector.cc index 72a3a4d6..b3f2badf 100644 --- a/source/test/TestDirector.cc +++ b/source/test/TestDirector.cc @@ -145,6 +145,22 @@ bool TestDirector::test(const TestData &data) { return false; } + if (m_versionMinor >= ADDED_EXT_VEL) { + const auto &extVel = object->extVel(); + if (data.extVel != extVel) { + logVectorDesync(data.extVel, extVel, "extVel"); + return false; + } + } + + if (m_versionMinor >= ADDED_INT_VEL) { + const auto &intVel = object->intVel(); + if (data.intVel != intVel) { + logVectorDesync(data.intVel, intVel, "intVel"); + return false; + } + } + return true; } @@ -159,12 +175,24 @@ void TestDirector::writeTestOutput() const { TestData TestDirector::findNextEntry() { EGG::Vector3f pos; EGG::Quatf fullRot; + EGG::Vector3f extVel; + EGG::Vector3f intVel; pos.read(m_stream); fullRot.read(m_stream); + if (m_versionMinor >= ADDED_EXT_VEL) { + extVel.read(m_stream); + } + + if (m_versionMinor >= ADDED_INT_VEL) { + intVel.read(m_stream); + } + TestData data; data.pos = pos; data.fullRot = fullRot; + data.extVel = extVel; + data.intVel = intVel; return data; }