equal
deleted
inserted
replaced
982 checkFails(s = digest, 'Loaded map or other critical resource does not match across all players', true); |
982 checkFails(s = digest, 'Loaded map or other critical resource does not match across all players', true); |
983 end; |
983 end; |
984 |
984 |
985 procedure chSendLandDigest(var s: shortstring); |
985 procedure chSendLandDigest(var s: shortstring); |
986 var i: LongInt; |
986 var i: LongInt; |
987 begin |
987 landPixelDigest : LongInt; |
|
988 begin |
|
989 landPixelDigest:= 1; |
988 for i:= 0 to LAND_HEIGHT-1 do |
990 for i:= 0 to LAND_HEIGHT-1 do |
989 syncedPixelDigest:= Adler32Update(syncedPixelDigest, @Land[i,0], LAND_WIDTH*2); |
991 landPixelDigest:= Adler32Update(landPixelDigest, @Land[i,0], LAND_WIDTH*2); |
990 s:= 'M' + IntToStr(syncedPixelDigest); // + cScriptName; script name is no longer needed. scripts are hashed |
992 s:= 'M' + IntToStr(syncedPixelDigest)+'|'+IntToStr(landPixelDigest); |
991 |
993 |
992 ScriptSetString('LandDigest', s); |
994 ScriptSetString('LandDigest',IntToStr(landPixelDigest)); |
993 |
995 |
994 chLandCheck(s); |
996 chLandCheck(s); |
995 if allOK then SendIPCRaw(@s[0], Length(s) + 1) |
997 if allOK then SendIPCRaw(@s[0], Length(s) + 1) |
996 end; |
998 end; |
997 |
999 |