News:

The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

Is it me or is there something wrong here...?

Started by jamespetts, January 29, 2011, 12:56:31 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jamespetts

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...?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

prissi

This was copyied from the saving routine ... can of course go.