- additional cleanup of crc logging (remove highlight value)

- add a bit more info to crc related to upgrades
This commit is contained in:
Mark Vejvoda 2013-09-21 06:06:48 +00:00
parent fd1e5f893a
commit 1633a80b69
2 changed files with 61 additions and 9 deletions

View File

@ -2489,8 +2489,10 @@ void Unit::updateTimedParticles() {
UnitParticleSystem *ps = unitParticleSystems[i];
if(ps != NULL) {
if(Renderer::getInstance().validateParticleSystemStillExists(ps,rsGame) == true) {
double particleStartTime = truncateDecimal<double>(ps->getStartTime());
double particleEndTime = truncateDecimal<double>(ps->getEndTime());
float pst = ps->getStartTime();
float pet = ps->getEndTime();
double particleStartTime = truncateDecimal<double>(pst);
double particleEndTime = truncateDecimal<double>(pet);
if(particleStartTime != 0.0 || particleEndTime != 1.0) {
//printf("Checking for end particle system #%d [%d] [%f] [%f] [%f] [%f]\n",i,ps->shape,truncateDecimal<float>(ps->getStartTime()),truncateDecimal<float>(ps->getEndTime()),truncateDecimal<float>(animProgress),truncateDecimal<float>(lastAnimProgress));
@ -4098,7 +4100,9 @@ std::string Unit::toString(bool crcMode) const {
result += "\n";
result += " lastAnimProgress = " + intToStr(this->lastAnimProgress);
result += " animProgress = " + intToStr(this->animProgress);
result += " highlight = " + floatToStr(this->highlight,16);
if(crcMode == false) {
result += " highlight = " + floatToStr(this->highlight,16);
}
result += " progress2 = " + intToStr(this->progress2);
result += " kills = " + intToStr(this->kills);
result += " enemyKills = " + intToStr(this->enemyKills);
@ -5051,6 +5055,9 @@ Checksum Unit::getCRC() {
}
//TotalUpgrade totalUpgrade;
uint32 crc = totalUpgrade.getCRC().getSum();
crcForUnit.addBytes(&crc,sizeof(uint32));
//Map *map;
//UnitPathInterface *unitPath;
//WaypointPath waypointPath;

View File

@ -125,26 +125,71 @@ public:
result += "sightIsMultiplier = " + intToStr(sightIsMultiplier);
result += " maxEp = " + intToStr(maxEp);
result += "maxEpIsMultiplier = " + intToStr(maxEpIsMultiplier);
result += " maxEpIsMultiplier = " + intToStr(maxEpIsMultiplier);
result += " maxEpRegeneration = " + intToStr(maxEpRegeneration);
//result += "maxEpRegenerationIsMultiplier = " + intToStr(maxEpRegenerationIsMultiplier);
result += " armor = " + intToStr(armor);
result += "armorIsMultiplier = " + intToStr(armorIsMultiplier);
result += " armorIsMultiplier = " + intToStr(armorIsMultiplier);
result += " attackStrength = " + intToStr(attackStrength);
result += "attackStrengthIsMultiplier = " + intToStr(attackStrengthIsMultiplier);
result += " attackStrengthIsMultiplier = " + intToStr(attackStrengthIsMultiplier);
result += " attackRange = " + intToStr(attackRange);
result += "attackRangeIsMultiplier = " + intToStr(attackRangeIsMultiplier);
result += " attackRangeIsMultiplier = " + intToStr(attackRangeIsMultiplier);
result += " moveSpeed = " + intToStr(moveSpeed);
result += "moveSpeedIsMultiplier = " + intToStr(moveSpeedIsMultiplier);
result += " moveSpeedIsMultiplier = " + intToStr(moveSpeedIsMultiplier);
result += " prodSpeed = " + intToStr(prodSpeed);
result += "prodSpeedIsMultiplier = " + intToStr(prodSpeedIsMultiplier);
result += " prodSpeedIsMultiplier = " + intToStr(prodSpeedIsMultiplier);
return result;
}
virtual void saveGame(XmlNode *rootNode) const;
static const UpgradeType * loadGame(const XmlNode *rootNode, Faction *faction);
Checksum getCRC() {
Checksum crcForUpgradeType;
crcForUpgradeType.addString(upgradename);
crcForUpgradeType.addInt(maxHp);
crcForUpgradeType.addInt(maxHpIsMultiplier);
crcForUpgradeType.addInt(maxHpRegeneration);
crcForUpgradeType.addInt(sight);
crcForUpgradeType.addInt(sightIsMultiplier);
crcForUpgradeType.addInt(maxEp);
crcForUpgradeType.addInt(maxEpIsMultiplier);
crcForUpgradeType.addInt(maxEpRegeneration);
crcForUpgradeType.addInt(armor);
crcForUpgradeType.addInt(armorIsMultiplier);
crcForUpgradeType.addInt(attackStrength);
crcForUpgradeType.addInt(attackStrengthIsMultiplier);
//std::map<string,int> attackStrengthMultiplierValueList;
crcForUpgradeType.addInt64((int64)attackStrengthMultiplierValueList.size());
crcForUpgradeType.addInt(attackRange);
crcForUpgradeType.addInt(attackRangeIsMultiplier);
//std::map<string,int> attackRangeMultiplierValueList;
crcForUpgradeType.addInt64((int64)attackRangeMultiplierValueList.size());
crcForUpgradeType.addInt(moveSpeed);
crcForUpgradeType.addInt(moveSpeedIsMultiplier);
//std::map<string,int> moveSpeedIsMultiplierValueList;
crcForUpgradeType.addInt64((int64)moveSpeedIsMultiplierValueList.size());
crcForUpgradeType.addInt(prodSpeed);
crcForUpgradeType.addInt(prodSpeedIsMultiplier);
//std::map<string,int> prodSpeedProduceIsMultiplierValueList;
crcForUpgradeType.addInt64((int64)prodSpeedProduceIsMultiplierValueList.size());
//std::map<string,int> prodSpeedUpgradeIsMultiplierValueList;
crcForUpgradeType.addInt64((int64)prodSpeedUpgradeIsMultiplierValueList.size());
//std::map<string,int> prodSpeedMorphIsMultiplierValueList;
crcForUpgradeType.addInt64((int64)prodSpeedMorphIsMultiplierValueList.size());
return crcForUpgradeType;
}
};
// ===============================