mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-21 14:02:59 +01:00
Fix desync if "Handyman mow grass by default" is checked. (#5652)
This commit is contained in:
committed by
Michał Janiszewski
parent
595e73e2d9
commit
08230f047c
@@ -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 "16"
|
||||
#define NETWORK_STREAM_VERSION "17"
|
||||
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -346,11 +346,6 @@ static money32 staff_hire_new_staff_member(uint8 staff_type, uint8 flags, sint16
|
||||
}
|
||||
}
|
||||
|
||||
if ((staff_type == STAFF_TYPE_HANDYMAN) && gConfigGeneral.handymen_mow_default) {
|
||||
uint8 new_orders = newPeep->staff_orders | STAFF_ORDERS_MOWING;
|
||||
game_do_command(newPeep->x, ((sint32)new_orders << 8) | 1, newPeep->y, newPeep->sprite_index, GAME_COMMAND_SET_STAFF_ORDER, 0, 0);
|
||||
}
|
||||
|
||||
*newPeep_sprite_index = newPeep->sprite_index;
|
||||
}
|
||||
return 0;
|
||||
@@ -564,6 +559,12 @@ uint16 hire_new_staff_member(uint8 staffType)
|
||||
if (result == MONEY32_UNDEFINED)
|
||||
return SPRITE_INDEX_NULL;
|
||||
|
||||
if ((staffType == STAFF_TYPE_HANDYMAN) && gConfigGeneral.handymen_mow_default) {
|
||||
rct_peep *newPeep = GET_PEEP(new_sprite_index);
|
||||
uint8 new_orders = newPeep->staff_orders | STAFF_ORDERS_MOWING;
|
||||
game_do_command(newPeep->x, ((sint32)new_orders << 8) | GAME_COMMAND_FLAG_APPLY, newPeep->y, new_sprite_index, GAME_COMMAND_SET_STAFF_ORDER, 0, 0);
|
||||
}
|
||||
|
||||
return new_sprite_index;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user