added more debug info to unit crc logs
This commit is contained in:
parent
b716cea3e7
commit
013ed35c8b
|
@ -1994,6 +1994,12 @@ int64 Unit::getUpdatedProgress(int64 currentProgress, int64 updateFPS, int64 spe
|
||||||
if(speed > 0 && diagonalFactor > 0 && heightFactor > 0 && progressIncrease == 0) {
|
if(speed > 0 && diagonalFactor > 0 && heightFactor > 0 && progressIncrease == 0) {
|
||||||
progressIncrease = 1;
|
progressIncrease = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char szBuf[8096]="";
|
||||||
|
snprintf(szBuf,8095,"currentProgress = " MG_I64_SPECIFIER " updateFPS = " MG_I64_SPECIFIER " speed = " MG_I64_SPECIFIER " diagonalFactor = " MG_I64_SPECIFIER " heightFactor = " MG_I64_SPECIFIER " speedDenominator = " MG_I64_SPECIFIER " progressIncrease = " MG_I64_SPECIFIER " [" MG_I64_SPECIFIER "]",
|
||||||
|
currentProgress,updateFPS,speed,diagonalFactor,heightFactor,speedDenominator,progressIncrease,((speed * diagonalFactor * heightFactor) / speedDenominator));
|
||||||
|
networkCRCLogInfo = szBuf;
|
||||||
|
|
||||||
newProgress += progressIncrease;
|
newProgress += progressIncrease;
|
||||||
|
|
||||||
// if(currSkill->getClass() == scMove || (currSkill->getClass() == scStop && this->loadCount > 0)) {
|
// if(currSkill->getClass() == scMove || (currSkill->getClass() == scStop && this->loadCount > 0)) {
|
||||||
|
@ -4066,6 +4072,8 @@ std::string Unit::toString(bool crcMode) const {
|
||||||
result += " deadCount = " + intToStr(this->deadCount);
|
result += " deadCount = " + intToStr(this->deadCount);
|
||||||
result += " progress = " + intToStr(this->progress);
|
result += " progress = " + intToStr(this->progress);
|
||||||
result += "\n";
|
result += "\n";
|
||||||
|
result += "networkCRCLogInfo = " + networkCRCLogInfo;
|
||||||
|
result += "\n";
|
||||||
result += " lastAnimProgress = " + intToStr(this->lastAnimProgress);
|
result += " lastAnimProgress = " + intToStr(this->lastAnimProgress);
|
||||||
result += " animProgress = " + intToStr(this->animProgress);
|
result += " animProgress = " + intToStr(this->animProgress);
|
||||||
result += " highlight = " + floatToStr(this->highlight,16);
|
result += " highlight = " + floatToStr(this->highlight,16);
|
||||||
|
|
|
@ -473,6 +473,8 @@ private:
|
||||||
|
|
||||||
Vec2i lastHarvestedResourcePos;
|
Vec2i lastHarvestedResourcePos;
|
||||||
|
|
||||||
|
string networkCRCLogInfo;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Unit(int id, UnitPathInterface *path, const Vec2i &pos, const UnitType *type, Faction *faction, Map *map, CardinalDir placeFacing);
|
Unit(int id, UnitPathInterface *path, const Vec2i &pos, const UnitType *type, Faction *faction, Map *map, CardinalDir placeFacing);
|
||||||
virtual ~Unit();
|
virtual ~Unit();
|
||||||
|
|
Loading…
Reference in New Issue