Mercurial > hg > openttd
changeset 17293:397b3a1cd798 draft
(svn r22033) -Fix: don't crash when there are too many objects generated already when placing transmitters
author | smatz <smatz@openttd.org> |
---|---|
date | Tue, 08 Feb 2011 21:49:39 +0000 |
parents | cd07f214eab1 |
children | 912802123438 |
files | src/object_cmd.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/object_cmd.cpp +++ b/src/object_cmd.cpp @@ -619,7 +619,7 @@ 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;