From 92ee96a783dca7d5bb468dc1165425c5a500b531 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 24 Oct 2020 23:19:37 +0800 Subject: [PATCH] Log the recorded history, kaetemi/ryzomclassic#152 --- ryzom/server/src/ai_service/state_instance.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ryzom/server/src/ai_service/state_instance.h b/ryzom/server/src/ai_service/state_instance.h index 8f472702b..c38b7530d 100644 --- a/ryzom/server/src/ai_service/state_instance.h +++ b/ryzom/server/src/ai_service/state_instance.h @@ -505,7 +505,9 @@ void CStateInstance::processStateEvent(CAIEvent const& stateEvent, CAIState cons if (getDebugHistory()->isRecording()) { - nldebug("Reaction for event"); // FIXME: https://github.com/kaetemi/ryzomclassic/issues/152 + nldebug("Reaction for event"); // FIXME: https://github.com/kaetemi/ryzomclassic/issues/152 + nldebug("STATE: '%s' EVENT: '%s' REACTION: '%s'", state->getAliasNode()->fullName().c_str(), + stateEvent.getName().c_str(), reaction.getAliasNode()->fullName().c_str()); // FIXME: https://github.com/kaetemi/ryzomclassic/issues/152 getDebugHistory()->addHistory("STATE: '%s' EVENT: '%s' REACTION: '%s'", state->getAliasNode()->fullName().c_str(), stateEvent.getName().c_str(), reaction.getAliasNode()->fullName().c_str()); } @@ -514,13 +516,13 @@ void CStateInstance::processStateEvent(CAIEvent const& stateEvent, CAIState cons if (!reaction.getAction()) { - nldebug("Failed to find action for event"); // FIXME: https://github.com/kaetemi/ryzomclassic/issues/152 + nldebug("Failed to find action for event"); // FIXME: https://github.com/kaetemi/ryzomclassic/issues/152 nlwarning("Failed to find action for event: %s",reaction.getAliasNode()->fullName().c_str()); continue; } if (!reaction.getAction()->executeAction(this, NULL)) { - nldebug("Failed to execute action for event"); // FIXME: https://github.com/kaetemi/ryzomclassic/issues/152 + nldebug("Failed to execute action for event"); // FIXME: https://github.com/kaetemi/ryzomclassic/issues/152 nlwarning("Failed to execute action for event '%s': for stateInstance:'%s' in state:'%s'", stateEvent.getName().c_str(), aliasTreeOwner()->getAliasNode()->fullName().c_str(), state->getAliasNode()->fullName().c_str()); continue; @@ -531,7 +533,9 @@ void CStateInstance::processStateEvent(CAIEvent const& stateEvent, CAIState cons { if (getDebugHistory()->isRecording()) { - nldebug("No reaction for event"); // FIXME: https://github.com/kaetemi/ryzomclassic/issues/152 + nldebug("No reaction for event"); // FIXME: https://github.com/kaetemi/ryzomclassic/issues/152 + nldebug("STATE: '%s' EVENT: '%s' NO REACTION", state->getAliasNode()->fullName().c_str(), + stateEvent.getName().c_str()); // FIXME: https://github.com/kaetemi/ryzomclassic/issues/152 getDebugHistory()->addHistory("STATE: '%s' EVENT: '%s' NO REACTION", state->getAliasNode()->fullName().c_str(), stateEvent.getName().c_str()); }