diff options
author | truebrain <truebrain@openttd.org> | 2011-11-29 23:21:33 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2011-11-29 23:21:33 +0000 |
commit | 3da8b5097a4643d531182173df36ca4d3b45a4e2 (patch) | |
tree | f310e6fd8a61909b60111f6b2e906e0ab6ff8231 /src/script/api/script_vehicle.cpp | |
parent | 75c4bd280a720592ec4df26efbedd9df5baa2d8f (diff) | |
download | openttd-3da8b5097a4643d531182173df36ca4d3b45a4e2.tar.xz |
(svn r23360) -Codechange: move AIInstance to ScriptInstance, making it reusable by other script API instances
Diffstat (limited to 'src/script/api/script_vehicle.cpp')
-rw-r--r-- | src/script/api/script_vehicle.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/api/script_vehicle.cpp b/src/script/api/script_vehicle.cpp index 216d4cf60..ff240200b 100644 --- a/src/script/api/script_vehicle.cpp +++ b/src/script/api/script_vehicle.cpp @@ -60,7 +60,7 @@ EnforcePreconditionCustomError(VEHICLE_INVALID, !ScriptGameSettings::IsDisabledVehicleType((ScriptVehicle::VehicleType)type), ScriptVehicle::ERR_VEHICLE_BUILD_DISABLED); - if (!ScriptObject::DoCommand(depot, engine_id, 0, ::GetCmdBuildVeh(type), NULL, &AIInstance::DoCommandReturnVehicleID)) return VEHICLE_INVALID; + if (!ScriptObject::DoCommand(depot, engine_id, 0, ::GetCmdBuildVeh(type), NULL, &ScriptInstance::DoCommandReturnVehicleID)) return VEHICLE_INVALID; /* In case of test-mode, we return VehicleID 0 */ return 0; @@ -70,7 +70,7 @@ { EnforcePrecondition(false, IsValidVehicle(vehicle_id)); - if (!ScriptObject::DoCommand(depot, vehicle_id, share_orders, CMD_CLONE_VEHICLE, NULL, &AIInstance::DoCommandReturnVehicleID)) return VEHICLE_INVALID; + if (!ScriptObject::DoCommand(depot, vehicle_id, share_orders, CMD_CLONE_VEHICLE, NULL, &ScriptInstance::DoCommandReturnVehicleID)) return VEHICLE_INVALID; /* In case of test-mode, we return VehicleID 0 */ return 0; |