- changed debug world synch formatting so on xplatform we don't have issues with filename and other header tag items
This commit is contained in:
parent
42ebe42155
commit
8deec8d518
|
@ -87,9 +87,9 @@ TravelState PathFinder::findPath(Unit *unit, const Vec2i &finalPos, bool *wasStu
|
||||||
|
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
||||||
char szBuf[4096]="";
|
char szBuf[4096]="";
|
||||||
sprintf(szBuf,"[%s::%s Line: %d] [findPath] unit->getPos() [%s] finalPos [%s]",
|
sprintf(szBuf,"[findPath] unit->getPos() [%s] finalPos [%s]",
|
||||||
__FILE__,__FUNCTION__,__LINE__,unit->getPos().getString().c_str(),finalPos.getString().c_str());
|
unit->getPos().getString().c_str(),finalPos.getString().c_str());
|
||||||
unit->logSynchData(szBuf);
|
unit->logSynchData(__FILE__,__LINE__,szBuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
//route cache
|
//route cache
|
||||||
|
@ -186,9 +186,9 @@ TravelState PathFinder::findPath(Unit *unit, const Vec2i &finalPos, bool *wasStu
|
||||||
|
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
||||||
char szBuf[4096]="";
|
char szBuf[4096]="";
|
||||||
sprintf(szBuf,"[%s::%s Line: %d] [attempting to BAIL OUT] finalPos [%s] ts [%d]",
|
sprintf(szBuf,"[attempting to BAIL OUT] finalPos [%s] ts [%d]",
|
||||||
__FILE__,__FUNCTION__,__LINE__,finalPos.getString().c_str(),ts);
|
finalPos.getString().c_str(),ts);
|
||||||
unit->logSynchData(szBuf);
|
unit->logSynchData(__FILE__,__LINE__,szBuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(wasStuck != NULL) {
|
if(wasStuck != NULL) {
|
||||||
|
@ -204,9 +204,9 @@ TravelState PathFinder::findPath(Unit *unit, const Vec2i &finalPos, bool *wasStu
|
||||||
|
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
||||||
char szBuf[4096]="";
|
char szBuf[4096]="";
|
||||||
sprintf(szBuf,"[%s::%s Line: %d] [attempting to BAIL OUT] finalPos [%s] newFinalPos [%s] ts [%d] canUnitMove [%d]",
|
sprintf(szBuf,"[attempting to BAIL OUT] finalPos [%s] newFinalPos [%s] ts [%d] canUnitMove [%d]",
|
||||||
__FILE__,__FUNCTION__,__LINE__,finalPos.getString().c_str(),newFinalPos.getString().c_str(),ts,canUnitMove);
|
finalPos.getString().c_str(),newFinalPos.getString().c_str(),ts,canUnitMove);
|
||||||
unit->logSynchData(szBuf);
|
unit->logSynchData(__FILE__,__LINE__,szBuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(canUnitMove) {
|
if(canUnitMove) {
|
||||||
|
@ -385,9 +385,9 @@ TravelState PathFinder::aStar(Unit *unit, const Vec2i &targetPos, bool inBailout
|
||||||
|
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
||||||
char szBuf[4096]="";
|
char szBuf[4096]="";
|
||||||
sprintf(szBuf,"[%s::%s Line: %d] [path for unit BLOCKED] openNodesList.size() [%ld] openPosList.size() [%ld] finalPos [%s] targetPos [%s] inBailout [%d] ts [%d]",
|
sprintf(szBuf,"[path for unit BLOCKED] openNodesList.size() [%ld] openPosList.size() [%ld] finalPos [%s] targetPos [%s] inBailout [%d] ts [%d]",
|
||||||
__FILE__,__FUNCTION__,__LINE__,openNodesList.size(),openPosList.size(),finalPos.getString().c_str(),targetPos.getString().c_str(),inBailout,ts);
|
openNodesList.size(),openPosList.size(),finalPos.getString().c_str(),targetPos.getString().c_str(),inBailout,ts);
|
||||||
unit->logSynchData(szBuf);
|
unit->logSynchData(__FILE__,__LINE__,szBuf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -410,9 +410,9 @@ TravelState PathFinder::aStar(Unit *unit, const Vec2i &targetPos, bool inBailout
|
||||||
|
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
||||||
char szBuf[4096]="";
|
char szBuf[4096]="";
|
||||||
sprintf(szBuf,"[%s::%s Line: %d] [Setting new path for unit] openNodesList.size() [%ld] openPosList.size() [%ld] finalPos [%s] targetPos [%s] inBailout [%d] ts [%d]",
|
sprintf(szBuf,"[Setting new path for unit] openNodesList.size() [%ld] openPosList.size() [%ld] finalPos [%s] targetPos [%s] inBailout [%d] ts [%d]",
|
||||||
__FILE__,__FUNCTION__,__LINE__,openNodesList.size(),openPosList.size(),finalPos.getString().c_str(),targetPos.getString().c_str(),inBailout,ts);
|
openNodesList.size(),openPosList.size(),finalPos.getString().c_str(),targetPos.getString().c_str(),inBailout,ts);
|
||||||
unit->logSynchData(szBuf);
|
unit->logSynchData(__FILE__,__LINE__,szBuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugPathFinder).enabled == true) {
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugPathFinder).enabled == true) {
|
||||||
|
|
|
@ -636,12 +636,13 @@ void Faction::addResourceTargetToCache(const Vec2i &pos,bool incrementUseCounter
|
||||||
|
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
||||||
char szBuf[4096]="";
|
char szBuf[4096]="";
|
||||||
sprintf(szBuf,"[%s::%s Line: %d] [addResourceTargetToCache] pos [%s]cacheResourceTargetList.size() [%ld]",
|
sprintf(szBuf,"[addResourceTargetToCache] pos [%s]cacheResourceTargetList.size() [%ld]",
|
||||||
__FILE__,__FUNCTION__,__LINE__,pos.getString().c_str(),cacheResourceTargetList.size());
|
pos.getString().c_str(),cacheResourceTargetList.size());
|
||||||
|
|
||||||
//unit->logSynchData(szBuf);
|
//unit->logSynchData(szBuf);
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugWorldSynch,"----------------------------------- START [%d] ------------------------------------------------\n",getFrameCount());
|
SystemFlags::OutputDebug(SystemFlags::debugWorldSynch,"----------------------------------- START [%d] ------------------------------------------------\n",getFrameCount());
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugWorldSynch,"%s",szBuf);
|
SystemFlags::OutputDebug(SystemFlags::debugWorldSynch,"[%s::%d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__LINE__);
|
||||||
|
SystemFlags::OutputDebug(SystemFlags::debugWorldSynch,"%s\n",szBuf);
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugWorldSynch,"------------------------------------ END [%d] -------------------------------------------------\n",getFrameCount());
|
SystemFlags::OutputDebug(SystemFlags::debugWorldSynch,"------------------------------------ END [%d] -------------------------------------------------\n",getFrameCount());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -658,12 +659,13 @@ void Faction::removeResourceTargetFromCache(const Vec2i &pos) {
|
||||||
|
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
||||||
char szBuf[4096]="";
|
char szBuf[4096]="";
|
||||||
sprintf(szBuf,"[%s::%s Line: %d] [removeResourceTargetFromCache] pos [%s]cacheResourceTargetList.size() [%ld]",
|
sprintf(szBuf,"[removeResourceTargetFromCache] pos [%s]cacheResourceTargetList.size() [%ld]",
|
||||||
__FILE__,__FUNCTION__,__LINE__,pos.getString().c_str(),cacheResourceTargetList.size());
|
pos.getString().c_str(),cacheResourceTargetList.size());
|
||||||
|
|
||||||
//unit->logSynchData(szBuf);
|
//unit->logSynchData(szBuf);
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugWorldSynch,"----------------------------------- START [%d] ------------------------------------------------\n",getFrameCount());
|
SystemFlags::OutputDebug(SystemFlags::debugWorldSynch,"----------------------------------- START [%d] ------------------------------------------------\n",getFrameCount());
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugWorldSynch,"%s",szBuf);
|
SystemFlags::OutputDebug(SystemFlags::debugWorldSynch,"[%s::%d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__LINE__);
|
||||||
|
SystemFlags::OutputDebug(SystemFlags::debugWorldSynch,"%s\n",szBuf);
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugWorldSynch,"------------------------------------ END [%d] -------------------------------------------------\n",getFrameCount());
|
SystemFlags::OutputDebug(SystemFlags::debugWorldSynch,"------------------------------------ END [%d] -------------------------------------------------\n",getFrameCount());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -770,10 +772,10 @@ Vec2i Faction::getClosestResourceTypeTargetFromCache(Unit *unit, const ResourceT
|
||||||
if(deleteList.size() > 0) {
|
if(deleteList.size() > 0) {
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
||||||
char szBuf[4096]="";
|
char szBuf[4096]="";
|
||||||
sprintf(szBuf,"[%s::%s Line: %d] [cleaning old resource targets] deleteList.size() [%ld] cacheResourceTargetList.size() [%ld] result [%s]",
|
sprintf(szBuf,"[cleaning old resource targets] deleteList.size() [%ld] cacheResourceTargetList.size() [%ld] result [%s]",
|
||||||
__FILE__,__FUNCTION__,__LINE__,deleteList.size(),cacheResourceTargetList.size(),result.getString().c_str());
|
deleteList.size(),cacheResourceTargetList.size(),result.getString().c_str());
|
||||||
|
|
||||||
unit->logSynchData(szBuf);
|
unit->logSynchData(__FILE__,__LINE__,szBuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanupResourceTypeTargetCache(&deleteList);
|
cleanupResourceTypeTargetCache(&deleteList);
|
||||||
|
@ -903,11 +905,12 @@ void Faction::cleanupResourceTypeTargetCache(std::vector<Vec2i> *deleteListPtr)
|
||||||
if(deleteList.size() > 0) {
|
if(deleteList.size() > 0) {
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
||||||
char szBuf[4096]="";
|
char szBuf[4096]="";
|
||||||
sprintf(szBuf,"[%s::%s Line: %d] [cleaning old resource targets] deleteList.size() [%ld] cacheResourceTargetList.size() [%ld], needToCleanup [%d]",
|
sprintf(szBuf,"[cleaning old resource targets] deleteList.size() [%ld] cacheResourceTargetList.size() [%ld], needToCleanup [%d]",
|
||||||
__FILE__,__FUNCTION__,__LINE__,deleteList.size(),cacheResourceTargetList.size(),needToCleanup);
|
deleteList.size(),cacheResourceTargetList.size(),needToCleanup);
|
||||||
//unit->logSynchData(szBuf);
|
//unit->logSynchData(szBuf);
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugWorldSynch,"----------------------------------- START [%d] ------------------------------------------------\n",getFrameCount());
|
SystemFlags::OutputDebug(SystemFlags::debugWorldSynch,"----------------------------------- START [%d] ------------------------------------------------\n",getFrameCount());
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugWorldSynch,"%s",szBuf);
|
SystemFlags::OutputDebug(SystemFlags::debugWorldSynch,"[%s::%d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__LINE__);
|
||||||
|
SystemFlags::OutputDebug(SystemFlags::debugWorldSynch,"%s\n",szBuf);
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugWorldSynch,"------------------------------------ END [%d] -------------------------------------------------\n",getFrameCount());
|
SystemFlags::OutputDebug(SystemFlags::debugWorldSynch,"------------------------------------ END [%d] -------------------------------------------------\n",getFrameCount());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -241,7 +241,7 @@ Unit::Unit(int id, UnitPathInterface *unitpath, const Vec2i &pos, const UnitType
|
||||||
livingUnits.insert(id);
|
livingUnits.insert(id);
|
||||||
livingUnitsp.insert(this);
|
livingUnitsp.insert(this);
|
||||||
|
|
||||||
logSynchData(string(__FILE__) + string("::") + string(__FUNCTION__) + string(" Line: ") + intToStr(__LINE__));
|
logSynchData(__FILE__,__LINE__);
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -597,7 +597,7 @@ void Unit::setPos(const Vec2i &pos){
|
||||||
// Attempt to improve performance
|
// Attempt to improve performance
|
||||||
this->exploreCells();
|
this->exploreCells();
|
||||||
|
|
||||||
logSynchData(string(__FILE__) + string("::") + string(__FUNCTION__) + string(" Line: ") + intToStr(__LINE__));
|
logSynchData(__FILE__,__LINE__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Unit::setTargetPos(const Vec2i &targetPos){
|
void Unit::setTargetPos(const Vec2i &targetPos){
|
||||||
|
@ -617,7 +617,7 @@ void Unit::setTargetPos(const Vec2i &targetPos){
|
||||||
|
|
||||||
this->targetPos= targetPos;
|
this->targetPos= targetPos;
|
||||||
|
|
||||||
logSynchData(string(__FILE__) + string("::") + string(__FUNCTION__) + string(" Line: ") + intToStr(__LINE__));
|
logSynchData(__FILE__,__LINE__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Unit::setVisible(const bool visible) {
|
void Unit::setVisible(const bool visible) {
|
||||||
|
@ -1667,12 +1667,12 @@ void Unit::startDamageParticles(){
|
||||||
|
|
||||||
void Unit::setTargetVec(const Vec3f &targetVec) {
|
void Unit::setTargetVec(const Vec3f &targetVec) {
|
||||||
this->targetVec= targetVec;
|
this->targetVec= targetVec;
|
||||||
logSynchData(string(__FILE__) + string("::") + string(__FUNCTION__) + string(" Line: ") + intToStr(__LINE__));
|
logSynchData(__FILE__,__LINE__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Unit::setMeetingPos(const Vec2i &meetingPos) {
|
void Unit::setMeetingPos(const Vec2i &meetingPos) {
|
||||||
this->meetingPos= meetingPos;
|
this->meetingPos= meetingPos;
|
||||||
logSynchData(string(__FILE__) + string("::") + string(__FUNCTION__) + string(" Line: ") + intToStr(__LINE__));
|
logSynchData(__FILE__,__LINE__);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Unit::isMeetingPointSettable() const {
|
bool Unit::isMeetingPointSettable() const {
|
||||||
|
@ -1706,12 +1706,11 @@ void Unit::exploreCells() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Unit::logSynchData(string source) {
|
void Unit::logSynchData(string file,int line,string source) {
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
||||||
|
|
||||||
char szBuf[1024]="";
|
char szBuf[1024]="";
|
||||||
sprintf(szBuf,
|
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][%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",
|
"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(),
|
getFrameCount(),
|
||||||
id,
|
id,
|
||||||
|
@ -1730,12 +1729,20 @@ void Unit::logSynchData(string source) {
|
||||||
progress2,
|
progress2,
|
||||||
(unitPath != NULL ? unitPath->toString().c_str() : "NULL"));
|
(unitPath != NULL ? unitPath->toString().c_str() : "NULL"));
|
||||||
|
|
||||||
if(lastSynchDataString != string(szBuf) || lastSource != source) {
|
if( lastSynchDataString != string(szBuf) ||
|
||||||
|
lastFile != file ||
|
||||||
|
lastLine != line ||
|
||||||
|
lastSource != source) {
|
||||||
lastSynchDataString = string(szBuf);
|
lastSynchDataString = string(szBuf);
|
||||||
|
lastFile = file;
|
||||||
lastSource = source;
|
lastSource = source;
|
||||||
|
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugWorldSynch,"----------------------------------- START [%d] ------------------------------------------------\n",getFrameCount());
|
SystemFlags::OutputDebug(SystemFlags::debugWorldSynch,"----------------------------------- START [%d] ------------------------------------------------\n",getFrameCount());
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugWorldSynch,"%s %s",source.c_str(),szBuf);
|
SystemFlags::OutputDebug(SystemFlags::debugWorldSynch,"[%s::%d]\n",extractFileFromDirectoryPath(file).c_str(),line);
|
||||||
|
if(source != "") {
|
||||||
|
SystemFlags::OutputDebug(SystemFlags::debugWorldSynch,"%s ",source.c_str());
|
||||||
|
}
|
||||||
|
SystemFlags::OutputDebug(SystemFlags::debugWorldSynch,"%s\n",szBuf);
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugWorldSynch,"------------------------------------ END [%d] -------------------------------------------------\n",getFrameCount());
|
SystemFlags::OutputDebug(SystemFlags::debugWorldSynch,"------------------------------------ END [%d] -------------------------------------------------\n",getFrameCount());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1799,9 +1806,8 @@ void Unit::cleanupOldBadHarvestPos() {
|
||||||
|
|
||||||
if(purgeList.size() > 0) {
|
if(purgeList.size() > 0) {
|
||||||
char szBuf[4096]="";
|
char szBuf[4096]="";
|
||||||
sprintf(szBuf,"[%s::%s Line: %d] [cleaning old bad harvest targets] purgeList.size() [%ld]",
|
sprintf(szBuf,"[cleaning old bad harvest targets] purgeList.size() [%ld]",purgeList.size());
|
||||||
__FILE__,__FUNCTION__,__LINE__,purgeList.size());
|
logSynchData(__FILE__,__LINE__,szBuf);
|
||||||
logSynchData(szBuf);
|
|
||||||
|
|
||||||
for(int i = 0; i < purgeList.size(); ++i) {
|
for(int i = 0; i < purgeList.size(); ++i) {
|
||||||
const Vec2i &item = purgeList[i];
|
const Vec2i &item = purgeList[i];
|
||||||
|
|
|
@ -286,6 +286,8 @@ private:
|
||||||
CardinalDir modelFacing;
|
CardinalDir modelFacing;
|
||||||
|
|
||||||
std::string lastSynchDataString;
|
std::string lastSynchDataString;
|
||||||
|
std::string lastFile;
|
||||||
|
int lastLine;
|
||||||
std::string lastSource;
|
std::string lastSource;
|
||||||
int lastRenderFrame;
|
int lastRenderFrame;
|
||||||
bool visible;
|
bool visible;
|
||||||
|
@ -465,7 +467,7 @@ public:
|
||||||
std::pair<Vec2i,std::vector<Vec2i> > getCurrentTargetPathTaken() const { return currentTargetPathTaken; }
|
std::pair<Vec2i,std::vector<Vec2i> > getCurrentTargetPathTaken() const { return currentTargetPathTaken; }
|
||||||
void addCurrentTargetPathTakenCell(const Vec2i &target,const Vec2i &cell);
|
void addCurrentTargetPathTakenCell(const Vec2i &target,const Vec2i &cell);
|
||||||
|
|
||||||
void logSynchData(string source="");
|
void logSynchData(string file,int line,string source="");
|
||||||
std::string toString() const;
|
std::string toString() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -327,9 +327,9 @@ bool Map::isResourceNear(const Vec2i &pos, const ResourceType *rt, Vec2i &resour
|
||||||
|
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
||||||
char szBuf[4096]="";
|
char szBuf[4096]="";
|
||||||
sprintf(szBuf,"[%s::%s Line: %d] [found peer harvest pos] pos [%s] resourcePos [%s] unit->getFaction()->getCacheResourceTargetListSize() [%d]",
|
sprintf(szBuf,"[found peer harvest pos] pos [%s] resourcePos [%s] unit->getFaction()->getCacheResourceTargetListSize() [%d]",
|
||||||
__FILE__,__FUNCTION__,__LINE__,pos.getString().c_str(),resourcePos.getString().c_str(),unit->getFaction()->getCacheResourceTargetListSize());
|
pos.getString().c_str(),resourcePos.getString().c_str(),unit->getFaction()->getCacheResourceTargetListSize());
|
||||||
unit->logSynchData(szBuf);
|
unit->logSynchData(__FILE__,__LINE__,szBuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(unit->getPos().dist(resourcePos) <= size) {
|
if(unit->getPos().dist(resourcePos) <= size) {
|
||||||
|
|
|
@ -250,8 +250,8 @@ void UnitUpdater::updateMove(Unit *unit) {
|
||||||
|
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
||||||
char szBuf[4096]="";
|
char szBuf[4096]="";
|
||||||
sprintf(szBuf,"[%s::%s Line: %d] [updateMove] pos [%s] cmd [%s]",__FILE__,__FUNCTION__,__LINE__,pos.getString().c_str(),command->toString().c_str());
|
sprintf(szBuf,"[updateMove] pos [%s] cmd [%s]",pos.getString().c_str(),command->toString().c_str());
|
||||||
unit->logSynchData(szBuf);
|
unit->logSynchData(__FILE__,__LINE__,szBuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
TravelState tsValue = tsImpossible;
|
TravelState tsValue = tsImpossible;
|
||||||
|
@ -316,9 +316,9 @@ void UnitUpdater::updateAttack(Unit *unit) {
|
||||||
|
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
||||||
char szBuf[4096]="";
|
char szBuf[4096]="";
|
||||||
sprintf(szBuf,"[%s::%s Line: %d] [updateAttack] pos [%s] unit->getPos() [%s]",__FILE__,__FUNCTION__,__LINE__,
|
sprintf(szBuf,"[updateAttack] pos [%s] unit->getPos() [%s]",
|
||||||
pos.getString().c_str(),unit->getPos().getString().c_str());
|
pos.getString().c_str(),unit->getPos().getString().c_str());
|
||||||
unit->logSynchData(szBuf);
|
unit->logSynchData(__FILE__,__LINE__,szBuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
TravelState tsValue = tsImpossible;
|
TravelState tsValue = tsImpossible;
|
||||||
|
@ -394,9 +394,9 @@ void UnitUpdater::updateBuild(Unit *unit) {
|
||||||
|
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
||||||
char szBuf[4096]="";
|
char szBuf[4096]="";
|
||||||
sprintf(szBuf,"[%s::%s Line: %d] [updateBuild] unit->getPos() [%s] command->getPos() [%s] buildPos [%s]",
|
sprintf(szBuf,"[updateBuild] unit->getPos() [%s] command->getPos() [%s] buildPos [%s]",
|
||||||
__FILE__,__FUNCTION__,__LINE__,unit->getPos().getString().c_str(),command->getPos().getString().c_str(),buildPos.getString().c_str());
|
unit->getPos().getString().c_str(),command->getPos().getString().c_str(),buildPos.getString().c_str());
|
||||||
unit->logSynchData(szBuf);
|
unit->logSynchData(__FILE__,__LINE__,szBuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
tsValue = pathFinder->findPath(unit, buildPos);
|
tsValue = pathFinder->findPath(unit, buildPos);
|
||||||
|
@ -642,9 +642,9 @@ void UnitUpdater::updateHarvest(Unit *unit) {
|
||||||
|
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
||||||
char szBuf[4096]="";
|
char szBuf[4096]="";
|
||||||
sprintf(szBuf,"[%s::%s Line: %d] [updateHarvest] unit->getPos() [%s] command->getPos() [%s]",
|
sprintf(szBuf,"[updateHarvest] unit->getPos() [%s] command->getPos() [%s]",
|
||||||
__FILE__,__FUNCTION__,__LINE__,unit->getPos().getString().c_str(),command->getPos().getString().c_str());
|
unit->getPos().getString().c_str(),command->getPos().getString().c_str());
|
||||||
unit->logSynchData(szBuf);
|
unit->logSynchData(__FILE__,__LINE__,szBuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
//if not continue walking
|
//if not continue walking
|
||||||
|
@ -721,9 +721,9 @@ void UnitUpdater::updateHarvest(Unit *unit) {
|
||||||
|
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
||||||
char szBuf[4096]="";
|
char szBuf[4096]="";
|
||||||
sprintf(szBuf,"[%s::%s Line: %d] [updateHarvest #2] unit->getPos() [%s] command->getPos() [%s] targetPos [%s]",
|
sprintf(szBuf,"[updateHarvest #2] unit->getPos() [%s] command->getPos() [%s] targetPos [%s]",
|
||||||
__FILE__,__FUNCTION__,__LINE__,unit->getPos().getString().c_str(),command->getPos().getString().c_str(),targetPos.getString().c_str());
|
unit->getPos().getString().c_str(),command->getPos().getString().c_str(),targetPos.getString().c_str());
|
||||||
unit->logSynchData(szBuf);
|
unit->logSynchData(__FILE__,__LINE__,szBuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
wasStuck = false;
|
wasStuck = false;
|
||||||
|
@ -774,9 +774,9 @@ void UnitUpdater::updateHarvest(Unit *unit) {
|
||||||
|
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
||||||
char szBuf[4096]="";
|
char szBuf[4096]="";
|
||||||
sprintf(szBuf,"[%s::%s Line: %d] [updateHarvest #3] unit->getPos() [%s] store->getCenteredPos() [%s]",
|
sprintf(szBuf,"[updateHarvest #3] unit->getPos() [%s] store->getCenteredPos() [%s]",
|
||||||
__FILE__,__FUNCTION__,__LINE__,unit->getPos().getString().c_str(),store->getCenteredPos().getString().c_str());
|
unit->getPos().getString().c_str(),store->getCenteredPos().getString().c_str());
|
||||||
unit->logSynchData(szBuf);
|
unit->logSynchData(__FILE__,__LINE__,szBuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
TravelState tsValue = tsImpossible;
|
TravelState tsValue = tsImpossible;
|
||||||
|
@ -1102,8 +1102,8 @@ void UnitUpdater::updateRepair(Unit *unit) {
|
||||||
|
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
||||||
char szBuf[4096]="";
|
char szBuf[4096]="";
|
||||||
sprintf(szBuf,"[%s::%s Line: %d] [updateRepair] unit->getPos() [%s] command->getPos()() [%s] repairPos [%s]",__FILE__,__FUNCTION__,__LINE__,unit->getPos().getString().c_str(),command->getPos().getString().c_str(),repairPos.getString().c_str());
|
sprintf(szBuf,"[updateRepair] unit->getPos() [%s] command->getPos()() [%s] repairPos [%s]",unit->getPos().getString().c_str(),command->getPos().getString().c_str(),repairPos.getString().c_str());
|
||||||
unit->logSynchData(szBuf);
|
unit->logSynchData(__FILE__,__LINE__,szBuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
TravelState ts;
|
TravelState ts;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user