mirror of https://github.com/OpenTTD/OpenTTD.git
Fix: GetCurveSpeedLimit needs railtype from current tile (#8466)
This commit is contained in:
parent
4ce53cb851
commit
0f91cb0479
|
@ -349,8 +349,8 @@ int Train::GetCurveSpeedLimit() const
|
||||||
}
|
}
|
||||||
|
|
||||||
if (max_speed != absolute_max_speed) {
|
if (max_speed != absolute_max_speed) {
|
||||||
/* Apply the engine's rail type curve speed advantage, if it slowed by curves */
|
/* Apply the current railtype's curve speed advantage */
|
||||||
const RailtypeInfo *rti = GetRailTypeInfo(this->railtype);
|
const RailtypeInfo *rti = GetRailTypeInfo(GetRailType(this->tile));
|
||||||
max_speed += (max_speed / 2) * rti->curve_speed;
|
max_speed += (max_speed / 2) * rti->curve_speed;
|
||||||
|
|
||||||
if (this->tcache.cached_tilt) {
|
if (this->tcache.cached_tilt) {
|
||||||
|
|
Loading…
Reference in New Issue