From 1fd28d3fc3e0b13334dffc57b4822962d8061cf9 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Sun, 19 Apr 2020 22:11:09 -0400 Subject: [PATCH] CStateMachine: Use logvisor report for state logging --- Runtime/World/CStateMachine.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Runtime/World/CStateMachine.cpp b/Runtime/World/CStateMachine.cpp index 16b0d5652..1208afb7b 100644 --- a/Runtime/World/CStateMachine.cpp +++ b/Runtime/World/CStateMachine.cpp @@ -4,6 +4,8 @@ #include "Runtime/World/CAi.hpp" namespace urde { +static logvisor::Module Log("urde::CStateMachine"); + CStateMachine::CStateMachine(CInputStream& in) { CAiTrigger* lastTrig = nullptr; u32 stateCount = in.readUint32Big(); @@ -78,10 +80,8 @@ 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 -// fmt::print(FMT_STRING("{} {} {} - {} {}\n"), ai.GetUniqueId(), ai.GetEditorId(), ai.GetName(), -// state->xc_name, int(state - x0_machine->GetStateVector().data())); -//#endif + Log.report(logvisor::Info, FMT_STRING("{} {} {} - {} {}"), ai.GetUniqueId(), ai.GetEditorId(), ai.GetName(), + state->xc_name, int(state - x0_machine->GetStateVector().data())); x8_time = 0.f; x18_24_codeTrigger = false; xc_random = mgr.GetActiveRandom()->Float();