mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-11 13:10:45 +00:00
(svn r22033) -Fix: don't crash when there are too many objects generated already when placing transmitters
This commit is contained in:
parent
05a846a574
commit
5ccf5cc551
@ -619,7 +619,7 @@ void GenerateObjects()
|
||||
|
||||
SetGeneratingWorldProgress(GWP_OBJECT, radiotower_to_build + lighthouses_to_build);
|
||||
|
||||
for (uint i = ScaleByMapSize(1000); i != 0; i--) {
|
||||
for (uint i = ScaleByMapSize(1000); i != 0 && Object::CanAllocateItem(); i--) {
|
||||
TileIndex tile = RandomTile();
|
||||
|
||||
uint h;
|
||||
|
Loading…
Reference in New Issue
Block a user