widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #10230
Re: [Merge] lp:~widelands-dev/widelands/bug-1674243-crash_with_save_game into lp:widelands
Yes, could be. I am traveling and cannot check right now. But if roads is set, owner should be too - there can't be a field with roads but without owners.
> Am 21.05.2017 um 11:39 schrieb GunChleoc <fios@xxxxxxxxxxxxxxxxxxx>:
>
> In Player::rediscover_node, I found the following code:
>
> { // discover everything (above the ground) in this field
> field.terrains = f.field->get_terrains();
> field.roads = f.field->get_roads();
> field.owner = f.field->get_owned_by();
>
> OK, owner set. Later on, we get to the neighbouring fields:
>
>
> { // discover the D triangle and the SW edge of the top right neighbour
> FCoords tr = map.tr_n(f);
> Field& tr_field = fields_[tr.field - &first_map_field];
> if (tr_field.vision <= 1) {
> tr_field.terrains.d = tr.field->terrain_d();
> tr_field.roads &= ~(RoadType::kMask << RoadType::kSouthWest);
> tr_field.roads |= RoadType::kMask << RoadType::kSouthWest & tr.field->get_roads();
> }
> }
>
> No mention of the owner there - might that be the bug?
>
> --
> https://code.launchpad.net/~widelands-dev/widelands/bug-1674243-crash_with_save_game/+merge/324301
> Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1674243-crash_with_save_game into lp:widelands.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~widelands-dev
> Post to : widelands-dev@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~widelands-dev
> More help : https://help.launchpad.net/ListHelp
--
https://code.launchpad.net/~widelands-dev/widelands/bug-1674243-crash_with_save_game/+merge/324301
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1674243-crash_with_save_game into lp:widelands.
References