forked from rosebudai/OpenRCT2-Web
Rename Peep::next_in_queue to NextInQueue
This commit is contained in:
1 parent
f1f915b540
commit
d195c9fb1d
9 files changed
+22
-22
No files matched your search
@@ -261,7 +261,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots
|
||||
COMPARE_FIELD(Peep, action);
|
||||
COMPARE_FIELD(Peep, action_frame);
|
||||
COMPARE_FIELD(Peep, step_progress);
|
||||
COMPARE_FIELD(Peep, next_in_queue);
|
||||
COMPARE_FIELD(Peep, NextInQueue);
|
||||
COMPARE_FIELD(Peep, MazeLastEdge);
|
||||
COMPARE_FIELD(Peep, InteractionRideIndex);
|
||||
COMPARE_FIELD(Peep, TimeInQueue);
|
||||
|
||||
@@ -5551,14 +5551,14 @@ void Guest::UpdateQueuing()
|
||||
if (sub_state != 10)
|
||||
{
|
||||
bool is_front = true;
|
||||
if (next_in_queue != SPRITE_INDEX_NULL)
|
||||
if (NextInQueue != SPRITE_INDEX_NULL)
|
||||
{
|
||||
// Fix #4819: Occasionally the peep->next_in_queue is incorrectly set
|
||||
// Fix #4819: Occasionally the peep->NextInQueue is incorrectly set
|
||||
// to prevent this from causing the peeps to enter a loop
|
||||
// first check if the next in queue is actually nearby
|
||||
// if they are not then it's safe to assume that this is
|
||||
// the front of the queue.
|
||||
Peep* next_peep = GET_PEEP(next_in_queue);
|
||||
Peep* next_peep = GET_PEEP(NextInQueue);
|
||||
if (abs(next_peep->x - x) < 32 && abs(next_peep->y - y) < 32)
|
||||
{
|
||||
is_front = false;
|
||||
|
||||
@@ -2266,10 +2266,10 @@ void Peep::SwitchNextActionSpriteType()
|
||||
static bool peep_update_queue_position(Peep* peep, uint8_t previous_action)
|
||||
{
|
||||
peep->TimeInQueue++;
|
||||
if (peep->next_in_queue == SPRITE_INDEX_NULL)
|
||||
if (peep->NextInQueue == SPRITE_INDEX_NULL)
|
||||
return false;
|
||||
|
||||
Peep* peep_next = GET_PEEP(peep->next_in_queue);
|
||||
Peep* peep_next = GET_PEEP(peep->NextInQueue);
|
||||
|
||||
int16_t x_diff = abs(peep_next->x - peep->x);
|
||||
int16_t y_diff = abs(peep_next->y - peep->y);
|
||||
@@ -2430,7 +2430,7 @@ static void peep_interact_with_entrance(Peep* peep, int16_t x, int16_t y, TileEl
|
||||
|
||||
uint16_t previous_last = ride->stations[stationNum].LastPeepInQueue;
|
||||
ride->stations[stationNum].LastPeepInQueue = peep->sprite_index;
|
||||
peep->next_in_queue = previous_last;
|
||||
peep->NextInQueue = previous_last;
|
||||
ride->stations[stationNum].QueueLength++;
|
||||
|
||||
peep->current_ride = rideIndex;
|
||||
@@ -2858,7 +2858,7 @@ static void peep_interact_with_path(Peep* peep, int16_t x, int16_t y, TileElemen
|
||||
// Add the peep to the ride queue.
|
||||
uint16_t old_last_peep = ride->stations[stationNum].LastPeepInQueue;
|
||||
ride->stations[stationNum].LastPeepInQueue = peep->sprite_index;
|
||||
peep->next_in_queue = old_last_peep;
|
||||
peep->NextInQueue = old_last_peep;
|
||||
ride->stations[stationNum].QueueLength++;
|
||||
|
||||
peep_decrement_num_riders(peep);
|
||||
@@ -3425,7 +3425,7 @@ void Peep::RemoveFromQueue()
|
||||
|
||||
if (sprite_index == station.LastPeepInQueue)
|
||||
{
|
||||
station.LastPeepInQueue = next_in_queue;
|
||||
station.LastPeepInQueue = NextInQueue;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3433,12 +3433,12 @@ void Peep::RemoveFromQueue()
|
||||
while (spriteId != SPRITE_INDEX_NULL)
|
||||
{
|
||||
Peep* other_peep = GET_PEEP(spriteId);
|
||||
if (sprite_index == other_peep->next_in_queue)
|
||||
if (sprite_index == other_peep->NextInQueue)
|
||||
{
|
||||
other_peep->next_in_queue = next_in_queue;
|
||||
other_peep->NextInQueue = NextInQueue;
|
||||
return;
|
||||
}
|
||||
spriteId = other_peep->next_in_queue;
|
||||
spriteId = other_peep->NextInQueue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -665,7 +665,7 @@ struct Peep : SpriteBase
|
||||
union
|
||||
{
|
||||
uint16_t mechanic_time_since_call; // time getting to ride to fix
|
||||
uint16_t next_in_queue;
|
||||
uint16_t NextInQueue;
|
||||
};
|
||||
union
|
||||
{
|
||||
|
||||
@@ -1530,7 +1530,7 @@ private:
|
||||
// Doubles as staff orders
|
||||
dst->GuestIsLostCountdown = src->peep_is_lost_countdown;
|
||||
// The ID is fixed later
|
||||
dst->next_in_queue = src->next_in_queue;
|
||||
dst->NextInQueue = src->next_in_queue;
|
||||
|
||||
dst->PeepFlags = 0;
|
||||
dst->PathfindGoal.x = 0xFF;
|
||||
@@ -1581,7 +1581,7 @@ private:
|
||||
|
||||
void FixPeepNextInQueue(Peep* peep, const uint16_t* spriteIndexMap)
|
||||
{
|
||||
peep->next_in_queue = MapSpriteIndex(peep->next_in_queue, spriteIndexMap);
|
||||
peep->NextInQueue = MapSpriteIndex(peep->NextInQueue, spriteIndexMap);
|
||||
}
|
||||
|
||||
void ImportStaffPatrolArea(Peep* staffmember)
|
||||
|
||||
@@ -1183,7 +1183,7 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src)
|
||||
dst->action = static_cast<uint8_t>(src->action);
|
||||
dst->action_frame = src->action_frame;
|
||||
dst->step_progress = src->step_progress;
|
||||
dst->next_in_queue = src->next_in_queue;
|
||||
dst->next_in_queue = src->NextInQueue;
|
||||
dst->direction = src->PeepDirection;
|
||||
dst->interaction_ride_index = src->InteractionRideIndex;
|
||||
dst->time_in_queue = src->TimeInQueue;
|
||||
|
||||
@@ -1448,7 +1448,7 @@ public:
|
||||
dst->action = static_cast<PeepActionType>(src->action);
|
||||
dst->action_frame = src->action_frame;
|
||||
dst->step_progress = src->step_progress;
|
||||
dst->next_in_queue = src->next_in_queue;
|
||||
dst->NextInQueue = src->next_in_queue;
|
||||
dst->PeepDirection = src->direction;
|
||||
dst->InteractionRideIndex = src->interaction_ride_index;
|
||||
dst->TimeInQueue = src->time_in_queue;
|
||||
|
||||
@@ -309,7 +309,7 @@ Peep* Ride::GetQueueHeadGuest(StationIndex stationIndex) const
|
||||
uint16_t spriteIndex = stations[stationIndex].LastPeepInQueue;
|
||||
while ((peep = try_get_guest(spriteIndex)) != nullptr)
|
||||
{
|
||||
spriteIndex = peep->next_in_queue;
|
||||
spriteIndex = peep->NextInQueue;
|
||||
result = peep;
|
||||
}
|
||||
return result;
|
||||
@@ -322,7 +322,7 @@ void Ride::UpdateQueueLength(StationIndex stationIndex)
|
||||
uint16_t spriteIndex = stations[stationIndex].LastPeepInQueue;
|
||||
while ((peep = try_get_guest(spriteIndex)) != nullptr)
|
||||
{
|
||||
spriteIndex = peep->next_in_queue;
|
||||
spriteIndex = peep->NextInQueue;
|
||||
count++;
|
||||
}
|
||||
stations[stationIndex].QueueLength = count;
|
||||
@@ -333,7 +333,7 @@ void Ride::QueueInsertGuestAtFront(StationIndex stationIndex, Peep* peep)
|
||||
assert(stationIndex < MAX_STATIONS);
|
||||
assert(peep != nullptr);
|
||||
|
||||
peep->next_in_queue = SPRITE_INDEX_NULL;
|
||||
peep->NextInQueue = SPRITE_INDEX_NULL;
|
||||
Peep* queueHeadGuest = GetQueueHeadGuest(peep->current_ride_station);
|
||||
if (queueHeadGuest == nullptr)
|
||||
{
|
||||
@@ -341,7 +341,7 @@ void Ride::QueueInsertGuestAtFront(StationIndex stationIndex, Peep* peep)
|
||||
}
|
||||
else
|
||||
{
|
||||
queueHeadGuest->next_in_queue = peep->sprite_index;
|
||||
queueHeadGuest->NextInQueue = peep->sprite_index;
|
||||
}
|
||||
UpdateQueueLength(peep->current_ride_station);
|
||||
}
|
||||
|
||||
@@ -205,7 +205,7 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right)
|
||||
COMPARE_FIELD(action);
|
||||
COMPARE_FIELD(action_frame);
|
||||
COMPARE_FIELD(step_progress);
|
||||
COMPARE_FIELD(next_in_queue);
|
||||
COMPARE_FIELD(NextInQueue);
|
||||
COMPARE_FIELD(MazeLastEdge);
|
||||
COMPARE_FIELD(InteractionRideIndex);
|
||||
COMPARE_FIELD(TimeInQueue);
|
||||
|
||||
Reference in new issue
Block a user