Fix peeps not showing on one side of pirate ship (#16499)

This commit fixes this bug by adding a missing ^ operator on frameNum.
Before a recent refactor, the framenum was changed to the mirrored one
with "^ 1", but it was omitted. Using "^ col" when col is 0 or 1, adds
this back.
This commit is contained in:
GalBr 2022-02-04 23:04:50 +02:00 committed by GitHub
parent 0ee836096b
commit b5f649c972
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -81,9 +81,9 @@ static void PaintSwingingShipRiders(
if (vehicle.num_peeps <= peep)
break;
auto frameNum = 1 + (row * 2) + (direction >> 1);
auto frameNum = 1 + (row * 2) + ((direction >> 1) ^ col);
auto imageIndex = baseImageIndex + frameNum;
auto imageId = ImageId(imageIndex, vehicle.peep_tshirt_colours[row], vehicle.peep_tshirt_colours[row + 1]);
auto imageId = ImageId(imageIndex, vehicle.peep_tshirt_colours[peep], vehicle.peep_tshirt_colours[peep + 1]);
PaintAddImageAsChild(session, imageId, offset, bbLength, bbOffset);
peep += 2;