Fix: Don't assume engclass 2 should be elrail. (#10315)
When disabling/enabling elrail, there is an assumption that `engclass` of 2 means the engine will run on elrail. While this holds for default engines, NewGRFs can do other things. To resolve this we store the intended railtype so that toggling elrail will restore to the correct type.
This commit is contained in:
@@ -9804,6 +9804,7 @@ static void AfterLoadGRFs()
|
||||
e->info.climates = 0;
|
||||
} else {
|
||||
e->u.rail.railtype = railtype;
|
||||
e->u.rail.intended_railtype = railtype;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user