mirror of https://github.com/AxioDL/metaforce.git
CStateMachine: Use logvisor report for state logging
This commit is contained in:
parent
f0133c9eef
commit
1fd28d3fc3
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue