From 1948ec327482030c07758300e2e85354a4fd9083 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 26 Apr 2020 03:28:46 -0400 Subject: [PATCH] CWallWalker: Remove unused variables in PreThink We can leave a comment documenting this to make the code itself a little nicer to read. --- Runtime/World/CWallWalker.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Runtime/World/CWallWalker.cpp b/Runtime/World/CWallWalker.cpp index c0cd88cf5..80cc249a8 100644 --- a/Runtime/World/CWallWalker.cpp +++ b/Runtime/World/CWallWalker.cpp @@ -108,12 +108,13 @@ void CWallWalker::GotoNextWaypoint(CStateManager& mgr) { void CWallWalker::PreThink(float dt, CStateManager& mgr) { CPatterned::PreThink(dt, mgr); if (!GetActive() || x5d6_26_playerObstructed || x5bc_patrolPauseRemTime > 0.f || x5d6_27_disableMove || - x450_bodyController->IsFrozen() || !x5d6_24_alignToFloor) + x450_bodyController->IsFrozen() || !x5d6_24_alignToFloor) { return; + } + + // In GM8Ev0, the game binary also constructs two unused quaternions here. - zeus::CQuaternion quat(GetTransform().buildMatrix3f()); AddMotionState(PredictMotion(dt)); - zeus::CQuaternion quat2(GetTransform().buildMatrix3f()); ClearForcesAndTorques(); if (x5d6_25_hasAlignSurface) { zeus::CPlane plane = x568_alignNormal.GetPlane();