add more world synch logging
This commit is contained in:
parent
08e0b0baca
commit
538314eb48
|
@ -359,6 +359,10 @@ void UnitUpdater::updateStop(Unit *unit, int frameIndex) {
|
||||||
clearUnitPrecache(unit);
|
clearUnitPrecache(unit);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true && frameIndex < 0) {
|
||||||
|
char szBuf[8096]="";
|
||||||
|
snprintf(szBuf,8096,"[updateStop]");
|
||||||
|
}
|
||||||
|
|
||||||
Chrono chrono;
|
Chrono chrono;
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled) chrono.start();
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled) chrono.start();
|
||||||
|
@ -470,15 +474,33 @@ void UnitUpdater::updateMove(Unit *unit, int frameIndex) {
|
||||||
// ==================== updateAttack ====================
|
// ==================== updateAttack ====================
|
||||||
|
|
||||||
void UnitUpdater::updateAttack(Unit *unit, int frameIndex) {
|
void UnitUpdater::updateAttack(Unit *unit, int frameIndex) {
|
||||||
|
|
||||||
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true && frameIndex < 0) {
|
||||||
|
char szBuf[8096]="";
|
||||||
|
snprintf(szBuf,8096,"[updateAttack]");
|
||||||
|
}
|
||||||
|
|
||||||
Chrono chrono;
|
Chrono chrono;
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled) chrono.start();
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled) chrono.start();
|
||||||
|
|
||||||
Command *command= unit->getCurrCommand();
|
Command *command= unit->getCurrCommand();
|
||||||
if(command == NULL) {
|
if(command == NULL) {
|
||||||
|
|
||||||
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true && frameIndex < 0) {
|
||||||
|
char szBuf[8096]="";
|
||||||
|
snprintf(szBuf,8096,"[updateAttack]");
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const AttackCommandType *act= static_cast<const AttackCommandType*>(command->getCommandType());
|
const AttackCommandType *act= static_cast<const AttackCommandType*>(command->getCommandType());
|
||||||
if(act == NULL) {
|
if(act == NULL) {
|
||||||
|
|
||||||
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true && frameIndex < 0) {
|
||||||
|
char szBuf[8096]="";
|
||||||
|
snprintf(szBuf,8096,"[updateAttack]");
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Unit *target= NULL;
|
Unit *target= NULL;
|
||||||
|
@ -489,6 +511,11 @@ void UnitUpdater::updateAttack(Unit *unit, int frameIndex) {
|
||||||
|
|
||||||
if(frameIndex < 0) {
|
if(frameIndex < 0) {
|
||||||
unit->finishCommand(); // all queued "ground attacks" are skipped if somthing else is queued after them.
|
unit->finishCommand(); // all queued "ground attacks" are skipped if somthing else is queued after them.
|
||||||
|
|
||||||
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true && frameIndex < 0) {
|
||||||
|
char szBuf[8096]="";
|
||||||
|
snprintf(szBuf,8096,"[updateAttack]");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -505,6 +532,11 @@ void UnitUpdater::updateAttack(Unit *unit, int frameIndex) {
|
||||||
else {
|
else {
|
||||||
unit->setCurrSkill(scStop);
|
unit->setCurrSkill(scStop);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true && frameIndex < 0) {
|
||||||
|
char szBuf[8096]="";
|
||||||
|
snprintf(szBuf,8096,"[updateAttack]");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled && chrono.getMillis() > 0) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s Line: %d] took msecs: %lld\n",__FILE__,__FUNCTION__,__LINE__,chrono.getMillis());
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled && chrono.getMillis() > 0) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s Line: %d] took msecs: %lld\n",__FILE__,__FUNCTION__,__LINE__,chrono.getMillis());
|
||||||
}
|
}
|
||||||
|
@ -553,6 +585,11 @@ void UnitUpdater::updateAttack(Unit *unit, int frameIndex) {
|
||||||
if(command->getUnit() != NULL && !command->getUnit()->isAlive() && unit->getCommandSize() > 1) {
|
if(command->getUnit() != NULL && !command->getUnit()->isAlive() && unit->getCommandSize() > 1) {
|
||||||
// don't run over to dead body if there is still something to do in the queue
|
// don't run over to dead body if there is still something to do in the queue
|
||||||
unit->finishCommand();
|
unit->finishCommand();
|
||||||
|
|
||||||
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true && frameIndex < 0) {
|
||||||
|
char szBuf[8096]="";
|
||||||
|
snprintf(szBuf,8096,"[updateAttack]");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//if unit arrives destPos order has ended
|
//if unit arrives destPos order has ended
|
||||||
|
@ -609,6 +646,12 @@ void UnitUpdater::updateAttack(Unit *unit, int frameIndex) {
|
||||||
unit->finishCommand();
|
unit->finishCommand();
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true && frameIndex < 0) {
|
||||||
|
char szBuf[8096]="";
|
||||||
|
snprintf(szBuf,8096,"[updateAttack]");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled && chrono.getMillis() > 0) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s Line: %d] took msecs: %lld\n",__FILE__,__FUNCTION__,__LINE__,chrono.getMillis());
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled && chrono.getMillis() > 0) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s Line: %d] took msecs: %lld\n",__FILE__,__FUNCTION__,__LINE__,chrono.getMillis());
|
||||||
|
@ -627,6 +670,10 @@ void UnitUpdater::updateAttackStopped(Unit *unit, int frameIndex) {
|
||||||
clearUnitPrecache(unit);
|
clearUnitPrecache(unit);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true && frameIndex < 0) {
|
||||||
|
char szBuf[8096]="";
|
||||||
|
snprintf(szBuf,8096,"[updateAttackStopped]");
|
||||||
|
}
|
||||||
|
|
||||||
Chrono chrono;
|
Chrono chrono;
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled) chrono.start();
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled) chrono.start();
|
||||||
|
@ -1527,6 +1574,10 @@ void UnitUpdater::updateRepair(Unit *unit, int frameIndex) {
|
||||||
clearUnitPrecache(unit);
|
clearUnitPrecache(unit);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true && frameIndex < 0) {
|
||||||
|
char szBuf[8096]="";
|
||||||
|
snprintf(szBuf,8096,"[updateRepair]");
|
||||||
|
}
|
||||||
|
|
||||||
Chrono chrono;
|
Chrono chrono;
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled) chrono.start();
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled) chrono.start();
|
||||||
|
@ -1836,6 +1887,11 @@ void UnitUpdater::updateProduce(Unit *unit, int frameIndex) {
|
||||||
clearUnitPrecache(unit);
|
clearUnitPrecache(unit);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true && frameIndex < 0) {
|
||||||
|
char szBuf[8096]="";
|
||||||
|
snprintf(szBuf,8096,"[updateProduce]");
|
||||||
|
}
|
||||||
|
|
||||||
Chrono chrono;
|
Chrono chrono;
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled) chrono.start();
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled) chrono.start();
|
||||||
|
|
||||||
|
@ -1907,6 +1963,10 @@ void UnitUpdater::updateUpgrade(Unit *unit, int frameIndex) {
|
||||||
clearUnitPrecache(unit);
|
clearUnitPrecache(unit);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true && frameIndex < 0) {
|
||||||
|
char szBuf[8096]="";
|
||||||
|
snprintf(szBuf,8096,"[updateUpgrade]");
|
||||||
|
}
|
||||||
|
|
||||||
Chrono chrono;
|
Chrono chrono;
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled) chrono.start();
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled) chrono.start();
|
||||||
|
@ -1939,6 +1999,10 @@ void UnitUpdater::updateMorph(Unit *unit, int frameIndex) {
|
||||||
clearUnitPrecache(unit);
|
clearUnitPrecache(unit);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true && frameIndex < 0) {
|
||||||
|
char szBuf[8096]="";
|
||||||
|
snprintf(szBuf,8096,"[updateMorph]");
|
||||||
|
}
|
||||||
|
|
||||||
Chrono chrono;
|
Chrono chrono;
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled) chrono.start();
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled) chrono.start();
|
||||||
|
|
Loading…
Reference in New Issue