(svn r23360) -Codechange: move AIInstance to ScriptInstance, making it reusable by other script API instances
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user