From e059f224d4710fd9c3df8031aa75c97ff4938d9f Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Wed, 13 Nov 2019 10:44:43 -0800 Subject: [PATCH] Fix behavior translation, still needs work --- Runtime/MP1/World/CRidley.cpp | 9 +++++---- Runtime/World/CStateMachine.cpp | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Runtime/MP1/World/CRidley.cpp b/Runtime/MP1/World/CRidley.cpp index 7291d7ad1..2c9c6af85 100644 --- a/Runtime/MP1/World/CRidley.cpp +++ b/Runtime/MP1/World/CRidley.cpp @@ -62,11 +62,11 @@ std::array, 5> skSomeRidleyStruct{{ {5, 100.f, -1}, {1, 100.f, -1}, {1, 100.f, -1}, - {1, 50.f, -1}, + {1, 100.f, -1}, {1, 100.f, -1}, {-1, 100.f, -1}, {-1, 100.f, -1}, - {-1, 50.f, -1}, + {-1, 100.f, -1}, {-1, 100.f, -1}, {-1, 100.f, -1}, {-1, 100.f, -1}, @@ -77,7 +77,7 @@ std::array, 5> skSomeRidleyStruct{{ {0, 100.f, -1}, {0, 50.f, 4}, {2, 100.f, -1}, - {3, 50.f, 5}, + {3, 50.f, 4}, {2, 100.f, -1}, {3, 50.f, 4}, {0, 100.f, -1}, @@ -115,6 +115,7 @@ std::array, 5> skSomeRidleyStruct{{ {-1, 100.f, -1}, }}, }}; + std::array skSomeStruct{{{4, 6, 50.f, 50.f, 0.f, 33.f, 0.f, 1, 0, 0, 0, 0}, {4, 6, 20.f, 20.f, 60.f, 50.f, 0.f, 2, 0, 0, 0, 0}, {4, 6, 40.f, 40.f, 20.f, 50.f, 50.f, 2, 1, 0, 0, 0}, @@ -1230,7 +1231,7 @@ void CRidley::Lurk(urde::CStateManager& mgr, urde::EStateMsg msg, float arg) { SetDestPos(destPos); zeus::CVector3f vec = GetTransform().basis[1].toVec2f().normalized(); zeus::CTransform xf(vec.cross(zeus::skUp), vec, zeus::skUp, GetTranslation()); - // SetTransform(xf); + SetTransform(xf); xa33_27_ = false; xa34_26_ = false; } else if (msg == EStateMsg::Update) { diff --git a/Runtime/World/CStateMachine.cpp b/Runtime/World/CStateMachine.cpp index a55d7e5f5..bb6186d85 100644 --- a/Runtime/World/CStateMachine.cpp +++ b/Runtime/World/CStateMachine.cpp @@ -78,10 +78,10 @@ void CStateMachineState::Update(CStateManager& mgr, CAi& ai, float delta) { if (andPassed && state) { x4_state->CallFunc(mgr, ai, EStateMsg::Deactivate, 0.f); x4_state = state; -#ifndef NDEBUG +//#ifndef NDEBUG fmt::print(fmt("{} {} {} - {} {}\n"), ai.GetUniqueId(), ai.GetEditorId(), ai.GetName(), state->xc_name, int(state - x0_machine->GetStateVector().data())); -#endif +//#endif x8_time = 0.f; x18_24_codeTrigger = false; xc_random = mgr.GetActiveRandom()->Float();