CStateMachine: Use logvisor report for state logging

This commit is contained in:
Luke Street 2020-04-19 22:11:09 -04:00
parent f0133c9eef
commit 1fd28d3fc3
1 changed files with 4 additions and 4 deletions

View File

@ -4,6 +4,8 @@
#include "Runtime/World/CAi.hpp" #include "Runtime/World/CAi.hpp"
namespace urde { namespace urde {
static logvisor::Module Log("urde::CStateMachine");
CStateMachine::CStateMachine(CInputStream& in) { CStateMachine::CStateMachine(CInputStream& in) {
CAiTrigger* lastTrig = nullptr; CAiTrigger* lastTrig = nullptr;
u32 stateCount = in.readUint32Big(); u32 stateCount = in.readUint32Big();
@ -78,10 +80,8 @@ void CStateMachineState::Update(CStateManager& mgr, CAi& ai, float delta) {
if (andPassed && state) { if (andPassed && state) {
x4_state->CallFunc(mgr, ai, EStateMsg::Deactivate, 0.f); x4_state->CallFunc(mgr, ai, EStateMsg::Deactivate, 0.f);
x4_state = state; x4_state = state;
//#ifndef NDEBUG Log.report(logvisor::Info, FMT_STRING("{} {} {} - {} {}"), ai.GetUniqueId(), ai.GetEditorId(), ai.GetName(),
// fmt::print(FMT_STRING("{} {} {} - {} {}\n"), ai.GetUniqueId(), ai.GetEditorId(), ai.GetName(), state->xc_name, int(state - x0_machine->GetStateVector().data()));
// state->xc_name, int(state - x0_machine->GetStateVector().data()));
//#endif
x8_time = 0.f; x8_time = 0.f;
x18_24_codeTrigger = false; x18_24_codeTrigger = false;
xc_random = mgr.GetActiveRandom()->Float(); xc_random = mgr.GetActiveRandom()->Float();