Codechange: Don't use globals for return values from vehicle command procs.
This commit is contained in:
@@ -159,8 +159,6 @@ ScriptObject::ActiveInstance::~ActiveInstance()
|
||||
/* static */ void ScriptObject::SetLastCommandRes(bool res)
|
||||
{
|
||||
GetStorage()->last_command_res = res;
|
||||
/* Also store the results of various global variables */
|
||||
SetNewVehicleID(_new_vehicle_id);
|
||||
}
|
||||
|
||||
/* static */ bool ScriptObject::GetLastCommandRes()
|
||||
@@ -178,16 +176,6 @@ ScriptObject::ActiveInstance::~ActiveInstance()
|
||||
return GetStorage()->last_cmd_ret;
|
||||
}
|
||||
|
||||
/* static */ void ScriptObject::SetNewVehicleID(VehicleID vehicle_id)
|
||||
{
|
||||
GetStorage()->new_vehicle_id = vehicle_id;
|
||||
}
|
||||
|
||||
/* static */ VehicleID ScriptObject::GetNewVehicleID()
|
||||
{
|
||||
return GetStorage()->new_vehicle_id;
|
||||
}
|
||||
|
||||
/* static */ void ScriptObject::SetAllowDoCommand(bool allow)
|
||||
{
|
||||
GetStorage()->allow_do_command = allow;
|
||||
|
Reference in New Issue
Block a user