Skip to content

Commit

Permalink
Fix: GetCurveSpeedLimit needs railtype from current tile (#8466)
Browse files Browse the repository at this point in the history
  • Loading branch information
andythenorth committed Jan 3, 2021
1 parent 4ce53cb commit 0f91cb0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/train_cmd.cpp
Expand Up @@ -349,8 +349,8 @@ int Train::GetCurveSpeedLimit() const
}

if (max_speed != absolute_max_speed) {
/* Apply the engine's rail type curve speed advantage, if it slowed by curves */
const RailtypeInfo *rti = GetRailTypeInfo(this->railtype);
/* Apply the current railtype's curve speed advantage */
const RailtypeInfo *rti = GetRailTypeInfo(GetRailType(this->tile));
max_speed += (max_speed / 2) * rti->curve_speed;

if (this->tcache.cached_tilt) {
Expand Down

0 comments on commit 0f91cb0

Please sign in to comment.