The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: jamespetts on January 29, 2011, 12:56:31 AM

Title: Is it me or is there something wrong here...?
Post by: jamespetts on January 29, 2011, 12:56:31 AM
In karte_t::laden:


if(  file->get_version()>=102004  ) {
if(  umgebung_t::restore_UI  ) {
file->rdwr_byte( active_player_nr );
active_player = spieler[active_player_nr];
/* restore all open windows
* otherwise it will be ignored
* which is save, since it is the end of file
*/
rdwr_all_win( file );
}
else {
if(  file->is_saving()  ) {
// dummy info
uint8 player_zero = 0;
file->rdwr_byte( player_zero );
uint32 end = magic_none;
file->rdwr_long( end );
}
}
}


Why is there a block of code for if(file->is_saving()) when being in karte_t::laden means that one must be loading, not saving...?
Title: Re: Is it me or is there something wrong here...?
Post by: prissi on January 29, 2011, 08:26:06 PM
This was copyied from the saving routine ... can of course go.