The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: jamespetts on January 29, 2012, 09:12:21 PM

Title: New "loading time" variable
Post by: jamespetts on January 29, 2012, 09:12:21 PM
Unless I am mistaken, I think that I have spotted an error in the new code to load a "loading_time" value: the code appears to try to load this value for very old paksets (described as "old node, version 0") when those paksets would not have saved this value. The code is in vehicle_reader.cc and is as follows (as a partial .diff):

// old node, version 0

         besch->typ = (sint8)v;
         besch->zuladung = decode_uint16(p);
+        besch->loading_time = decode_uint16(p);
         besch->preis = decode_uint32(p);
         besch->geschw = decode_uint16(p);
         besch->gewicht = decode_uint16(p);
         besch->leistung = decode_uint16(p);
-        besch->betriebskosten = decode_uint16(p);
+        besch->running_cost = decode_uint16(p);
         besch->sound = (sint8)decode_sint16(p);
         besch->vorgaenger = (sint8)decode_uint16(p);
         besch->nachfolger = (sint8)decode_uint16(p);

         besch->intro_date = DEFAULT_INTRO_DATE*16;
         besch->obsolete_date = (DEFAULT_RETIRE_DATE*16);
         besch->gear = 64;
     }

Title: Re: New "loading time" variable
Post by: prissi on January 29, 2012, 09:16:52 PM
Daniel already removed this, but thanks anyway.