Merge lp:~widelands-dev/widelands/bug-1428396 into lp:widelands
Proposed by
TiborB
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 7454 | ||||
Proposed branch: | lp:~widelands-dev/widelands/bug-1428396 | ||||
Merge into: | lp:widelands | ||||
Diff against target: |
35 lines (+10/-5) 1 file modified
src/game_io/game_player_economies_packet.cc (+10/-5) |
||||
To merge this branch: | bzr merge lp:~widelands-dev/widelands/bug-1428396 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
GunChleoc | Approve | ||
Review via email: mp+256857@code.launchpad.net |
Description of the change
This fixes special situation, when two ships (both in expedition mode) of two players are on same field in the time of game saving.
See the also the bug report. A savefile attached to the bug is functional now and I run regression tests as well.
To post a comment you must log in.
You found it :)
How about only writing the ships that the player owns as well? We still need the test when loading for older savegames, but not writing it in the first place would be a good idea I think.
Around line 137:
if (ship-> get_economy( ) == temp_economy) {
We could have:
if (ship-> get_economy( ) == temp_economy && ship->get_owner() == player) {
I also spotted a typo in a comment: curent -> current. It would also be good to have a blank space between // and We, makes it easier to read. :)