mirror of
https://github.com/glest/glest-source.git
synced 2025-08-29 19:00:07 +02:00
re-enable some hitpoint tracking for crc checks
This commit is contained in:
@@ -3007,9 +3007,9 @@ bool Unit::repair(){
|
||||
|
||||
//decrements HP and returns if dead
|
||||
bool Unit::decHp(int decrementValue) {
|
||||
// char szBuf[8096]="";
|
||||
// snprintf(szBuf,8095,"this->hp = %d, decrementValue = %d",this->hp,decrementValue);
|
||||
// addNetworkCRCDecHp(szBuf);
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8095,"this->hp = %d, decrementValue = %d",this->hp,decrementValue);
|
||||
addNetworkCRCDecHp(szBuf);
|
||||
|
||||
if(this->hp == 0) {
|
||||
return false;
|
||||
@@ -4116,9 +4116,11 @@ bool Unit::showTranslatedTechTree() const {
|
||||
|
||||
string Unit::getNetworkCRCDecHpList() const {
|
||||
string result = "";
|
||||
if(networkCRCDecHpList.empty() == false) {
|
||||
for(unsigned int index = 0; index < networkCRCDecHpList.size(); ++index) {
|
||||
result += networkCRCDecHpList[index] + " ";
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
std::string Unit::toString(bool crcMode) const {
|
||||
|
@@ -782,16 +782,16 @@ public:
|
||||
void setNetworkCRCParticleLogInfo(string networkCRCParticleLogInfo) { this->networkCRCParticleLogInfo = networkCRCParticleLogInfo; }
|
||||
void setNetworkCRCParticleObserverLogInfo(string networkCRCParticleObserverLogInfo) { this->networkCRCParticleObserverLogInfo = networkCRCParticleObserverLogInfo; }
|
||||
|
||||
//void clearNetworkCRCDecHpList() { networkCRCDecHpList.clear(); }
|
||||
void clearNetworkCRCDecHpList() { }
|
||||
void clearNetworkCRCDecHpList() { networkCRCDecHpList.clear(); }
|
||||
//void clearNetworkCRCDecHpList() { }
|
||||
|
||||
Checksum getCRC();
|
||||
|
||||
virtual void end(ParticleSystem *particleSystem);
|
||||
|
||||
private:
|
||||
//void addNetworkCRCDecHp(string info) { networkCRCDecHpList.push_back(info); }
|
||||
void addNetworkCRCDecHp(string info) { }
|
||||
void addNetworkCRCDecHp(string info) { networkCRCDecHpList.push_back(info); }
|
||||
//void addNetworkCRCDecHp(string info) { }
|
||||
string getNetworkCRCDecHpList() const;
|
||||
|
||||
float computeHeight(const Vec2i &pos) const;
|
||||
|
@@ -2306,7 +2306,8 @@ bool ParticleManager::hasActiveParticleSystem(ParticleSystem::ParticleSystemType
|
||||
//currentParticleCount+= ps->getAliveParticleCount();
|
||||
|
||||
bool showParticle= true;
|
||||
if(dynamic_cast<UnitParticleSystem *> (ps) != NULL || dynamic_cast<FireParticleSystem *> (ps) != NULL){
|
||||
if(dynamic_cast<UnitParticleSystem *> (ps) != NULL ||
|
||||
dynamic_cast<FireParticleSystem *> (ps) != NULL) {
|
||||
showParticle= ps->getVisible() || (ps->getState() == ParticleSystem::sFade);
|
||||
}
|
||||
if(showParticle == true){
|
||||
|
Reference in New Issue
Block a user