News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

[bug]? Station capacity calculation do not use 'capacity' field.

Started by inkelyad, October 07, 2010, 07:35:52 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

inkelyad


For sea-based stations 'capacity' field from dat file is used.
simhalt.cc, haltestelle_t::recalc_station_type()

if(gr->ist_wasser()) {
[SKIP]
                    if(besch->get_enabled()&1)
                    {
                        capacity[0] += besch->get_station_capacity();
                    }
                    if(besch->get_enabled()&2)
                    {
                        capacity[1] += besch->get_station_capacity();
                    }
                    if(besch->get_enabled()&4)
                    {
                        capacity[2] += besch->get_station_capacity();
                    }
                }
                else
                {
                    // no sperate capacities: sum up all
                    capacity[0] += besch->get_station_capacity();
                    capacity[2] = capacity[1] = capacity[0];
                }
            }
            continue;
        }

But for all other is not, it is level-based. (besch->get_level())

if(  welt->get_einstellungen()->is_seperate_halt_capacities()  ) {
            if(besch->get_enabled()&1) {
                capacity[0] += besch->get_level()*32;
            }
            if(besch->get_enabled()&2) {
                capacity[1] += besch->get_level()*32;
            }
            if(besch->get_enabled()&4) {
                capacity[2] += besch->get_level()*32;
            }
        }
        else {
            // no sperate capacities: sum up all
            capacity[0] += besch->get_level()*32;
            capacity[2] = capacity[1] = capacity[0];
        }

jamespetts

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.