News:

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

New "loading time" variable

Started by jamespetts, January 29, 2012, 09:12:21 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jamespetts

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;
     }

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

Daniel already removed this, but thanks anyway.