From da4dde2437b10d0c911fd19dda9250b29e8b2d38 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 12 Feb 2020 04:57:03 -0500 Subject: [PATCH] CAtomicBeta: Correct division arithmetic error in Think() This is supposed to be a multiplication, not a division (at least this is what v0-00 does). --- Runtime/MP1/World/CAtomicBeta.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Runtime/MP1/World/CAtomicBeta.cpp b/Runtime/MP1/World/CAtomicBeta.cpp index 55d6c4537..72a37fe78 100644 --- a/Runtime/MP1/World/CAtomicBeta.cpp +++ b/Runtime/MP1/World/CAtomicBeta.cpp @@ -119,8 +119,8 @@ void CAtomicBeta::Think(float dt, CStateManager& mgr) { if (!movementVec.isZero()) x450_bodyController->GetCommandMgr().DeliverCmd(CBCLocomotionCmd(movementVec, x5f4_, 1.f)); - float mag = - x63c_ * std::max(1.f - (mgr.GetPlayer().GetTranslation() - GetTranslation()).magSquared() / (x640_ / x640_), 0.f); + const float mag = + x63c_ * std::max(1.f - (mgr.GetPlayer().GetTranslation() - GetTranslation()).magSquared() / (x640_ * x640_), 0.f); if (!zeus::close_enough(mag, 0.f)) mgr.GetPlayerState()->GetStaticInterference().AddSource(GetUniqueId(), mag, 0.5f);