From 2de43319319a4434d28b71d976900b51e0ffe949 Mon Sep 17 00:00:00 2001
From: peter1138 <peter1138@openttd.org>
Date: Sun, 29 Jan 2006 12:52:07 +0000
Subject: [PATCH] (svn r3468) - Fix: Rail type availability should take climate
 type into account.

---
 players.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/players.c b/players.c
index 34d4585550..5266a0d691 100644
--- a/players.c
+++ b/players.c
@@ -614,8 +614,9 @@ byte GetPlayerRailtypes(PlayerID p)
 
 	for (i = 0; i != TOTAL_NUM_ENGINES; i++) {
 		const Engine* e = GetEngine(i);
+		const EngineInfo *ei = &_engine_info[i];
 
-		if (e->type == VEH_Train &&
+		if (e->type == VEH_Train && HASBIT(ei->climates, _opt.landscape) &&
 				(HASBIT(e->player_avail, p) || e->intro_date <= _date) &&
 				!(RailVehInfo(i)->flags & RVI_WAGON)) {
 			assert(e->railtype < RAILTYPE_END);