mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-21 05:53:02 +01:00
Fix #7239: Remove all guests cheat crashes with ferris wheel
This commit is contained in:
committed by
Michael Steenbeek
parent
ad4e50d728
commit
87bdd4d079
@@ -374,10 +374,13 @@ static void cheat_remove_all_guests()
|
||||
while (spriteIndex != SPRITE_INDEX_NULL)
|
||||
{
|
||||
vehicle = GET_VEHICLE(spriteIndex);
|
||||
|
||||
for (size_t i = 0; i < vehicle->num_peeps; i++)
|
||||
for (size_t i = 0, offset = 0; i < vehicle->num_peeps; i++)
|
||||
{
|
||||
peep = GET_PEEP(vehicle->peep[i]);
|
||||
while (vehicle->peep[i + offset] == SPRITE_INDEX_NULL)
|
||||
{
|
||||
offset++;
|
||||
}
|
||||
peep = GET_PEEP(vehicle->peep[i + offset]);
|
||||
vehicle->mass -= peep->mass;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
// This string 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 "37"
|
||||
#define NETWORK_STREAM_VERSION "38"
|
||||
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION
|
||||
|
||||
static rct_peep* _pickup_peep = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user