From f96a02e7ae0501ce0cdd36573584057117bd1dad Mon Sep 17 00:00:00 2001 From: Luke Street Date: Mon, 24 Aug 2020 03:59:30 -0400 Subject: [PATCH] CAtomicBeta: Some member renaming --- Runtime/MP1/World/CAtomicBeta.cpp | 18 +++++++++--------- Runtime/MP1/World/CAtomicBeta.hpp | 12 ++++++------ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Runtime/MP1/World/CAtomicBeta.cpp b/Runtime/MP1/World/CAtomicBeta.cpp index 02f0ce563..43e5e3e56 100644 --- a/Runtime/MP1/World/CAtomicBeta.cpp +++ b/Runtime/MP1/World/CAtomicBeta.cpp @@ -24,12 +24,12 @@ CAtomicBeta::CAtomicBeta(TUniqueId uid, std::string_view name, const CEntityInfo float f6, s16 sId1, s16 sId2, s16 sId3, float f7) : CPatterned(ECharacter::AtomicBeta, uid, name, EFlavorType::Zero, info, xf, std::move(mData), pInfo, EMovementType::Flyer, EColliderType::One, EBodyType::RestrictedFlyer, actParms, EKnockBackVariant::Small) -, x578_(f5) -, x57c_(f6) -, x580_(f7) -, x584_(x578_) +, x578_minSpeed(f5) +, x57c_maxSpeed(f6) +, x580_speedStep(f7) +, x584_currentSpeed(x578_minSpeed) , x588_frozenDamage(dVuln) -, x5f0_(f4) +, x5f0_moveSpeed(f4) , x5f4_(xf.basis[1]) , x600_electricWeapon(g_SimplePool->GetObj({SBIG('ELSC'), electricId})) , x608_(g_SimplePool->GetObj({SBIG('WPSC'), weaponId})) @@ -148,10 +148,10 @@ void CAtomicBeta::Think(float dt, CStateManager& mgr) { } } - float speed = x580_ * (dt * (IsPlayerBeamChargedEnough(mgr) ? 1.f : -1.f)) + x584_; - x584_ = zeus::clamp(x578_, speed, x57c_); - x3b4_speed = x584_; - x450_bodyController->SetRestrictedFlyerMoveSpeed(x5f0_ * x584_); + float speed = x580_speedStep * (dt * (IsPlayerBeamChargedEnough(mgr) ? 1.f : -1.f)) + x584_currentSpeed; + x584_currentSpeed = zeus::clamp(x578_minSpeed, speed, x57c_maxSpeed); + x3b4_speed = x584_currentSpeed; + x450_bodyController->SetRestrictedFlyerMoveSpeed(x5f0_moveSpeed * x584_currentSpeed); } const CDamageVulnerability* CAtomicBeta::GetDamageVulnerability() const { diff --git a/Runtime/MP1/World/CAtomicBeta.hpp b/Runtime/MP1/World/CAtomicBeta.hpp index 1dd224ed1..2e8cd388a 100644 --- a/Runtime/MP1/World/CAtomicBeta.hpp +++ b/Runtime/MP1/World/CAtomicBeta.hpp @@ -16,12 +16,12 @@ class CAtomicBeta final : public CPatterned { static constexpr u32 kBombCount = 3; rstl::reserved_vector x568_projectileIds; bool x574_beamFired = false; - float x578_; - float x57c_; - float x580_; - float x584_; + float x578_minSpeed; + float x57c_maxSpeed; + float x580_speedStep; + float x584_currentSpeed; CDamageVulnerability x588_frozenDamage; - float x5f0_; + float x5f0_moveSpeed; zeus::CVector3f x5f4_; TToken x600_electricWeapon; TToken x608_; @@ -63,4 +63,4 @@ public: void Death(CStateManager&, const zeus::CVector3f&, EScriptObjectState) override; static bool IsPlayerBeamChargedEnough(const CStateManager& mgr); }; -} // namespace urde::MP1 \ No newline at end of file +} // namespace urde::MP1