1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-27 08:45:00 +01:00

Reduce use of MAX_RIDES and RIDE_TYPE_NULL

This commit is contained in:
Ted John
2019-08-04 14:45:17 +01:00
parent 414b53b56d
commit e23638548a
19 changed files with 69 additions and 112 deletions

View File

@@ -1870,7 +1870,7 @@ static money32 place_track_design(int16_t x, int16_t y, int16_t z, uint8_t flags
}
auto ride = get_ride(rideIndex);
if (ride->type == RIDE_TYPE_NULL)
if (ride == nullptr)
{
log_warning("Invalid game command for track placement, ride id = %d", ride->id);
return MONEY32_UNDEFINED;