- attempt to detect oos by adding more crc and log info
This commit is contained in:
parent
769c1ced91
commit
37a53c114a
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue