Codechange: Don't use globals for return values from vehicle command procs.

This commit is contained in:
Michael Lutz
2021-11-30 23:21:16 +01:00
parent 57b82e2e99
commit 41fa16f325
21 changed files with 88 additions and 118 deletions

View File

@@ -116,13 +116,13 @@ extern void DepotSortList(VehicleList *list);
* This is the Callback method after the cloning attempt of a vehicle
* @param cmd unused
* @param result the result of the cloning command
* @param tile unused
* @param veh_id cloned vehicle ID
*/
void CcCloneVehicle(Commands cmd, const CommandCost &result, TileIndex tile)
void CcCloneVehicle(Commands cmd, const CommandCost &result, VehicleID veh_id)
{
if (result.Failed()) return;
const Vehicle *v = Vehicle::Get(_new_vehicle_id);
const Vehicle *v = Vehicle::Get(veh_id);
ShowVehicleViewWindow(v);
}