The International Simutrans Forum

Simutrans Extended => Simutrans Extended Development => Simutrans Extended Solved Bug Reports => Topic started by: inkelyad on October 07, 2010, 07:35:52 AM

Title: [bug]? Station capacity calculation do not use 'capacity' field.
Post by: inkelyad on October 07, 2010, 07:35:52 AM

For sea-based stations 'capacity' field from dat file is used.
simhalt.cc, haltestelle_t::recalc_station_type()
Code: [Select]
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())
Code: [Select]
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];
        }
Title: Re: [bug]? Station capacity calculation do not use 'capacity' field.
Post by: jamespetts on October 23, 2010, 12:32:30 PM
Thank you for the report - I have now fixed this.