From a30b4ad6152a9eb2904850962fee4e338a0c42b5 Mon Sep 17 00:00:00 2001 From: Evil Eye Date: Thu, 7 Aug 2025 20:57:40 +0200 Subject: [PATCH] Undo changes to nifkey.hpp --- components/nif/nifkey.hpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/components/nif/nifkey.hpp b/components/nif/nifkey.hpp index 1b1083521c..e32ef76d95 100644 --- a/components/nif/nifkey.hpp +++ b/components/nif/nifkey.hpp @@ -174,12 +174,8 @@ namespace Nif const float y = (1.f - curr.mTension) * (1.f + curr.mContinuity) * (1.f - curr.mBias); const float z = (1.f - curr.mTension) * (1.f + curr.mContinuity) * (1.f + curr.mBias); const float w = (1.f - curr.mTension) * (1.f - curr.mContinuity) * (1.f - curr.mBias); - const U prevDelta = prev != nullptr ? curr.mValue - prev->mValue - : next != nullptr ? next->mValue - curr.mValue - : U{}; - const U nextDelta = next != nullptr ? next->mValue - curr.mValue - : prev != nullptr ? curr.mValue - prev->mValue - : U{}; + const U prevDelta = prev != nullptr ? curr.mValue - prev->mValue : next->mValue - curr.mValue; + const U nextDelta = next != nullptr ? next->mValue - curr.mValue : curr.mValue - prev->mValue; curr.mInTan = (prevDelta * x + nextDelta * y) * prevLen / (prevLen + nextLen); curr.mOutTan = (prevDelta * z + nextDelta * w) * nextLen / (prevLen + nextLen); } @@ -209,4 +205,4 @@ namespace Nif using BoolKeyMapPtr = std::shared_ptr; } // Namespace -#endif // #ifndef OPENMW_COMPONENTS_NIF_NIFKEY_HPP +#endif //#ifndef OPENMW_COMPONENTS_NIF_NIFKEY_HPP