mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-24 00:03:11 +01:00
Ignore UI-only flag in sprite checksum
Ignore peep.window_invalidate_flags in sprite checksum to prevent false positivie desync alerts, flag does not affect game state.
This commit is contained in:
committed by
Michał Janiszewski
parent
10740106f2
commit
def76edd55
@@ -56,7 +56,7 @@ extern "C" {
|
||||
// This define specifies which version of network stream current build uses.
|
||||
// It is used for making sure only compatible builds get connected, even within
|
||||
// single OpenRCT2 version.
|
||||
#define NETWORK_STREAM_VERSION "17"
|
||||
#define NETWORK_STREAM_VERSION "18"
|
||||
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -212,6 +212,12 @@ const char * sprite_checksum()
|
||||
rct_sprite copy = *sprite;
|
||||
copy.unknown.sprite_left = copy.unknown.sprite_right = copy.unknown.sprite_top = copy.unknown.sprite_bottom = 0;
|
||||
|
||||
if (copy.unknown.sprite_identifier == SPRITE_IDENTIFIER_PEEP) {
|
||||
// We set this to 0 because as soon the client selects a guest the window will remove the
|
||||
// invalidation flags causing the sprite checksum to be different than on server, the flag does not affect game state.
|
||||
copy.peep.window_invalidate_flags = 0;
|
||||
}
|
||||
|
||||
if (EVP_DigestUpdate(gHashCTX, ©, sizeof(rct_sprite)) <= 0)
|
||||
{
|
||||
openrct2_assert(false, "Failed to update digest");
|
||||
|
||||
Reference in New Issue
Block a user