When painting peeps, don't use rotations for 'picked up' sprites

This commit is contained in:
Aaron van Geffen 2024-04-28 15:10:09 +02:00
parent 8260640d89
commit 2232ce5ff8
1 changed files with 8 additions and 1 deletions

View File

@ -2819,7 +2819,14 @@ void Peep::Paint(PaintSession& session, int32_t imageDirection) const
// In the following 4 calls to PaintAddImageAsParent/PaintAddImageAsChild, we add 5 (instead of 3) to the
// bound_box_offset_z to make sure peeps are drawn on top of railways
uint32_t baseImageId = (imageDirection >> 3) + GetPeepAnimation(SpriteType, actionSpriteType).base_image + imageOffset * 4;
uint32_t baseImageId = GetPeepAnimation(SpriteType, actionSpriteType).base_image;
// Offset frame onto the base image, using rotation except for the 'picked up' state
if (actionSpriteType != PeepActionSpriteType::Ui)
baseImageId += (imageDirection >> 3) + imageOffset * 4;
else
baseImageId += imageOffset;
auto imageId = ImageId(baseImageId, TshirtColour, TrousersColour);
auto bb = BoundBoxXYZ{ { 0, 0, z + 5 }, { 1, 1, 11 } };