mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 23:50:25 +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