mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Replace all use of deprecated commands
This commit is contained in:
parent
8e2d489312
commit
04bccf47d7
@ -49,7 +49,7 @@ if (_unit == _attachToVehicle) then { //Self Attachment
|
||||
} else {
|
||||
GVAR(placeAction) = PLACE_WAITING;
|
||||
|
||||
[_unit, "ACE_Attach", true] call EFUNC(common,setForceWalkStatus);
|
||||
[_unit, "forceWalk", "ACE_Attach", true] call EFUNC(common,statusEffect_set);
|
||||
|
||||
[{[localize LSTRING(PlaceAction), ""] call EFUNC(interaction,showMouseHint)}, []] call EFUNC(common,execNextFrame);
|
||||
_unit setVariable [QGVAR(placeActionEH), [_unit, "DefaultAction", {true}, {GVAR(placeAction) = PLACE_APPROVE;}] call EFUNC(common,AddActionEventHandler)];
|
||||
@ -88,7 +88,7 @@ if (_unit == _attachToVehicle) then { //Self Attachment
|
||||
{!([_attachToVehicle, _unit, _itemClassname] call FUNC(canAttach))}) then {
|
||||
|
||||
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
||||
[_unit, "ACE_Attach", false] call EFUNC(common,setForceWalkStatus);
|
||||
[_unit, "forceWalk", "ACE_Attach", false] call EFUNC(common,statusEffect_set);
|
||||
[] call EFUNC(interaction,hideMouseHint);
|
||||
[_unit, "DefaultAction", (_unit getVariable [QGVAR(placeActionEH), -1])] call EFUNC(common,removeActionEventHandler);
|
||||
_unit removeAction _actionID;
|
||||
|
@ -40,12 +40,12 @@ if (_respawn > 3) then {
|
||||
if (_unit getVariable [QGVAR(isHandcuffed), false]) then {
|
||||
[_unit, false] call FUNC(setHandcuffed);
|
||||
};
|
||||
[_unit, QGVAR(Handcuffed), false] call EFUNC(common,setCaptivityStatus);
|
||||
[_unit, "setCaptive", QGVAR(Handcuffed), false] call EFUNC(common,statusEffect_set);
|
||||
|
||||
if (_unit getVariable [QGVAR(isSurrendering), false]) then {
|
||||
[_unit, false] call FUNC(setSurrendered);
|
||||
};
|
||||
[_unit, QGVAR(Surrendered), false] call EFUNC(common,setCaptivityStatus);
|
||||
[_unit, "setCaptive", QGVAR(Surrendered), false] call EFUNC(common,statusEffect_set);
|
||||
|
||||
if (_oldUnit getVariable [QGVAR(isEscorting), false]) then {
|
||||
_oldUnit setVariable [QGVAR(isEscorting), false, true];
|
||||
|
@ -28,7 +28,7 @@ if ((_unit getVariable [QGVAR(isHandcuffed), false]) isEqualTo _state) exitWith
|
||||
|
||||
if (_state) then {
|
||||
_unit setVariable [QGVAR(isHandcuffed), true, true];
|
||||
[_unit, QGVAR(Handcuffed), true] call EFUNC(common,setCaptivityStatus);
|
||||
[_unit, "setCaptive", QGVAR(Handcuffed), true] call EFUNC(common,statusEffect_set);
|
||||
|
||||
if (_unit getVariable [QGVAR(isSurrendering), false]) then { //If surrendering, stop
|
||||
[_unit, false] call FUNC(setSurrendered);
|
||||
@ -89,7 +89,7 @@ if (_state) then {
|
||||
}, [_unit], 0.01] call EFUNC(common,waitAndExecute);
|
||||
} else {
|
||||
_unit setVariable [QGVAR(isHandcuffed), false, true];
|
||||
[_unit, QGVAR(Handcuffed), false] call EFUNC(common,setCaptivityStatus);
|
||||
[_unit, "setCaptive", QGVAR(Handcuffed), false] call EFUNC(common,statusEffect_set);
|
||||
|
||||
//remove AnimChanged EH
|
||||
private _animChangedEHID = _unit getVariable [QGVAR(handcuffAnimEHID), -1];
|
||||
|
@ -33,7 +33,7 @@ if (_state) then {
|
||||
|
||||
_unit setVariable [QGVAR(isSurrendering), true, true];
|
||||
|
||||
[_unit, QGVAR(Surrendered), true] call EFUNC(common,setCaptivityStatus);
|
||||
[_unit, "setCaptive", QGVAR(Surrendered), true] call EFUNC(common,statusEffect_set);
|
||||
|
||||
if (_unit == ACE_player) then {
|
||||
["captive", [false, false, false, false, false, false, false, false]] call EFUNC(common,showHud);
|
||||
@ -65,7 +65,7 @@ if (_state) then {
|
||||
}, [_unit], 0.01] call EFUNC(common,waitAndExecute);
|
||||
} else {
|
||||
_unit setVariable [QGVAR(isSurrendering), false, true];
|
||||
[_unit, QGVAR(Surrendered), false] call EFUNC(common,setCaptivityStatus);
|
||||
[_unit, "setCaptive", QGVAR(Surrendered), false] call EFUNC(common,statusEffect_set);
|
||||
|
||||
//remove AnimChanged EH
|
||||
private _animChangedEHID = _unit getVariable [QGVAR(surrenderAnimEHID), -1];
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
//Now just a wrapper for FUNC(statusEffect_get)
|
||||
ACE_DEPRECATED("ace_common_fnc_getCaptivityStatus","3.6.0","ace_common_fnc_statusEffect_get");
|
||||
//Now just a wrapper for FUNC(statusEffect_get) [No longer used in ace as of 3.5]
|
||||
ACE_DEPRECATED("ace_common_fnc_getCaptivityStatus","3.7.0","ace_common_fnc_statusEffect_get");
|
||||
|
||||
([player, "setCaptive"] call FUNC(statusEffect_get)) select 1
|
||||
([_unit, "setCaptive"] call FUNC(statusEffect_get)) select 1
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
//Now just a wrapper for FUNC(statusEffect_get)
|
||||
ACE_DEPRECATED("ace_common_fnc_getForceWalkStatus","3.6.0","ace_common_fnc_statusEffect_get");
|
||||
//Now just a wrapper for FUNC(statusEffect_get) [No longer used in ace as of 3.5]
|
||||
ACE_DEPRECATED("ace_common_fnc_getForceWalkStatus","3.7.0","ace_common_fnc_statusEffect_get");
|
||||
|
||||
([player, "forceWalk"] call FUNC(statusEffect_get)) select 1
|
||||
([_unit, "forceWalk"] call FUNC(statusEffect_get)) select 1
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
params ["_unit", "_reason", "_status"];
|
||||
|
||||
//Now just a wrapper for FUNC(statusEffect_set)
|
||||
ACE_DEPRECATED("ace_common_fnc_setCaptivityStatus","3.6.0","ace_common_fnc_statusEffect_set");
|
||||
//Now just a wrapper for FUNC(statusEffect_set) [No longer used in ace as of 3.5]
|
||||
ACE_DEPRECATED("ace_common_fnc_setCaptivityStatus","3.7.0","ace_common_fnc_statusEffect_set");
|
||||
|
||||
[_unit, "setCaptive", _reason, _status] call FUNC(statusEffect_set);
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
params ["_unit", "_reason", "_status"];
|
||||
|
||||
//Now just a wrapper for FUNC(statusEffect_set)
|
||||
ACE_DEPRECATED("ace_common_fnc_setForceWalkStatus","3.6.0","ace_common_fnc_statusEffect_set");
|
||||
//Now just a wrapper for FUNC(statusEffect_set) [No longer used in ace as of 3.5]
|
||||
ACE_DEPRECATED("ace_common_fnc_setForceWalkStatus","3.7.0","ace_common_fnc_statusEffect_set");
|
||||
|
||||
[_unit, "forceWalk", _reason, _status] call FUNC(statusEffect_set);
|
||||
|
@ -48,7 +48,7 @@ _unit removeWeapon "ACE_FakePrimaryWeapon";
|
||||
// reselect weapon and re-enable sprint
|
||||
_unit selectWeapon primaryWeapon _unit;
|
||||
|
||||
[_unit, "ACE_dragging", false] call EFUNC(common,setforceWalkStatus);
|
||||
[_unit, "forceWalk", "ACE_dragging", false] call EFUNC(common,statusEffect_set);
|
||||
|
||||
// prevent object from flipping inside buildings
|
||||
if (_inBuilding) then {
|
||||
|
@ -53,7 +53,7 @@ if (_target isKindOf "CAManBase") then {
|
||||
_unit action ["SwitchWeapon", _unit, _unit, 99];
|
||||
[_unit, "AmovPercMstpSnonWnonDnon", 0] call EFUNC(common,doAnimation);
|
||||
|
||||
[_unit, "ACE_dragging", true] call EFUNC(common,setforceWalkStatus);
|
||||
[_unit, "forceWalk", "ACE_dragging", true] call EFUNC(common,statusEffect_set);
|
||||
|
||||
};
|
||||
|
||||
|
@ -32,7 +32,7 @@ if (!isClass (configFile >> "CfgVehicles" >> _setupObjectClass)) exitWith {ERROR
|
||||
_p3dModel = getText (configFile >> "CfgVehicles" >> _setupObjectClass >> "model");
|
||||
if (_p3dModel == "") exitWith {ERROR("No Model");}; //"" - will crash game!
|
||||
|
||||
[_unit, "ACE_Explosives", true] call EFUNC(common,setForceWalkStatus);
|
||||
[_unit, "ACE_Explosives", true] call EFUNC(common,statusEffect_set);
|
||||
|
||||
//Show mouse buttons:
|
||||
[localize LSTRING(PlaceAction), localize LSTRING(CancelAction), localize LSTRING(ScrollAction)] call EFUNC(interaction,showMouseHint);
|
||||
@ -152,7 +152,7 @@ GVAR(TweakedAngle) = 0;
|
||||
[_pfID] call CBA_fnc_removePerFrameHandler;
|
||||
GVAR(pfeh_running) = false;
|
||||
|
||||
[_unit, "ACE_Explosives", false] call EFUNC(common,setForceWalkStatus);
|
||||
[_unit, "forceWalk", "ACE_Explosives", false] call EFUNC(common,statusEffect_set);
|
||||
[] call EFUNC(interaction,hideMouseHint);
|
||||
[_unit, "DefaultAction", (_unit getVariable [QGVAR(placeActionEH), -1])] call EFUNC(common,removeActionEventHandler);
|
||||
[_unit, "zoomtemp", (_unit getVariable [QGVAR(cancelActionEH), -1])] call EFUNC(common,removeActionEventHandler);
|
||||
|
@ -7,7 +7,7 @@ params ["_unit"];
|
||||
|
||||
// Reset captive status for respawning unit
|
||||
if (!(_unit getVariable ["ACE_isUnconscious", false])) then {
|
||||
[_unit, QGVAR(unconscious), false] call EFUNC(common,setCaptivityStatus);
|
||||
[_unit, "setCaptive", QGVAR(unconscious), false] call EFUNC(common,statusEffect_set);
|
||||
};
|
||||
|
||||
// Remove maximum unconsciousness time handler
|
||||
|
@ -95,7 +95,7 @@ if (GVAR(moveUnitsFromGroupOnUnconscious)) then {
|
||||
[_unit, true, "ACE_isUnconscious", side group _unit] call EFUNC(common,switchToGroupSide);
|
||||
};
|
||||
|
||||
[_unit, QGVAR(unconscious), true] call EFUNC(common,setCaptivityStatus);
|
||||
[_unit, "setCaptive", QGVAR(unconscious), true] call EFUNC(common,statusEffect_set);
|
||||
_anim = [_unit] call EFUNC(common,getDeathAnim);
|
||||
[_unit, _anim, 1, true] call EFUNC(common,doAnimation);
|
||||
[{
|
||||
|
@ -33,7 +33,7 @@ if (!alive _unit) exitWith {
|
||||
if (GVAR(moveUnitsFromGroupOnUnconscious)) then {
|
||||
[_unit, false, "ACE_isUnconscious", side group _unit] call EFUNC(common,switchToGroupSide);
|
||||
};
|
||||
[_unit, QGVAR(unconscious), false] call EFUNC(common,setCaptivityStatus);
|
||||
[_unit, "setCaptive", QGVAR(unconscious), false] call EFUNC(common,statusEffect_set);
|
||||
[_unit, false] call EFUNC(common,disableAI);
|
||||
//_unit setUnitPos _originalPos;
|
||||
_unit setUnconscious false;
|
||||
@ -102,7 +102,7 @@ if !(_unit getVariable ["ACE_isUnconscious",false]) exitWith {
|
||||
};
|
||||
if (!_hasMovedOut) then {
|
||||
// Reset the unit back to the previous captive state.
|
||||
[_unit, QGVAR(unconscious), false] call EFUNC(common,setCaptivityStatus);
|
||||
[_unit, "setCaptive", QGVAR(unconscious), false] call EFUNC(common,statusEffect_set);
|
||||
|
||||
// Swhich the unit back to its original group
|
||||
//Unconscious units shouldn't be put in another group #527:
|
||||
|
@ -36,7 +36,7 @@ if (_actionID != -1) then {
|
||||
_unit removeAction _actionID;
|
||||
_unit setVariable [QGVAR(ReleaseActionID), nil];
|
||||
};
|
||||
[_unit, QGVAR(vehRearm), false] call EFUNC(common,setForceWalkStatus);
|
||||
[_unit, "forceWalk", QGVAR(vehRearm), false] call EFUNC(common,statusEffect_set);
|
||||
|
||||
if (_unholster) then {
|
||||
REARM_UNHOLSTER_WEAPON
|
||||
|
@ -19,7 +19,7 @@
|
||||
params ["_dummy", "_unit"];
|
||||
|
||||
REARM_HOLSTER_WEAPON
|
||||
[_unit, QGVAR(vehRearm), true] call EFUNC(common,setForceWalkStatus);
|
||||
[_unit, "forceWalk", QGVAR(vehRearm), true] call EFUNC(common,statusEffect_set);
|
||||
|
||||
[
|
||||
5,
|
||||
|
@ -22,7 +22,7 @@ private ["_ammo", "_dummyName", "_dummy", "_actionID"];
|
||||
params ["_args"];
|
||||
_args params ["_unit", "_magazineClass", "_target"]; // _target is for future possible finite ammo
|
||||
|
||||
[_unit, QGVAR(vehRearm), true] call EFUNC(common,setForceWalkStatus);
|
||||
[_unit, "forceWalk", QGVAR(vehRearm), true] call EFUNC(common,statusEffect_set);
|
||||
_dummy = [_unit, _magazineClass] call FUNC(createDummy);
|
||||
[_dummy, _unit] call FUNC(pickUpAmmo);
|
||||
|
||||
|
@ -6,6 +6,6 @@ _unit = _this select 0;
|
||||
|
||||
if !(local _unit) exitWith {};
|
||||
|
||||
[_unit, "ACE_refuel", false] call EFUNC(common,setForceWalkStatus);
|
||||
[_unit, "forceWalk", "ACE_refuel", false] call EFUNC(common,statusEffect_set);
|
||||
_unit setVariable [QGVAR(selectedWeaponOnRefuel), nil];
|
||||
_unit setVariable [QGVAR(isRefueling), false];
|
||||
|
@ -80,7 +80,7 @@ _endPosTestOffset set [2, (_startingOffset select 2)];
|
||||
_args params ["_unit", "_nozzle", "_target", "_endPosTestOffset"];
|
||||
_unit setVariable [QGVAR(nozzle), nil];
|
||||
_unit setVariable [QGVAR(isRefueling), false];
|
||||
[_unit, "ACE_refuel", false] call EFUNC(common,setForceWalkStatus);
|
||||
[_unit, "forceWalk", "ACE_refuel", false] call EFUNC(common,statusEffect_set);
|
||||
REFUEL_UNHOLSTER_WEAPON
|
||||
_actionID = _unit getVariable [QGVAR(ReleaseActionID), -1];
|
||||
if (_actionID != -1) then {
|
||||
|
@ -22,7 +22,7 @@ if (!local _unit || {!_isUnconscious}) exitWith {};
|
||||
|
||||
private "_nozzle";
|
||||
|
||||
[_unit, "ACE_refuel", false] call EFUNC(common,setForceWalkStatus);
|
||||
[_unit, "forceWalk", "ACE_refuel", false] call EFUNC(common,statusEffect_set);
|
||||
_nozzle = _unit getVariable [QGVAR(nozzle), objNull];
|
||||
if !(isNull _nozzle) then {
|
||||
[_unit, _nozzle] call FUNC(dropNozzle);
|
||||
|
@ -33,7 +33,7 @@ if (isNull _nozzle || {_source != _target}) exitWith {false};
|
||||
_args params ["_unit", "_nozzle", "_target"];
|
||||
_unit setVariable [QGVAR(nozzle), nil];
|
||||
detach _nozzle;
|
||||
[_unit, "ACE_refuel", false] call EFUNC(common,setForceWalkStatus);
|
||||
[_unit, "ACE_refuel", false] call EFUNC(common,statusEffect_set);
|
||||
REFUEL_UNHOLSTER_WEAPON
|
||||
_unit setVariable [QGVAR(isRefueling), false];
|
||||
_actionID = _unit getVariable [QGVAR(ReleaseActionID), -1];
|
||||
|
@ -21,7 +21,7 @@
|
||||
private ["_endPosOffset"],
|
||||
params ["_unit", "_target", ["_nozzle", objNull]];
|
||||
|
||||
[_unit, "ACE_refuel", true] call EFUNC(common,setForceWalkStatus);
|
||||
[_unit, "forceWalk", "ACE_refuel", true] call EFUNC(common,statusEffect_set);
|
||||
|
||||
REFUEL_HOLSTER_WEAPON
|
||||
|
||||
@ -70,7 +70,7 @@ if (isNull _nozzle) then { // func is called on fuel truck
|
||||
};
|
||||
_actionID = _unit addAction [
|
||||
format ["<t color='#FF0000'>%1</t>", localize ELSTRING(dragging,Drop)],
|
||||
'_unit = _this select 0; _nozzle = _unit getVariable QGVAR(nozzle); [_unit, _nozzle] call FUNC(dropNozzle); [_unit, "ACE_refuel", false] call EFUNC(common,setForceWalkStatus); REFUEL_UNHOLSTER_WEAPON',
|
||||
'_unit = _this select 0; _nozzle = _unit getVariable QGVAR(nozzle); [_unit, _nozzle] call FUNC(dropNozzle); [_unit, "forceWalk", "ACE_refuel", false] call EFUNC(common,statusEffect_set); REFUEL_UNHOLSTER_WEAPON',
|
||||
nil,
|
||||
20,
|
||||
false,
|
||||
@ -107,7 +107,7 @@ if (isNull _nozzle) then { // func is called on fuel truck
|
||||
};
|
||||
_actionID = _unit addAction [
|
||||
format ["<t color='#FF0000'>%1</t>", localize ELSTRING(dragging,Drop)],
|
||||
'_unit = _this select 0; _nozzle = _unit getVariable QGVAR(nozzle); [_unit, _nozzle] call FUNC(dropNozzle); [_unit, "ACE_refuel", false] call EFUNC(common,setForceWalkStatus); REFUEL_UNHOLSTER_WEAPON',
|
||||
'_unit = _this select 0; _nozzle = _unit getVariable QGVAR(nozzle); [_unit, _nozzle] call FUNC(dropNozzle); [_unit, "forceWalk", "ACE_refuel", false] call EFUNC(common,statusEffect_set); REFUEL_UNHOLSTER_WEAPON',
|
||||
nil,
|
||||
20,
|
||||
false,
|
||||
@ -138,7 +138,7 @@ if !(_nozzle getVariable [QGVAR(jerryCan), false]) then {
|
||||
[_unit, _nozzle] call FUNC(dropNozzle);
|
||||
REFUEL_UNHOLSTER_WEAPON
|
||||
|
||||
[_unit, "ACE_refuel", false] call EFUNC(common,setForceWalkStatus);
|
||||
[_unit, "forceWalk", "ACE_refuel", false] call EFUNC(common,statusEffect_set);
|
||||
[LSTRING(Hint_TooFar), 2, _unit] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
[_pfID] call cba_fnc_removePerFrameHandler;
|
||||
|
@ -18,7 +18,7 @@
|
||||
params ["_unit"];
|
||||
|
||||
// prevent the placing unit from running
|
||||
[_unit, "ACE_Sandbag", true] call EFUNC(common,setForceWalkStatus);
|
||||
[_unit, "forceWalk", "ACE_Sandbag", true] call EFUNC(common,statusEffect_set);
|
||||
|
||||
// create the sandbag
|
||||
private "_sandBag";
|
||||
|
@ -18,7 +18,7 @@
|
||||
params ["_unit"];
|
||||
|
||||
// enable running again
|
||||
[_unit, "ACE_Sandbag", false] call EFUNC(common,setForceWalkStatus);
|
||||
[_unit, "forceWalk", "ACE_Sandbag", false] call EFUNC(common,statusEffect_set);
|
||||
|
||||
// delete placement dummy
|
||||
deleteVehicle GVAR(sandBag);
|
||||
|
@ -18,7 +18,7 @@
|
||||
params ["_unit"];
|
||||
|
||||
// enable running again
|
||||
[_unit, "ACE_Sandbag", false] call EFUNC(common,setForceWalkStatus);
|
||||
[_unit, "forceWalk", "ACE_Sandbag", false] call EFUNC(common,statusEffect_set);
|
||||
|
||||
// remove sandbag from inventory
|
||||
_unit removeItem "ACE_Sandbag_empty";
|
||||
|
@ -39,7 +39,7 @@ if (vehicle _playerUnit == _playerUnit) then {
|
||||
_playerUnit linkItem "ItemMap";
|
||||
removeUniform _playerUnit;
|
||||
|
||||
[_playerUnit, "ACE_SwitchUnits", true] call EFUNC(common,setForceWalkStatus);
|
||||
[_playerUnit, "forceWalk", "ACE_SwitchUnits", true] call EFUNC(common,statusEffect_set);
|
||||
|
||||
[_playerUnit, _sides] call FUNC(addMapFunction);
|
||||
};
|
||||
|
@ -21,7 +21,7 @@
|
||||
params ["_unit", "_ladder"];
|
||||
|
||||
// enable running again
|
||||
[_unit, "ACE_Ladder", false] call EFUNC(common,setForceWalkStatus);
|
||||
[_unit, "forceWalk", "ACE_Ladder", false] call EFUNC(common,statusEffect_set);
|
||||
|
||||
detach _ladder;
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
params ["_unit", "_ladder"];
|
||||
|
||||
// enable running again
|
||||
[_unit, "ACE_Ladder", false] call EFUNC(common,setForceWalkStatus);
|
||||
[_unit, "forceWalk", "ACE_Ladder", false] call EFUNC(common,statusEffect_set);
|
||||
|
||||
private ["_pos1", "_pos2"];
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
params ["_unit", "_ladder"];
|
||||
|
||||
// prevent the placing unit from running
|
||||
[_unit, "ACE_Ladder", true] call EFUNC(common,setForceWalkStatus);
|
||||
[_unit, "forceWalk", "ACE_Ladder", true] call EFUNC(common,statusEffect_set);
|
||||
|
||||
{
|
||||
_ladder animate [_x, 0];
|
||||
|
Loading…
Reference in New Issue
Block a user