mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix #5275. Door animations now play correctly.
Mistake caused when refactoring. I did some copy paste coding and forgot to test it. On top of that mistakenly thought 0x30 >> 3 = 12 when it equals 6.
This commit is contained in:
parent
7341f4aadd
commit
8bd374f9dd
|
@ -6859,7 +6859,7 @@ static void vehicle_update_scenery_door(rct_vehicle *vehicle)
|
|||
vehicle_play_scenery_door_open_sound(vehicle, mapElement);
|
||||
} else {
|
||||
mapElement->properties.wall.animation &= ~(WALL_ANIMATION_FLAG_DIRECTION_BACKWARD);
|
||||
wall_element_set_animation_frame(mapElement, 12);
|
||||
wall_element_set_animation_frame(mapElement, 6);
|
||||
vehicle_play_scenery_door_close_sound(vehicle, mapElement);
|
||||
}
|
||||
}
|
||||
|
@ -6942,7 +6942,7 @@ static void sub_6DEDE8(rct_vehicle *vehicle)
|
|||
vehicle_play_scenery_door_open_sound(vehicle, mapElement);
|
||||
} else {
|
||||
mapElement->properties.wall.animation &= ~(WALL_ANIMATION_FLAG_DIRECTION_BACKWARD);
|
||||
wall_element_set_animation_frame(mapElement, 12);
|
||||
wall_element_set_animation_frame(mapElement, 6);
|
||||
vehicle_play_scenery_door_close_sound(vehicle, mapElement);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -702,7 +702,7 @@ extern "C"
|
|||
void wall_element_set_animation_frame(rct_map_element * wallElement, uint8 frameNum)
|
||||
{
|
||||
wallElement->properties.wall.animation &= WALL_ANIMATION_FLAG_ALL_FLAGS;
|
||||
wallElement->properties.wall.animation |= (frameNum >> 3) & 0xF;
|
||||
wallElement->properties.wall.animation |= (frameNum & 0xF) << 3;
|
||||
}
|
||||
|
||||
uint8 wall_element_get_secondary_colour(rct_map_element * wallElement)
|
||||
|
|
Loading…
Reference in New Issue