(svn r16363) -Fix: The previously selected newgrf station type was still remembered after switching to a different game without newstations enabled, preventing stations from being built.

This commit is contained in:
peter1138 2009-05-21 07:29:50 +00:00
parent 2d8d5580b6
commit b801d801b5
1 changed files with 5 additions and 0 deletions

View File

@ -1007,6 +1007,11 @@ public:
this->vscroll.count = _railstation.station_count;
this->vscroll.cap = 5;
this->vscroll.pos = Clamp(_railstation.station_type - 2, 0, this->vscroll.count - this->vscroll.cap);
} else {
/* New stations are not available, so ensure the default station
* type is 'selected'. */
_railstation.station_class = STAT_CLASS_DFLT;
_railstation.station_type = 0;
}
}