mirror of
https://github.com/glest/glest-source.git
synced 2025-08-08 17:36:30 +02:00
- attempt to detect oos by adding more crc and log info
This commit is contained in:
@@ -5223,6 +5223,9 @@ Checksum Unit::getCRC() {
|
||||
//Vec2i currentPathFinderDesiredFinalPos;
|
||||
|
||||
crcForUnit.addInt(random.getLastNumber());
|
||||
if(this->random.getLastCaller() != "") {
|
||||
crcForUnit.addString(this->random.getLastCaller());
|
||||
}
|
||||
|
||||
if(consoleDebug) printf("#16 Unit: %d CRC: %u\n",id,crcForUnit.getSum());
|
||||
|
||||
|
@@ -46,8 +46,8 @@ public:
|
||||
void setLastNumber(int value) { lastNumber = value; }
|
||||
|
||||
std::string getLastCaller() const;
|
||||
//void clearLastCaller() { lastCaller.clear(); }
|
||||
void clearLastCaller() { }
|
||||
void clearLastCaller() { lastCaller.clear(); }
|
||||
//void clearLastCaller() { }
|
||||
};
|
||||
|
||||
}}//end namespace
|
||||
|
@@ -40,6 +40,7 @@ void RandomGen::init(int seed){
|
||||
}
|
||||
|
||||
int RandomGen::rand(string lastCaller) {
|
||||
this->lastCaller.push_back(lastCaller);
|
||||
this->lastNumber = (a*lastNumber + b) % m;
|
||||
return lastNumber;
|
||||
}
|
||||
|
Reference in New Issue
Block a user