1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-04 13:42:55 +01:00

Merge pull request #20362 from ZehMatt/peep-pickup-fix

Fix peep pickup being frame rate dependent
This commit is contained in:
Matthias Moninger
2023-06-08 02:01:59 +03:00
committed by GitHub
2 changed files with 11 additions and 12 deletions

View File

@@ -850,10 +850,12 @@ private:
void OnUpdateOverview()
{
int32_t newAnimationFrame = _guestAnimationFrame;
newAnimationFrame++;
newAnimationFrame %= 24;
_guestAnimationFrame = newAnimationFrame;
_guestAnimationFrame++;
_guestAnimationFrame %= 24;
// Update pickup animation, can only happen in this tab.
picked_peep_frame++;
picked_peep_frame %= 48;
WidgetInvalidate(*this, WIDX_TAB_1);
WidgetInvalidate(*this, WIDX_TAB_2);
@@ -930,11 +932,6 @@ private:
gPickupPeepX = screenCoords.x - 1;
gPickupPeepY = screenCoords.y + 16;
picked_peep_frame++;
if (picked_peep_frame >= 48)
{
picked_peep_frame = 0;
}
const auto peep = GetGuest();
if (peep == nullptr)

View File

@@ -633,6 +633,11 @@ private:
{
_tabAnimationOffset++;
_tabAnimationOffset %= 24;
// Update pickup animation, can only happen in this tab.
picked_peep_frame++;
picked_peep_frame %= 48;
InvalidateWidget(WIDX_TAB_1);
}
@@ -664,9 +669,6 @@ private:
gPickupPeepX = screenCoords.x - 1;
gPickupPeepY = screenCoords.y + 16;
picked_peep_frame++;
picked_peep_frame %= 48;
auto staff = GetStaff();
if (staff == nullptr)
{