Fix #5920: set correct next peep spawn index

This commit is contained in:
Hielke Morsink 2017-07-17 15:15:31 +02:00 committed by Michael Steenbeek
parent 1b042506d9
commit 489c74518c
2 changed files with 2 additions and 1 deletions

View File

@ -6,6 +6,7 @@
- Fix: [#5768] Prevent loading non-existent title sequences.
- Fix: [#5858] Crash when using custom ride with no colour presets.
- Fix: [#5872] Incorrect OpenGL rendering of masked sprites
- Fix: [#5920] Placing guest spawn doesn't do anything every 3rd click
- Improved: The land tool buttons can now be held down to increase/decrease size.
- Improved: [#5859] OpenGL rendering performance
- Improved: [#5863] Switching drawing engines no longer requires the application to restart.

View File

@ -1377,7 +1377,7 @@ static void window_map_set_peep_spawn_tool_down(sint32 x, sint32 y)
}
if (peepSpawnIndex == -1) {
peepSpawnIndex = _nextPeepSpawnIndex;
_nextPeepSpawnIndex = (peepSpawnIndex + 1) % (MAX_PEEP_SPAWNS + 1);
_nextPeepSpawnIndex = (peepSpawnIndex + 1) % MAX_PEEP_SPAWNS;
}
gPeepSpawns[peepSpawnIndex].x = mapX;
gPeepSpawns[peepSpawnIndex].y = mapY;