News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

Is this intended (simconvoi.cc)?

Started by jamespetts, January 23, 2012, 11:49:50 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jamespetts

Working to merge the latest Standard release into Experimental, I came accross the following in simconvoi.cc, which looks on the face of it as if it might be a mistake:


if(file->get_version()>=111001) {
         file->rdwr_long( distance_since_last_stop );
         file->rdwr_long( sum_speed_limit );
     }

    if(  file->get_version()>=111002  ) {
        file->rdwr_long( sum_speed_limit );
    }
    else if(  file->is_loading()  ) {
        // default when not saved
        maxspeed_average_count = 0;


The file->rdwr_long( sum_speed_limit ); seems to be called twice if the file version is > 111002. Is this a mistake or is this on purpose?
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.

VS

Intended or not, I assume this has to stay now, since it would break existing saves...

Oh wait, these are for nightlies... then it's probably fixable.

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

TurfIt

That would be a classic cut'n'paste error.  :o

prissi

It is
maxspeed_average_count (or will be after the mac OS is built an uploaded)