diff --git a/src/group_gui.cpp b/src/group_gui.cpp index aa62f1ee7d..a0f9ac7c13 100644 --- a/src/group_gui.cpp +++ b/src/group_gui.cpp @@ -1017,7 +1017,7 @@ public: break; case ADI_SERVICE: // Send for servicing case ADI_DEPOT: { // Send to Depots - Command::Post(GetCmdSendToDepotMsg(this->vli.vtype), 0, DepotCommand::MassSend | (index == ADI_SERVICE ? DepotCommand::Service : DepotCommand::None), this->vli); + Command::Post(GetCmdSendToDepotMsg(this->vli.vtype), INVALID_VEHICLE, DepotCommand::MassSend | (index == ADI_SERVICE ? DepotCommand::Service : DepotCommand::None), this->vli); break; } diff --git a/src/script/api/script_order.cpp b/src/script/api/script_order.cpp index b68f7fd67a..e17bac5155 100644 --- a/src/script/api/script_order.cpp +++ b/src/script/api/script_order.cpp @@ -680,7 +680,7 @@ static void _DoCommandReturnSetOrderFlags(class ScriptInstance *instance) EnforceCompanyModeValid(false); EnforcePrecondition(false, ScriptVehicle::IsPrimaryVehicle(vehicle_id)); - return ScriptObject::Command::Do(0, CO_UNSHARE, vehicle_id, 0); + return ScriptObject::Command::Do(0, CO_UNSHARE, vehicle_id, ::INVALID_VEHICLE); } /* static */ SQInteger ScriptOrder::GetOrderDistance(ScriptVehicle::VehicleType vehicle_type, TileIndex origin_tile, TileIndex dest_tile) diff --git a/src/script/api/script_vehicle.hpp b/src/script/api/script_vehicle.hpp index c9c884dc08..131a430f66 100644 --- a/src/script/api/script_vehicle.hpp +++ b/src/script/api/script_vehicle.hpp @@ -93,7 +93,7 @@ public: VS_INVALID = 0xFF, ///< An invalid vehicle state. }; - static const VehicleID VEHICLE_INVALID = 0xFFFFF; ///< Invalid VehicleID. + static const VehicleID VEHICLE_INVALID = ::INVALID_VEHICLE; ///< Invalid VehicleID. /** * Checks whether the given vehicle is valid and owned by you. diff --git a/src/story_gui.cpp b/src/story_gui.cpp index 21162afb37..3e2396ca8d 100644 --- a/src/story_gui.cpp +++ b/src/story_gui.cpp @@ -557,7 +557,7 @@ protected: this->SetTimeout(); this->SetWidgetDirty(WID_SB_PAGE_PANEL); - Command::Post(TileIndex{}, pe.index, 0); + Command::Post(TileIndex{}, pe.index, INVALID_VEHICLE); break; case SPET_BUTTON_TILE: @@ -906,7 +906,7 @@ public: return; } - Command::Post(tile, pe->index, 0); + Command::Post(tile, pe->index, INVALID_VEHICLE); ResetObjectToPlace(); } diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index b7bd784b16..c0d06f7a4b 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -2245,7 +2245,7 @@ public: break; case ADI_SERVICE: // Send for servicing case ADI_DEPOT: // Send to Depots - Command::Post(GetCmdSendToDepotMsg(this->vli.vtype), 0, DepotCommand::MassSend | (index == ADI_SERVICE ? DepotCommand::Service : DepotCommand::None), this->vli); + Command::Post(GetCmdSendToDepotMsg(this->vli.vtype), INVALID_VEHICLE, DepotCommand::MassSend | (index == ADI_SERVICE ? DepotCommand::Service : DepotCommand::None), this->vli); break; case ADI_CREATE_GROUP: // Create group