The International Simutrans Forum

 

Author Topic: [bug]? Station capacity calculation do not use 'capacity' field.  (Read 1499 times)

0 Members and 1 Guest are viewing this topic.

Offline inkelyad

  • Devotees (Inactive)
  • *
  • Posts: 482
  • Languages: EN, RU

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

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18753
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: [bug]? Station capacity calculation do not use 'capacity' field.
« Reply #1 on: October 23, 2010, 12:32:30 PM »
Thank you for the report - I have now fixed this.