From 8e54e6ec13ff59e7014f954b51db43e5652b9232 Mon Sep 17 00:00:00 2001 From: commy2 Date: Thu, 30 Apr 2015 00:53:49 +0200 Subject: [PATCH] fix setFWS locality issues, fix #892 --- addons/common/CfgEventHandlers.hpp | 2 +- addons/common/functions/fnc_resetAllDefaults.sqf | 1 + addons/common/functions/fnc_setForceWalkStatus.sqf | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/common/CfgEventHandlers.hpp b/addons/common/CfgEventHandlers.hpp index ce0938f063..bea7b6e7bc 100644 --- a/addons/common/CfgEventHandlers.hpp +++ b/addons/common/CfgEventHandlers.hpp @@ -24,7 +24,7 @@ class Extended_InitPost_EventHandlers { init = QUOTE(if (local (_this select 0)) then {_this call FUNC(setName)};); }; class GVAR(forceWalk) { - init = QUOTE(if (local (_this select 0)) then {_this call FUNC(applyForceWalkStatus);};); + init = QUOTE(_this call FUNC(applyForceWalkStatus)); }; class GVAR(muteUnit) { init = QUOTE(_this call FUNC(muteUnitHandleInitPost)); diff --git a/addons/common/functions/fnc_resetAllDefaults.sqf b/addons/common/functions/fnc_resetAllDefaults.sqf index 63e6764d01..64a8e39fa6 100644 --- a/addons/common/functions/fnc_resetAllDefaults.sqf +++ b/addons/common/functions/fnc_resetAllDefaults.sqf @@ -37,3 +37,4 @@ if (isPlayer _unit) then { }; }foreach ([_unit] call FUNC(getAllDefinedSetVariables)); +_unit setVariable ["ACE_forceWalkStatusNumber", 0, true]; diff --git a/addons/common/functions/fnc_setForceWalkStatus.sqf b/addons/common/functions/fnc_setForceWalkStatus.sqf index 52b674015f..477f76297d 100644 --- a/addons/common/functions/fnc_setForceWalkStatus.sqf +++ b/addons/common/functions/fnc_setForceWalkStatus.sqf @@ -50,4 +50,4 @@ _bitmaskNumber = _forceWalkReasonsBooleans call FUNC(toBitmask); _unit setVariable ["ACE_forceWalkStatusNumber", _bitmaskNumber, true]; // actually apply the forceWalk command globaly -[[_unit], QUOTE(FUNC(applyForceWalkStatus)), _unit] call FUNC(execRemoteFnc); +[[_unit], QUOTE(FUNC(applyForceWalkStatus)), 2] call FUNC(execRemoteFnc);