Changeset - r17276:8be0cf7637ee
[Not reviewed]
master
0 1 0
smatz - 13 years ago 2011-02-08 18:39:29
smatz@openttd.org
(svn r22026) -Fix: don't crash when we generate too many objects while generating map
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/object_cmd.cpp
Show inline comments
 
@@ -636,7 +636,7 @@ void GenerateObjects()
 
	/* add lighthouses */
 
	uint maxx = MapMaxX();
 
	uint maxy = MapMaxY();
 
	for (int loop_count = 0; loop_count < 1000 && lighthouses_to_build != 0; loop_count++) {
 
	for (int loop_count = 0; loop_count < 1000 && lighthouses_to_build != 0 && Object::CanAllocateItem(); loop_count++) {
 
		uint r = Random();
 

	
 
		/* Scatter the lighthouses more evenly around the perimeter */
0 comments (0 inline, 0 general)