1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-27 00:34:46 +01:00

Compensate inferred sprite bounds for balloon/hat/umbrella sprites

This commit is contained in:
Aaron van Geffen
2024-12-17 18:54:43 +01:00
parent ec14a6dca8
commit e18abdd6a4
2 changed files with 10 additions and 0 deletions

View File

@@ -5,6 +5,7 @@
- Improved: [#23404] Folders are now paired with an icon in the load/save window.
- Fix: [#23286] Currency formatted incorrectly in the in game console.
- Fix: [#23348] Console set commands don't print output properly.
- Fix: [#23376] Peeps with balloons, hats and umbrellas may leave artifacts on screen.
0.4.17 (2024-12-08)
------------------------------------------------------------------------

View File

@@ -999,6 +999,15 @@ namespace OpenRCT2
continue;
anim.bounds = inferMaxAnimationDimensions(anim);
// Balloons, hats and umbrellas are painted separately, so the inference
// algorithm doesn't account for those. We manually compensate for these here.
// Between 8-12 pixels are needed, depending on rotation, so we're generalising.
auto pag = PeepAnimationGroup(groupKey);
if (pag == PeepAnimationGroup::Balloon || pag == PeepAnimationGroup::Hat || pag == PeepAnimationGroup::Umbrella)
{
anim.bounds.sprite_height_negative += 12;
}
}
}
}