- updated to beta2 and added primitive CRC checking for network games, requies the Host user to set the following ini to enable CRC's:

EnableNetworkGameSynchChecks=true
This commit is contained in:
Mark Vejvoda
2013-09-12 03:33:43 +00:00
parent 6f85a6aa4a
commit b5e26070b1
21 changed files with 452 additions and 41 deletions

View File

@@ -128,6 +128,27 @@ uint32 Checksum::addInt(const int32 &value) {
return sum;
}
uint32 Checksum::addInt64(const int64 &value) {
int8 byte = (value >> 0) & 0xFF;
addByte(byte);
byte = (value >> 8) & 0xFF;
addByte(byte);
byte = (value >> 16) & 0xFF;
addByte(byte);
byte = (value >> 24) & 0xFF;
addByte(byte);
byte = (value >> 32) & 0xFF;
addByte(byte);
byte = (value >> 40) & 0xFF;
addByte(byte);
byte = (value >> 48) & 0xFF;
addByte(byte);
byte = (value >> 56) & 0xFF;
addByte(byte);
return sum;
}
void Checksum::addString(const string &value) {
for(unsigned int i = 0; i < value.size(); ++i) {
addByte(value[i]);