From 7efaadac8037590d077e1eb0d02d3a868d31cc07 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Sun, 13 Sep 2020 19:04:24 -0400 Subject: [PATCH] CDrone: Rename x58c_prevDodgeDir --- Runtime/MP1/World/CDrone.cpp | 16 ++++++++-------- Runtime/MP1/World/CDrone.hpp | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Runtime/MP1/World/CDrone.cpp b/Runtime/MP1/World/CDrone.cpp index 27dd1c235..94c7f2473 100644 --- a/Runtime/MP1/World/CDrone.cpp +++ b/Runtime/MP1/World/CDrone.cpp @@ -624,18 +624,18 @@ void CDrone::Dodge(CStateManager& mgr, EStateMsg msg, float dt) { } else if (msg == EStateMsg::Update) { if (x7c8_ == 0) { GetBodyController()->GetCommandMgr().DeliverCmd(CBodyStateCmd(EBodyStateCmd::NextState)); - if (x58c_ == 5) { + if (x58c_prevDodgeDir == pas::EStepDirection::Down) { GetBodyController()->GetCommandMgr().DeliverCmd(CBCStepCmd(pas::EStepDirection::Left, pas::EStepType::Dodge)); - x58c_ = 2; - } else if (x58c_ == 4) { + x58c_prevDodgeDir = pas::EStepDirection::Left; + } else if (x58c_prevDodgeDir == pas::EStepDirection::Up) { GetBodyController()->GetCommandMgr().DeliverCmd(CBCStepCmd(pas::EStepDirection::Down, pas::EStepType::Dodge)); - x58c_ = 5; - } else if (x58c_ == 3) { + x58c_prevDodgeDir = pas::EStepDirection::Down; + } else if (x58c_prevDodgeDir == pas::EStepDirection::Right) { GetBodyController()->GetCommandMgr().DeliverCmd(CBCStepCmd(pas::EStepDirection::Up, pas::EStepType::Dodge)); - x58c_ = 4; - } else if (x58c_ == 2) { + x58c_prevDodgeDir = pas::EStepDirection::Up; + } else if (x58c_prevDodgeDir == pas::EStepDirection::Left) { GetBodyController()->GetCommandMgr().DeliverCmd(CBCStepCmd(pas::EStepDirection::Right, pas::EStepType::Dodge)); - x58c_ = 3; + x58c_prevDodgeDir = pas::EStepDirection::Right; } x7c8_ = 1; } else if (x7c8_ == 1 && diff --git a/Runtime/MP1/World/CDrone.hpp b/Runtime/MP1/World/CDrone.hpp index c404e3364..8c8e6cd9d 100644 --- a/Runtime/MP1/World/CDrone.hpp +++ b/Runtime/MP1/World/CDrone.hpp @@ -14,7 +14,7 @@ class CDrone : public CPatterned { TUniqueId x578_lightId = kInvalidUniqueId; TUniqueId x57a_ = kInvalidUniqueId; std::vector x57c_flares; - u32 x58c_ = 2; + pas::EStepDirection x58c_prevDodgeDir = pas::EStepDirection::Left; CDamageInfo x590_; CDamageInfo x5ac_; float x5c8_ = 0.f;