1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-10-16 03:46:33 +00:00

Undo changes to nifkey.hpp

This commit is contained in:
Evil Eye 2025-08-07 20:57:40 +02:00
parent a085036a92
commit a30b4ad615

View file

@ -174,12 +174,8 @@ namespace Nif
const float y = (1.f - curr.mTension) * (1.f + curr.mContinuity) * (1.f - curr.mBias); 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 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 float w = (1.f - curr.mTension) * (1.f - curr.mContinuity) * (1.f - curr.mBias);
const U prevDelta = prev != nullptr ? curr.mValue - prev->mValue const U prevDelta = prev != nullptr ? curr.mValue - prev->mValue : next->mValue - curr.mValue;
: next != nullptr ? next->mValue - curr.mValue const U nextDelta = next != nullptr ? next->mValue - curr.mValue : curr.mValue - prev->mValue;
: U{};
const U nextDelta = next != nullptr ? next->mValue - curr.mValue
: prev != nullptr ? curr.mValue - prev->mValue
: U{};
curr.mInTan = (prevDelta * x + nextDelta * y) * prevLen / (prevLen + nextLen); curr.mInTan = (prevDelta * x + nextDelta * y) * prevLen / (prevLen + nextLen);
curr.mOutTan = (prevDelta * z + nextDelta * w) * nextLen / (prevLen + nextLen); curr.mOutTan = (prevDelta * z + nextDelta * w) * nextLen / (prevLen + nextLen);
} }
@ -209,4 +205,4 @@ namespace Nif
using BoolKeyMapPtr = std::shared_ptr<BoolKeyMap>; using BoolKeyMapPtr = std::shared_ptr<BoolKeyMap>;
} // Namespace } // Namespace
#endif // #ifndef OPENMW_COMPONENTS_NIF_NIFKEY_HPP #endif //#ifndef OPENMW_COMPONENTS_NIF_NIFKEY_HPP