投稿者 トピック: [r4809] 駐機場のレベルがゼロになる  (参照数 8779 回)

z9999+

  • 管理人
  • 急行
  • *
  • 投稿: 381
Level of aircraft stop and boat lamp are zero.
Their price and capacities are also zero.

z9999+

  • 管理人
  • 急行
  • *
  • 投稿: 381
Re:[r4809] 駐機場のレベルがゼロになる
« 返信 #1 on: 2011/09/14 04:02 »
Still having 2 problems.

https://github.com/aburch/simutrans/commit/4d8353542ba8279a63d0778d0f22f5bbf64a659f
引用
FIX: some buildings had level 65535 instead the probably intended zero
コード: [選択]
// correct old station buildings ...
if (besch->level > 32767 && (besch->utype >= haus_besch_t::bahnhof || besch->utype == haus_besch_t::fabrik)) {
DBG_DEBUG("building_reader_t::read_node()","old station building -> set level to 4");
besch->level = 4;
}

if (besch->level == 65535) {
besch->level = 0; // apparently wrong level
dbg->warning("building_reader_t::read_node()","level was 65535, intended was probably 0 => changed." );
}

If so, besch->level = 4 is strange. Why do you set it to 4 ? Any reason ?

Plus...

https://github.com/aburch/simutrans/commit/9f94f66fc43c9b090b7328046e7296bc77c2780d
引用
FIX: makeobj did not adjust level correctly for stations which did not enable anything
コード: [選択]
// some station thing ...
  if(  utyp==haus_besch_t::generic_extension  ||  utype==haus_besch_t::generic_stop  ||  utyp==haus_besch_t::hafen  ) {
    // since elevel was reduced by one beforehand ...
      ++level;
    }

Well, level of stops was wrong. Then, how about depots ?
Depots are also level-1. So, maintenance cost of all level 1 depots are zero.
It should be a bug, and need to be fixed, too.

prissi

  • 各駅停車
  • *
  • 投稿: 45
Re:[r4809] 駐機場のレベルがゼロになる
« 返信 #2 on: 2011/09/18 03:22 »
level 4, since all stops before this system (which had zero house level) had level 4.

The depots are indeed a bug.

z9999+

  • 管理人
  • 急行
  • *
  • 投稿: 381
Re:[r4809] 駐機場のレベルがゼロになる
« 返信 #3 on: 2011/09/19 11:52 »
level 4, since all stops before this system (which had zero house level) had level 4.

I know that the capacity of old stop was 128, and that is the reason I asked you.

if (besch->level <= && (besch->utype >= haus_besch_t::bahnhof || besch->utype == haus_besch_t::fabrik)) {

This old code replaced level-0-stops to level-4-stops. (But it also changed level-0-depots to level-4-depots. This was a bug.)

But you changed this code to new one. As a result, it doesn't work as you described, anymore.

if (besch->level 32767 && (besch->utype >= haus_besch_t::bahnhof || besch->utype == haus_besch_t::fabrik)) {

This new code you wrote doesn't catch level-0-stops. And also there is no reason to change 'level > 32767' to 4.

And also, I must say.

level 4, since all stops before this system (which had zero house level) had level 4.

This is partly correct. But only stops from 88.0 to 88.02 can be level 0. Before 88.0, all stops are level 1. Of course, the capacity of both stops were the same, 128.


I attached bus stop of 88.0 and 87.02. I changed their name by using hex editor for test, but they are from original pak set.
« 最終編集: 2011/09/19 13:10 by z9999+ »

prissi

  • 各駅停車
  • *
  • 投稿: 45
Re:[r4809] 駐機場のレベルがゼロになる
« 返信 #4 on: 2011/09/23 04:14 »
Since all offending stops are version three, I moved the check to the test. Is this what you suggest?

z9999+

  • 管理人
  • 急行
  • *
  • 投稿: 381
Re:[r4809] 駐機場のレベルがゼロになる
« 返信 #5 on: 2011/09/24 14:59 »
No.