mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-18 04:23:20 +01:00
Fix using rct_xy8 incorrect.
This commit is contained in:
committed by
Michał Janiszewski
parent
f29dc3ff34
commit
22750a95e4
@@ -131,7 +131,7 @@ public:
|
||||
ride->type = rideType;
|
||||
ride->subtype = rideEntryIndex;
|
||||
ride_set_colour_preset(ride, res.RideColor() & 0xFF);
|
||||
ride->overall_view = 0xFFFF;
|
||||
ride->overall_view.xy = RCT_XY8_UNDEFINED;
|
||||
|
||||
// Ride name
|
||||
if (rideEntryIndex == RIDE_ENTRY_INDEX_NULL)
|
||||
@@ -144,9 +144,9 @@ public:
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < RCT12_MAX_STATIONS_PER_RIDE; i++) {
|
||||
ride->station_starts[i] = 0xFFFF;
|
||||
ride->entrances[i] = 0xFFFF;
|
||||
ride->exits[i] = 0xFFFF;
|
||||
ride->station_starts[i].xy = RCT_XY8_UNDEFINED;
|
||||
ride->entrances[i].xy = RCT_XY8_UNDEFINED;
|
||||
ride->exits[i].xy = RCT_XY8_UNDEFINED;
|
||||
ride->train_at_station[i] = 255;
|
||||
ride->queue_time[i] = 0;
|
||||
}
|
||||
|
||||
@@ -65,10 +65,10 @@ public:
|
||||
return GameActionResult(GA_ERROR::INVALID_PARAMETERS, STR_INVALID_SELECTION_OF_OBJECTS);
|
||||
}
|
||||
|
||||
if (ride->overall_view != (uint16)-1)
|
||||
if (ride->overall_view.xy != RCT_XY8_UNDEFINED)
|
||||
{
|
||||
res.Position.x = (ride->overall_view & 0xFF) * 32 + 16;
|
||||
res.Position.y = (ride->overall_view >> 8) * 32 + 16;
|
||||
res.Position.x = ride->overall_view.x * 32 + 16;
|
||||
res.Position.y = ride->overall_view.y * 32 + 16;
|
||||
res.Position.z = map_element_height(res.Position.x, res.Position.y);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user