Codechange: Un-bitstuff vehicle/engine commands.

This commit is contained in:
Michael Lutz
2021-11-05 23:55:23 +01:00
parent 2637c06f88
commit 21675ec7e2
25 changed files with 221 additions and 268 deletions

View File

@@ -361,15 +361,12 @@ bool RoadVehicle::FindClosestDepot(TileIndex *location, DestinationID *destinati
/**
* Turn a roadvehicle around.
* @param flags operation to perform
* @param tile unused
* @param p1 vehicle ID to turn
* @param p2 unused
* @param text unused
* @param veh_id vehicle ID to turn
* @return the cost of this operation or an error
*/
CommandCost CmdTurnRoadVeh(DoCommandFlag flags, TileIndex tile, uint32 p1, uint32 p2, const std::string &text)
CommandCost CmdTurnRoadVeh(DoCommandFlag flags, VehicleID veh_id)
{
RoadVehicle *v = RoadVehicle::GetIfValid(p1);
RoadVehicle *v = RoadVehicle::GetIfValid(veh_id);
if (v == nullptr) return CMD_ERROR;
if (!v->IsPrimaryVehicle()) return CMD_ERROR;