widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #09709
[Merge] lp:~widelands-dev/widelands/bug-1643284 into lp:widelands
TiborB has proposed merging lp:~widelands-dev/widelands/bug-1643284 into lp:widelands.
Requested reviews:
Widelands Developers (widelands-dev)
Related bugs:
Bug #1643284 in widelands: "ships of a fleet can have the same name"
https://bugs.launchpad.net/widelands/+bug/1643284
For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1643284/+merge/317689
Simple fix - it removes default shipnames when game is loaded. Saved remaining_shipnames only should be used.
--
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1643284 into lp:widelands.
=== modified file 'src/logic/player.cc'
--- src/logic/player.cc 2017-02-15 01:56:35 +0000
+++ src/logic/player.cc 2017-02-17 22:01:12 +0000
@@ -1221,6 +1221,8 @@
* \param fr source stream
*/
void Player::read_remaining_shipnames(FileRead& fr) {
+ // First get rid of default shipnames
+ remaining_shipnames_.clear();
const uint16_t count = fr.unsigned_16();
for (uint16_t i = 0; i < count; ++i) {
remaining_shipnames_.insert(fr.string());
Follow ups