mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-24 00:03:11 +01:00
Fix #3267. Two bugs fixed grass length detected and activity timeout.
The grass length detection had been simplified but failed to account for the upper bits being used as none graphical grass length changes. This caused mown grass to be detected as unmown. Most staff functions have an activity timeout to prevent them from repeatedly doing activities in the exact same location. Mown grass did not have this timeout reset in the original game. The reset has now been removed.
This commit is contained in:
@@ -4134,7 +4134,6 @@ static void peep_update_queuing(rct_peep* peep){
|
||||
* rct2: 0x006BF567
|
||||
*/
|
||||
static void peep_update_mowing(rct_peep* peep){
|
||||
peep->var_E2 = 0;
|
||||
if (!checkForPath(peep))return;
|
||||
|
||||
invalidate_sprite_2((rct_sprite*)peep);
|
||||
@@ -5321,7 +5320,7 @@ static int peep_update_patrolling_find_grass(rct_peep* peep){
|
||||
if ((map_element->properties.surface.terrain & MAP_ELEMENT_SURFACE_TERRAIN_MASK) != TERRAIN_GRASS)
|
||||
return 0;
|
||||
|
||||
if (map_element->properties.surface.grass_length < GRASS_LENGTH_CLEAR_1)
|
||||
if ((map_element->properties.surface.grass_length & 0x7) < GRASS_LENGTH_CLEAR_1)
|
||||
return 0;
|
||||
|
||||
peep_decrement_num_riders(peep);
|
||||
|
||||
@@ -691,7 +691,7 @@ static uint8 staff_handyman_direction_to_uncut_grass(rct_peep* peep, uint8 valid
|
||||
if (abs(mapElement->base_height - peep->next_z) > 2)
|
||||
continue;
|
||||
|
||||
if (!(mapElement->properties.surface.grass_length & GRASS_LENGTH_CLUMPS_2))
|
||||
if ((mapElement->properties.surface.grass_length & 0x7) < GRASS_LENGTH_CLEAR_1)
|
||||
continue;
|
||||
|
||||
return chosenDirection;
|
||||
|
||||
Reference in New Issue
Block a user