mirror of
https://github.com/OpenTTD/OpenTTD
synced 2025-12-22 20:52:54 +01:00
(svn r9849) [0.5] -Backport from trunk (r9693, r9694, r9697, r9718, r9719, r9725 and 9726):
- Fix: Crash when destroying bridge with train partially on it [FS#738] (r9726) - Fix: Planes made a 270 degree turn instead of a 90 degree turn on the southern runway of the intercontinental airport [FS#743] (r9725) - Fix: In-game private messages did not work for clients with high ClientIDs (r9719) - Fix: Do not allow building of rail vehicles whose railtype is not available (r9718) - Fix: [YAPF] The guessed path was ignored for ships [FS#736] (r9694)
This commit is contained in:
6
engine.c
6
engine.c
@@ -414,6 +414,12 @@ bool IsEngineBuildable(EngineID engine, byte type, PlayerID player)
|
||||
// check if it's available
|
||||
if (!HASBIT(e->player_avail, player)) return false;
|
||||
|
||||
if (type == VEH_Train) {
|
||||
/* Check if the rail type is available to this player */
|
||||
const Player *p = GetPlayer(player);
|
||||
if (!HASBIT(p->avail_railtypes, EngInfo(engine)->railtype)) return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user