Add assert to test if the ride slot is actually free

This commit is contained in:
ζeh Matt 2023-02-21 23:57:34 +02:00
parent 6a5bfa5cad
commit ef8d08c5e5
No known key found for this signature in database
GPG Key ID: 18CE582C71A225B0
1 changed files with 2 additions and 0 deletions

View File

@ -174,6 +174,8 @@ Ride* RideAllocateAtIndex(RideId index)
_maxRideSize = std::max<size_t>(idx + 1, _maxRideSize);
auto result = &_rides[idx];
assert(result->id == RideId::GetNull());
result->id = index;
return result;
}