1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-11 01:52:32 +01:00

Handle peep state directly in the update switch

This commit is contained in:
ζeh Matt
2025-05-21 17:32:35 +03:00
parent 04c75f6f8b
commit 5a98133c1d
4 changed files with 64 additions and 86 deletions

View File

@@ -5324,17 +5324,6 @@ void Guest::Update()
case PeepState::Picked:
UpdatePicked();
break;
default:
UpdateGuest();
break;
}
}
}
void Guest::UpdateGuest()
{
switch (State)
{
case PeepState::QueuingFront:
UpdateRide();
break;
@@ -5374,6 +5363,7 @@ void Guest::UpdateGuest()
break;
}
}
}
/**
*

View File

@@ -321,7 +321,6 @@ public:
uint64_t ItemFlags;
void Update();
void UpdateGuest();
void Tick128UpdateGuest(uint32_t index);
uint64_t GetFoodOrDrinkFlags() const;
uint64_t GetEmptyContainerFlags() const;

View File

@@ -1732,17 +1732,6 @@ void Staff::Update()
case PeepState::Picked:
UpdatePicked();
break;
default:
UpdateStaff(stepsToTake);
break;
}
}
}
void Staff::UpdateStaff(uint32_t stepsToTake)
{
switch (State)
{
case PeepState::Patrolling:
UpdatePatrolling();
break;
@@ -1776,6 +1765,7 @@ void Staff::UpdateStaff(uint32_t stepsToTake)
break;
}
}
}
/**
*

View File

@@ -60,7 +60,6 @@ public:
uint32_t StaffBinsEmptied;
void Update();
void UpdateStaff(uint32_t stepsToTake);
void Tick128UpdateStaff();
bool IsMechanic() const;
bool IsPatrolAreaSet(const CoordsXY& coords) const;