mirror of https://github.com/OpenRCT2/OpenRCT2.git
fix restraints with 8 angles (#20197)
This commit is contained in:
parent
4a79af7b20
commit
4507d3e5c4
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue