(svn r24382) -Fix: Call Vehicle::IsStoppedInDepot only for the first vehicle in a chain (i.e. primary vehicle or free wagon).

This commit is contained in:
frosch
2012-07-07 15:35:28 +00:00
parent e4f0539cae
commit df9a6d24a0
4 changed files with 6 additions and 1 deletions

View File

@@ -356,6 +356,8 @@ CommandCost CmdTurnRoadVeh(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
RoadVehicle *v = RoadVehicle::GetIfValid(p1);
if (v == NULL) return CMD_ERROR;
if (!v->IsPrimaryVehicle()) return CMD_ERROR;
CommandCost ret = CheckOwnership(v->owner);
if (ret.Failed()) return ret;