This commit is contained in:
IntelOrca 2015-08-05 13:01:25 +01:00
parent 6308e8ee0f
commit 2d770093e9
2 changed files with 7 additions and 1 deletions

View File

@ -301,6 +301,11 @@ static void openrct2_loop()
openrct2_reset_object_tween_locations();
}
// Limit number of updates per loop (any long pauses or debugging can make this update for a very long time)
if (currentTick - uncapTick > 25 * 60) {
uncapTick = currentTick - 25 - 1;
}
while (uncapTick <= currentTick && currentTick - uncapTick > 25) {
// Get the original position of each sprite
for (uint16 i = 0; i < MAX_SPRITES; i++) {

View File

@ -299,6 +299,7 @@ static void ride_ratings_update_state_5()
x = trackBeginEnd.begin_x;
y = trackBeginEnd.begin_y;
z = trackBeginEnd.begin_z;
if (x == _rideRatingsProximityStartX && y == _rideRatingsProximityStartY && z == _rideRatingsProximityStartZ) {
_rideRatingsState = RIDE_RATINGS_STATE_CALCULATE;
return;
@ -306,7 +307,7 @@ static void ride_ratings_update_state_5()
_rideRatingsProximityX = x;
_rideRatingsProximityY = y;
_rideRatingsProximityZ = z;
_rideRatingsProximityTrackType = mapElement->properties.track.type;
_rideRatingsProximityTrackType = trackBeginEnd.begin_element->properties.track.type;
return;
}
} while (!map_element_is_last_for_tile(mapElement++));