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. :)
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. :)