widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #08432
[Merge] lp:~widelands-dev/widelands/bug-1629685 into lp:widelands
TiborB has proposed merging lp:~widelands-dev/widelands/bug-1629685 into lp:widelands.
Requested reviews:
Widelands Developers (widelands-dev)
Related bugs:
Bug #1629685 in widelands: "Assertion fails on expedition from before the dawn of time"
https://bugs.launchpad.net/widelands/+bug/1629685
For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1629685/+merge/307387
The game not crashes anymore, see diff :)
--
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1629685 into lp:widelands.
=== modified file 'src/ai/defaultai.cc'
--- src/ai/defaultai.cc 2016-09-26 17:43:57 +0000
+++ src/ai/defaultai.cc 2016-10-02 19:09:46 +0000
@@ -888,6 +888,13 @@
} else {
throw wexception("Corrupted AI data");
}
+
+ // Sometimes there can be a ship in expedition, but expedition start time is not given
+ // f.e. human player played this player before
+ if (expedition_ship_ != kNoShip && persistent_data->expedition_start_time == kNoExpedition) {
+ // Current gametime is better then 'kNoExpedition'
+ persistent_data->expedition_start_time = gametime;
+ }
}
/**
Follow ups