mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-22 03:42:41 +01:00
Codechange: use INVALID_VEHICLE where that's more appropriate than e.g. vehicle 0
This commit is contained in:
@@ -680,7 +680,7 @@ static void _DoCommandReturnSetOrderFlags(class ScriptInstance *instance)
|
||||
EnforceCompanyModeValid(false);
|
||||
EnforcePrecondition(false, ScriptVehicle::IsPrimaryVehicle(vehicle_id));
|
||||
|
||||
return ScriptObject::Command<CMD_CLONE_ORDER>::Do(0, CO_UNSHARE, vehicle_id, 0);
|
||||
return ScriptObject::Command<CMD_CLONE_ORDER>::Do(0, CO_UNSHARE, vehicle_id, ::INVALID_VEHICLE);
|
||||
}
|
||||
|
||||
/* static */ SQInteger ScriptOrder::GetOrderDistance(ScriptVehicle::VehicleType vehicle_type, TileIndex origin_tile, TileIndex dest_tile)
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user