From 9929dfbc6a9586cf4f19218e28fe6c240d02bfc8 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Mon, 14 May 2018 19:59:52 -0700 Subject: [PATCH] Fix logic derp in Think --- Runtime/World/CScriptActorKeyframe.cpp | 11 ++++++----- Runtime/World/CScriptActorKeyframe.hpp | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Runtime/World/CScriptActorKeyframe.cpp b/Runtime/World/CScriptActorKeyframe.cpp index 8eb593cbf..b303b1396 100644 --- a/Runtime/World/CScriptActorKeyframe.cpp +++ b/Runtime/World/CScriptActorKeyframe.cpp @@ -19,7 +19,7 @@ CScriptActorKeyframe::CScriptActorKeyframe(TUniqueId uid, std::string_view name, x44_25_disableUpdate = b2; x44_26_ = w2; x44_27_ = w2; - x44_28_ = false; + x44_28_playing = false; x44_29_ = false; } @@ -48,7 +48,7 @@ void CScriptActorKeyframe::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId u } } - x44_28_ = true; + x44_28_playing = true; SendScriptMsgs(EScriptObjectState::Play, mgr, EScriptObjectMessage::None); } } @@ -63,7 +63,7 @@ void CScriptActorKeyframe::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId u void CScriptActorKeyframe::Think(float dt, CStateManager& mgr) { - if (!x44_25_disableUpdate || !x44_24_looping || !x44_27_ || !x44_28_ || x40_lifetime <= 0.f) + if (x44_25_disableUpdate || !x44_24_looping || !x44_27_ || !x44_28_playing || x40_lifetime <= 0.f) { CEntity::Think(dt, mgr); return; @@ -76,7 +76,7 @@ void CScriptActorKeyframe::Think(float dt, CStateManager& mgr) return; } - x44_28_ = false; + x44_28_playing = false; for (const SConnection& conn : x20_conns) { if (conn.x0_state != EScriptObjectState::Play || conn.x4_msg!= EScriptObjectMessage::Play) @@ -135,6 +135,7 @@ void CScriptActorKeyframe::UpdateEntity(TUniqueId uid, CStateManager& mgr) } } } - /* TODO: Finish */ + /* else if (TCastTo ai = ent) + * TODO: Finish */ } } diff --git a/Runtime/World/CScriptActorKeyframe.hpp b/Runtime/World/CScriptActorKeyframe.hpp index a2742da5d..fa146c601 100644 --- a/Runtime/World/CScriptActorKeyframe.hpp +++ b/Runtime/World/CScriptActorKeyframe.hpp @@ -19,7 +19,7 @@ private: bool x44_25_disableUpdate : 1; bool x44_26_ : 1; bool x44_27_ : 1; - bool x44_28_ : 1; + bool x44_28_playing : 1; bool x44_29_ : 1; }; u8 _dummy = 0;