mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-25 15:54:31 +01:00
Make loc_6DB38B receive only the update flag
This commit is contained in:
@@ -1150,7 +1150,7 @@ int32_t track_get_actual_bank_2(int32_t rideType, bool isInverted, int32_t bank)
|
||||
return bank;
|
||||
}
|
||||
|
||||
int32_t track_get_actual_bank_3(Vehicle* vehicle, TileElement* tileElement)
|
||||
int32_t track_get_actual_bank_3(bool useInvertedSprites, TileElement* tileElement)
|
||||
{
|
||||
auto trackType = tileElement->AsTrack()->GetTrackType();
|
||||
auto bankStart = TrackDefinitions[trackType].bank_start;
|
||||
@@ -1158,7 +1158,7 @@ int32_t track_get_actual_bank_3(Vehicle* vehicle, TileElement* tileElement)
|
||||
if (ride == nullptr)
|
||||
return bankStart;
|
||||
|
||||
bool isInverted = vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) ^ tileElement->AsTrack()->IsInverted();
|
||||
bool isInverted = useInvertedSprites ^ tileElement->AsTrack()->IsInverted();
|
||||
return track_get_actual_bank_2(ride->type, isInverted, bankStart);
|
||||
}
|
||||
|
||||
|
||||
@@ -558,7 +558,7 @@ bool track_type_is_station(track_type_t trackType);
|
||||
|
||||
int32_t track_get_actual_bank(TileElement* tileElement, int32_t bank);
|
||||
int32_t track_get_actual_bank_2(int32_t rideType, bool isInverted, int32_t bank);
|
||||
int32_t track_get_actual_bank_3(Vehicle* vehicle, TileElement* tileElement);
|
||||
int32_t track_get_actual_bank_3(bool useInvertedSprites, TileElement* tileElement);
|
||||
|
||||
bool track_add_station_element(CoordsXYZD loc, ride_id_t rideIndex, int32_t flags, bool fromTrackDesign);
|
||||
bool track_remove_station_element(int32_t x, int32_t y, int32_t z, Direction direction, ride_id_t rideIndex, int32_t flags);
|
||||
|
||||
@@ -7481,10 +7481,10 @@ static void vehicle_update_scenery_door(Vehicle* vehicle)
|
||||
*
|
||||
* rct2: 0x006DB38B
|
||||
*/
|
||||
static bool loc_6DB38B(Vehicle* vehicle, TileElement* tileElement)
|
||||
static bool loc_6DB38B(bool useInvertedSprites, TileElement* tileElement)
|
||||
{
|
||||
// Get bank
|
||||
int32_t bankStart = track_get_actual_bank_3(vehicle, tileElement);
|
||||
int32_t bankStart = track_get_actual_bank_3(useInvertedSprites, tileElement);
|
||||
|
||||
// Get vangle
|
||||
int32_t trackType = tileElement->AsTrack()->GetTrackType();
|
||||
@@ -8034,7 +8034,7 @@ bool Vehicle::UpdateTrackMotionForwardsGetNewTrack(uint16_t trackType, Ride* cur
|
||||
}
|
||||
}
|
||||
|
||||
if (!loc_6DB38B(this, tileElement))
|
||||
if (!loc_6DB38B(HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES), tileElement))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -8815,7 +8815,7 @@ loc_6DC476:
|
||||
direction = outDirection;
|
||||
}
|
||||
|
||||
if (!loc_6DB38B(this, tileElement))
|
||||
if (!loc_6DB38B(HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES), tileElement))
|
||||
{
|
||||
goto loc_6DC9BC;
|
||||
}
|
||||
@@ -9027,7 +9027,7 @@ loc_6DCA9A:
|
||||
tileElement = trackBeginEnd.begin_element;
|
||||
}
|
||||
|
||||
if (!loc_6DB38B(this, tileElement))
|
||||
if (!loc_6DB38B(HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES), tileElement))
|
||||
{
|
||||
goto loc_6DCD4A;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user