summaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2019-02-28 21:32:08 +0000
committerPeterN <peter@fuzzle.org>2019-03-24 15:28:48 +0000
commitd54b6ac09b6fe88c09f7886739fe9c05f16b8222 (patch)
treef2da295763b43c7661a12a2727319487491843d4 /src/script
parentf6264e5212575e63f02cb0741e7188ff0d154fac (diff)
downloadopenttd-d54b6ac09b6fe88c09f7886739fe9c05f16b8222.tar.xz
Feature: When filtering purchase list by cargo type, make buy button perform a refit if required.
Diffstat (limited to 'src/script')
-rw-r--r--src/script/api/script_vehicle.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/api/script_vehicle.cpp b/src/script/api/script_vehicle.cpp
index ca841f755..ca05ec58f 100644
--- a/src/script/api/script_vehicle.cpp
+++ b/src/script/api/script_vehicle.cpp
@@ -70,7 +70,7 @@
EnforcePreconditionCustomError(VEHICLE_INVALID, !ScriptGameSettings::IsDisabledVehicleType((ScriptVehicle::VehicleType)type), ScriptVehicle::ERR_VEHICLE_BUILD_DISABLED);
- if (!ScriptObject::DoCommand(depot, engine_id, 0, ::GetCmdBuildVeh(type), NULL, &ScriptInstance::DoCommandReturnVehicleID)) return VEHICLE_INVALID;
+ if (!ScriptObject::DoCommand(depot, engine_id | (CT_INVALID << 24), 0, ::GetCmdBuildVeh(type), NULL, &ScriptInstance::DoCommandReturnVehicleID)) return VEHICLE_INVALID;
/* In case of test-mode, we return VehicleID 0 */
return 0;