Skip to content

Commit

Permalink
Fix OpenRCT2#7229: Exploding guests cheat causes game freezes
Browse files Browse the repository at this point in the history
  • Loading branch information
deurklink committed Mar 11, 2018
1 parent 93041bb commit 0f68d2a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/openrct2/network/Network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 "39"
#define NETWORK_STREAM_VERSION "40"
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION

static rct_peep* _pickup_peep = nullptr;
Expand Down
17 changes: 12 additions & 5 deletions src/openrct2/peep/Peep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -989,13 +989,20 @@ static void sub_68F41A(rct_peep * peep, sint32 index)

if (peep->peep_flags & PEEP_FLAGS_EXPLODE && peep->x != LOCATION_NULL)
{
audio_play_sound_at_location(SOUND_CRASH, peep->x, peep->y, peep->z);
if (peep->state == PEEP_STATE_WALKING || peep->state == PEEP_STATE_SITTING)
{
audio_play_sound_at_location(SOUND_CRASH, peep->x, peep->y, peep->z);

sprite_misc_explosion_cloud_create(peep->x, peep->y, peep->z + 16);
sprite_misc_explosion_flare_create(peep->x, peep->y, peep->z + 16);
sprite_misc_explosion_cloud_create(peep->x, peep->y, peep->z + 16);
sprite_misc_explosion_flare_create(peep->x, peep->y, peep->z + 16);

peep_remove(peep);
return;
peep_remove(peep);
return;
}
else
{
peep->peep_flags &= ~PEEP_FLAGS_EXPLODE;
}
}

if (peep->peep_flags & PEEP_FLAGS_HUNGER)
Expand Down

0 comments on commit 0f68d2a

Please sign in to comment.