From 33aac9f2ae17f505b6eec41bc68e80f4917e34ed Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Sun, 28 Nov 2010 03:46:28 +0000 Subject: [PATCH] - added useful debug info for world synch debugging (unit path and faction info) --- source/glest_game/type_instances/unit.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/glest_game/type_instances/unit.cpp b/source/glest_game/type_instances/unit.cpp index c290af3b..1ac8e80f 100644 --- a/source/glest_game/type_instances/unit.cpp +++ b/source/glest_game/type_instances/unit.cpp @@ -1712,10 +1712,11 @@ void Unit::logSynchData(string source) { char szBuf[1024]=""; sprintf(szBuf, //"Unit = %d [%s] [%s] pos = %s, lastPos = %s, targetPos = %s, targetVec = %s, meetingPos = %s, lastRotation [%f], targetRotation [%f], rotation [%f], progress [%f], progress2 [%f]\n", - "FrameCount [%d] Unit = %d [%s] pos = %s, lastPos = %s, targetPos = %s, targetVec = %s, meetingPos = %s, lastRotation [%f], targetRotation [%f], rotation [%f], progress [%f], progress2 [%d]\n", + "FrameCount [%d] Unit = %d [%s][%s] pos = %s, lastPos = %s, targetPos = %s, targetVec = %s, meetingPos = %s, lastRotation [%f], targetRotation [%f], rotation [%f], progress [%f], progress2 [%d]\nUnit Path [%s]\n", getFrameCount(), id, getFullName().c_str(), + faction->getType()->getName().c_str(), //getDesc().c_str(), pos.getString().c_str(), lastPos.getString().c_str(), @@ -1726,7 +1727,8 @@ void Unit::logSynchData(string source) { targetRotation, rotation, progress, - progress2); + progress2, + (unitPath != NULL ? unitPath->toString().c_str() : "NULL")); if(lastSynchDataString != string(szBuf)) { lastSynchDataString = string(szBuf);