|
@@ -1,6 +1,7 @@
|
|
|
params ["_unit", "_weapon"];
|
|
|
diag_log "Handling Weapon Swap";
|
|
|
if(_weapon == "" && !isForcedWalk _unit) exitWith { diag_log "No Weapon"; };
|
|
|
+diag_log format["%1 :: %2",_weapon, _unit];
|
|
|
|
|
|
private _fn_unForceWalk = {
|
|
|
params["_target"];
|
|
@@ -8,9 +9,9 @@ private _fn_unForceWalk = {
|
|
|
_target setVariable ["RD501_FORCE_WALK", false];
|
|
|
_target forceWalk false;
|
|
|
};
|
|
|
-
|
|
|
private _forceWalk = _unit getVariable ["RD501_FORCE_WALK", false];
|
|
|
|
|
|
+diag_log format["Checking _forceWalk :: %1", _forceWalk];
|
|
|
if(_weapon == "" && _forceWalk) exitWith {
|
|
|
_unit call _fn_unForceWalk;
|
|
|
};
|
|
@@ -22,7 +23,8 @@ private _fn_forceWalk = {
|
|
|
_target forceWalk true;
|
|
|
};
|
|
|
|
|
|
-if(_weapon in RD501_FORCE_WALK_WEAPONS ) exitWith
|
|
|
+diag_log format["Weapon in array :: %1", (_weapon in RD501_FORCE_WALK_WEAPONS)];
|
|
|
+if(_weapon in RD501_FORCE_WALK_WEAPONS) exitWith
|
|
|
{
|
|
|
if(!isForcedWalk _unit) then{
|
|
|
_unit call _fn_forceWalk;
|