Browse Source

Improve wander logging

Dydzio 7 years ago
parent
commit
fa97940b4f
1 changed files with 2 additions and 1 deletions
  1. 2 1
      AI/VCAI/VCAI.cpp

+ 2 - 1
AI/VCAI/VCAI.cpp

@@ -1470,7 +1470,8 @@ void VCAI::wander(HeroPtr h)
 			decomposeGoal(bestObjectGoal)->accept(this);
 			decomposeGoal(bestObjectGoal)->accept(this);
 
 
 			//wander should not cause heroes to be reserved - they are always considered free
 			//wander should not cause heroes to be reserved - they are always considered free
-			logAi->debug("Of all %d destinations, object oid=%d seems nice", dests.size(), bestObjectGoal->objid);
+			auto chosenObject = cb->getObjInstance(ObjectInstanceID(bestObjectGoal->objid));
+			logAi->debug("Of all %d destinations, object %s at pos=%s seems nice", dests.size(), chosenObject->getObjectName(), chosenObject->pos.toString());
 
 
 			visitTownIfAny(h);
 			visitTownIfAny(h);
 		}
 		}