← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/bug-1487239 into lp:widelands

 

TiborB has proposed merging lp:~widelands-dev/widelands/bug-1487239 into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1487239 in widelands: "wl crashes with big maps or big economy"
  https://bugs.launchpad.net/widelands/+bug/1487239

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1487239/+merge/268809

This is ai bug, obviously this went unnoticed up to now, though for sure it is causing some data innaccuracies...
One of conditions to crash the game was very big count of mines of AI player - above ~63
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1487239 into lp:widelands.
=== modified file 'src/ai/defaultai.cc'
--- src/ai/defaultai.cc	2015-08-03 21:18:42 +0000
+++ src/ai/defaultai.cc	2015-08-21 21:35:19 +0000
@@ -1198,7 +1198,7 @@
 			// Check whether this building is completely occupied
 			mines_.front().bo->unoccupied_ |= !mines_.front().site->can_start_working();
 		} else {
-			buildings_.at(i).unconnected_ += 1;
+			mines_.front().bo->unconnected_ += 1;
 		}
 
 		// Now reorder the buildings


Follow ups