mirror of https://github.com/OpenRCT2/OpenRCT2.git
Rename Peep::staff_mowing_timeout to StaffMowingTimeout
This commit is contained in:
parent
231b704fa7
commit
0e170d40d4
|
@ -244,7 +244,7 @@ private:
|
||||||
// Staff energy determines their walking speed
|
// Staff energy determines their walking speed
|
||||||
newPeep->energy = 0x60;
|
newPeep->energy = 0x60;
|
||||||
newPeep->energy_target = 0x60;
|
newPeep->energy_target = 0x60;
|
||||||
newPeep->staff_mowing_timeout = 0;
|
newPeep->StaffMowingTimeout = 0;
|
||||||
|
|
||||||
newPeep->staff_id = staffIndex;
|
newPeep->staff_id = staffIndex;
|
||||||
|
|
||||||
|
|
|
@ -3170,7 +3170,7 @@ void Peep::PerformNextAction(uint8_t& pathing_result, TileElement*& tile_result)
|
||||||
if (type == PEEP_TYPE_STAFF && !GetNextIsSurface())
|
if (type == PEEP_TYPE_STAFF && !GetNextIsSurface())
|
||||||
{
|
{
|
||||||
// Prevent staff from leaving the path on their own unless they're allowed to mow.
|
// Prevent staff from leaving the path on their own unless they're allowed to mow.
|
||||||
if (!((this->staff_orders & STAFF_ORDERS_MOWING) && this->staff_mowing_timeout >= 12))
|
if (!((this->staff_orders & STAFF_ORDERS_MOWING) && this->StaffMowingTimeout >= 12))
|
||||||
{
|
{
|
||||||
peep_return_to_centre_of_tile(this);
|
peep_return_to_centre_of_tile(this);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -706,7 +706,7 @@ struct Peep : SpriteBase
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
uint8_t time_on_ride;
|
uint8_t time_on_ride;
|
||||||
uint8_t staff_mowing_timeout;
|
uint8_t StaffMowingTimeout;
|
||||||
};
|
};
|
||||||
// 0x3F Sick Count split into lots of 3 with time, 0xC0 Time since last recalc
|
// 0x3F Sick Count split into lots of 3 with time, 0xC0 Time since last recalc
|
||||||
uint8_t DisgustingCount;
|
uint8_t DisgustingCount;
|
||||||
|
|
|
@ -611,7 +611,7 @@ int32_t Staff::HandymanDirectionRandSurface(uint8_t validDirections)
|
||||||
*/
|
*/
|
||||||
bool Staff::DoHandymanPathFinding()
|
bool Staff::DoHandymanPathFinding()
|
||||||
{
|
{
|
||||||
staff_mowing_timeout++;
|
StaffMowingTimeout++;
|
||||||
|
|
||||||
uint8_t litterDirection = INVALID_DIRECTION;
|
uint8_t litterDirection = INVALID_DIRECTION;
|
||||||
uint8_t validDirections = staff_get_valid_patrol_directions(this, NextLoc);
|
uint8_t validDirections = staff_get_valid_patrol_directions(this, NextLoc);
|
||||||
|
@ -622,7 +622,7 @@ bool Staff::DoHandymanPathFinding()
|
||||||
}
|
}
|
||||||
|
|
||||||
Direction newDirection = INVALID_DIRECTION;
|
Direction newDirection = INVALID_DIRECTION;
|
||||||
if (litterDirection == INVALID_DIRECTION && (staff_orders & STAFF_ORDERS_MOWING) && staff_mowing_timeout >= 12)
|
if (litterDirection == INVALID_DIRECTION && (staff_orders & STAFF_ORDERS_MOWING) && StaffMowingTimeout >= 12)
|
||||||
{
|
{
|
||||||
newDirection = staff_handyman_direction_to_uncut_grass(this, validDirections);
|
newDirection = staff_handyman_direction_to_uncut_grass(this, validDirections);
|
||||||
}
|
}
|
||||||
|
@ -1242,7 +1242,7 @@ void Staff::UpdateMowing()
|
||||||
*/
|
*/
|
||||||
void Staff::UpdateWatering()
|
void Staff::UpdateWatering()
|
||||||
{
|
{
|
||||||
staff_mowing_timeout = 0;
|
StaffMowingTimeout = 0;
|
||||||
if (sub_state == 0)
|
if (sub_state == 0)
|
||||||
{
|
{
|
||||||
if (!CheckForPath())
|
if (!CheckForPath())
|
||||||
|
@ -1305,7 +1305,7 @@ void Staff::UpdateWatering()
|
||||||
*/
|
*/
|
||||||
void Staff::UpdateEmptyingBin()
|
void Staff::UpdateEmptyingBin()
|
||||||
{
|
{
|
||||||
staff_mowing_timeout = 0;
|
StaffMowingTimeout = 0;
|
||||||
|
|
||||||
if (sub_state == 0)
|
if (sub_state == 0)
|
||||||
{
|
{
|
||||||
|
@ -1386,7 +1386,7 @@ void Staff::UpdateEmptyingBin()
|
||||||
*/
|
*/
|
||||||
void Staff::UpdateSweeping()
|
void Staff::UpdateSweeping()
|
||||||
{
|
{
|
||||||
staff_mowing_timeout = 0;
|
StaffMowingTimeout = 0;
|
||||||
if (!CheckForPath())
|
if (!CheckForPath())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -1785,7 +1785,7 @@ static int32_t peep_update_patrolling_find_grass(Peep* peep)
|
||||||
if (!(peep->staff_orders & STAFF_ORDERS_MOWING))
|
if (!(peep->staff_orders & STAFF_ORDERS_MOWING))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (peep->staff_mowing_timeout < 12)
|
if (peep->StaffMowingTimeout < 12)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (!(peep->GetNextIsSurface()))
|
if (!(peep->GetNextIsSurface()))
|
||||||
|
|
Loading…
Reference in New Issue