mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-20 13:33:02 +01:00
fix restraints with 8 angles (#20197)
This commit is contained in:
@@ -1036,10 +1036,8 @@ static void VehicleSpritePaintRestraints(
|
||||
PaintSession& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z, const CarEntry* carEntry)
|
||||
{
|
||||
int32_t boundingBoxNum = YawTo16(imageDirection);
|
||||
auto restraintFrame = ((vehicle->restraints_position - 64) / 64) * 4;
|
||||
auto spriteNum = (carEntry->SpriteByYaw(imageDirection, SpriteGroupType::RestraintAnimation) + restraintFrame)
|
||||
* carEntry->base_num_frames
|
||||
+ carEntry->GroupImageId(SpriteGroupType::RestraintAnimation);
|
||||
auto restraintFrame = ((vehicle->restraints_position - 64) / 64);
|
||||
auto spriteNum = carEntry->SpriteOffset(SpriteGroupType::RestraintAnimation, imageDirection, restraintFrame);
|
||||
vehicle_sprite_paint(session, vehicle, spriteNum, VehicleBoundboxes[carEntry->draw_order][boundingBoxNum], z, carEntry);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user