mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-18 05:22:42 +01:00
Fix the order predicate for GameCommands
This commit bumps the network stream version
This commit is contained in:
committed by
Michał Janiszewski
parent
5d85ea1410
commit
e4b42f58a5
@@ -34,7 +34,7 @@
|
|||||||
// This string specifies which version of network stream current build uses.
|
// This string specifies which version of network stream current build uses.
|
||||||
// It is used for making sure only compatible builds get connected, even within
|
// It is used for making sure only compatible builds get connected, even within
|
||||||
// single OpenRCT2 version.
|
// single OpenRCT2 version.
|
||||||
#define NETWORK_STREAM_VERSION "4"
|
#define NETWORK_STREAM_VERSION "5"
|
||||||
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION
|
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION
|
||||||
|
|
||||||
static rct_peep* _pickup_peep = nullptr;
|
static rct_peep* _pickup_peep = nullptr;
|
||||||
|
|||||||
@@ -217,7 +217,14 @@ private:
|
|||||||
uint8 callback = 0;
|
uint8 callback = 0;
|
||||||
uint32 commandIndex = 0;
|
uint32 commandIndex = 0;
|
||||||
bool operator<(const GameCommand& comp) const {
|
bool operator<(const GameCommand& comp) const {
|
||||||
return tick < comp.tick && commandIndex < comp.commandIndex;
|
// First sort by tick
|
||||||
|
if (tick < comp.tick)
|
||||||
|
return true;
|
||||||
|
if (tick > comp.tick)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// If the ticks are equal sort by commandIndex
|
||||||
|
return commandIndex < comp.commandIndex;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user