Mercurial > hg > openttd
diff src/roadveh_cmd.cpp @ 6709:0a6c960768ee draft
(svn r9941) -Fix: trams could be cloned to appear in normal road depots and vice versa (spotted by Desolator)
author | bjarni <bjarni@openttd.org> |
---|---|
date | Sat, 26 May 2007 20:30:55 +0000 (2007-05-26) |
parents | 0beeba5b2cd8 |
children | 07ee5a193c27 |
line wrap: on
line diff
--- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -145,6 +145,8 @@ if (!IsTileDepotType(tile, TRANSPORT_ROAD)) return CMD_ERROR; if (!IsTileOwner(tile, _current_player)) return CMD_ERROR; + if (HASBIT(GetRoadTypes(tile), ROADTYPE_TRAM) != HASBIT(EngInfo(p1)->misc_flags, EF_ROAD_TRAM)) return_cmd_error(STR_DEPOT_WRONG_DEPOT_TYPE); + v = AllocateVehicle(); if (v == NULL) return_cmd_error(STR_00E1_TOO_MANY_VEHICLES_IN_GAME);