Revert duck fix

This commit is contained in:
Michael Steenbeek 2019-01-24 10:40:04 +01:00 committed by GitHub
parent 22fac20907
commit 247e89eb53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 7 deletions

View File

@ -30,7 +30,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 "23"
#define NETWORK_STREAM_VERSION "24"
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION
static rct_peep* _pickup_peep = nullptr;

View File

@ -426,13 +426,11 @@ static int32_t scenario_create_ducks()
{
int32_t i, j, r, c, x, y, waterZ, centreWaterZ, x2, y2;
// Originally, this function generated coordinates from 64 to 191.
// It now generates coordinates from 0 to 255, so smaller maps may also spawn ducks.
r = scenario_rand();
x = ((r >> 16) & 0xFFFF) % MAXIMUM_MAP_SIZE_TECHNICAL;
y = (r & 0xFFFF) % MAXIMUM_MAP_SIZE_TECHNICAL;
x = x * 32;
y = y * 32;
x = ((r >> 16) & 0xFFFF) & 0x7F;
y = (r & 0xFFFF) & 0x7F;
x = (x + 64) * 32;
y = (y + 64) * 32;
if (!map_is_location_in_park({ x, y }))
return 0;