mirror of
https://github.com/glest/glest-source.git
synced 2025-08-30 03:09:49 +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
|
//decrements HP and returns if dead
|
||||||
bool Unit::decHp(int decrementValue) {
|
bool Unit::decHp(int decrementValue) {
|
||||||
// char szBuf[8096]="";
|
char szBuf[8096]="";
|
||||||
// snprintf(szBuf,8095,"this->hp = %d, decrementValue = %d",this->hp,decrementValue);
|
snprintf(szBuf,8095,"this->hp = %d, decrementValue = %d",this->hp,decrementValue);
|
||||||
// addNetworkCRCDecHp(szBuf);
|
addNetworkCRCDecHp(szBuf);
|
||||||
|
|
||||||
if(this->hp == 0) {
|
if(this->hp == 0) {
|
||||||
return false;
|
return false;
|
||||||
@@ -4116,9 +4116,11 @@ bool Unit::showTranslatedTechTree() const {
|
|||||||
|
|
||||||
string Unit::getNetworkCRCDecHpList() const {
|
string Unit::getNetworkCRCDecHpList() const {
|
||||||
string result = "";
|
string result = "";
|
||||||
|
if(networkCRCDecHpList.empty() == false) {
|
||||||
for(unsigned int index = 0; index < networkCRCDecHpList.size(); ++index) {
|
for(unsigned int index = 0; index < networkCRCDecHpList.size(); ++index) {
|
||||||
result += networkCRCDecHpList[index] + " ";
|
result += networkCRCDecHpList[index] + " ";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
std::string Unit::toString(bool crcMode) const {
|
std::string Unit::toString(bool crcMode) const {
|
||||||
|
@@ -782,16 +782,16 @@ public:
|
|||||||
void setNetworkCRCParticleLogInfo(string networkCRCParticleLogInfo) { this->networkCRCParticleLogInfo = networkCRCParticleLogInfo; }
|
void setNetworkCRCParticleLogInfo(string networkCRCParticleLogInfo) { this->networkCRCParticleLogInfo = networkCRCParticleLogInfo; }
|
||||||
void setNetworkCRCParticleObserverLogInfo(string networkCRCParticleObserverLogInfo) { this->networkCRCParticleObserverLogInfo = networkCRCParticleObserverLogInfo; }
|
void setNetworkCRCParticleObserverLogInfo(string networkCRCParticleObserverLogInfo) { this->networkCRCParticleObserverLogInfo = networkCRCParticleObserverLogInfo; }
|
||||||
|
|
||||||
//void clearNetworkCRCDecHpList() { networkCRCDecHpList.clear(); }
|
void clearNetworkCRCDecHpList() { networkCRCDecHpList.clear(); }
|
||||||
void clearNetworkCRCDecHpList() { }
|
//void clearNetworkCRCDecHpList() { }
|
||||||
|
|
||||||
Checksum getCRC();
|
Checksum getCRC();
|
||||||
|
|
||||||
virtual void end(ParticleSystem *particleSystem);
|
virtual void end(ParticleSystem *particleSystem);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
//void addNetworkCRCDecHp(string info) { networkCRCDecHpList.push_back(info); }
|
void addNetworkCRCDecHp(string info) { networkCRCDecHpList.push_back(info); }
|
||||||
void addNetworkCRCDecHp(string info) { }
|
//void addNetworkCRCDecHp(string info) { }
|
||||||
string getNetworkCRCDecHpList() const;
|
string getNetworkCRCDecHpList() const;
|
||||||
|
|
||||||
float computeHeight(const Vec2i &pos) const;
|
float computeHeight(const Vec2i &pos) const;
|
||||||
|
@@ -2306,7 +2306,8 @@ bool ParticleManager::hasActiveParticleSystem(ParticleSystem::ParticleSystemType
|
|||||||
//currentParticleCount+= ps->getAliveParticleCount();
|
//currentParticleCount+= ps->getAliveParticleCount();
|
||||||
|
|
||||||
bool showParticle= true;
|
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);
|
showParticle= ps->getVisible() || (ps->getState() == ParticleSystem::sFade);
|
||||||
}
|
}
|
||||||
if(showParticle == true){
|
if(showParticle == true){
|
||||||
|
Reference in New Issue
Block a user