|
@@ -1,28 +1,30 @@
|
|
|
params ["_unit", "_weapon"];
|
|
|
-diag_log "Handling Weapon Swap";
|
|
|
-if(_weapon == "" && !isForcedWalk _unit) exitWith { diag_log "No Weapon"; };
|
|
|
+systemChat "Handling Weapon Swap";
|
|
|
+if(_weapon == "" && !isForcedWalk _unit) exitWith { systemChat "No Weapon"; };
|
|
|
+systemChat _weapon + " :: " + _unit;
|
|
|
|
|
|
private _fn_unForceWalk = {
|
|
|
params["_target"];
|
|
|
- diag_log "Unforce Walk";
|
|
|
+ systemChat "Unforce Walk";
|
|
|
_target setVariable ["RD501_FORCE_WALK", false];
|
|
|
_target forceWalk false;
|
|
|
};
|
|
|
-
|
|
|
private _forceWalk = _unit getVariable ["RD501_FORCE_WALK", false];
|
|
|
|
|
|
+systemChat "Checking _forceWalk :: " + _forceWalk;
|
|
|
if(_weapon == "" && _forceWalk) exitWith {
|
|
|
_unit call _fn_unForceWalk;
|
|
|
};
|
|
|
|
|
|
private _fn_forceWalk = {
|
|
|
params["_target"];
|
|
|
- diag_log "Force Walk";
|
|
|
+ systemChat "Force Walk";
|
|
|
_target setVariable ["RD501_FORCE_WALK", true];
|
|
|
_target forceWalk true;
|
|
|
};
|
|
|
|
|
|
-if(_weapon in RD501_FORCE_WALK_WEAPONS ) exitWith
|
|
|
+systemChat "Weapon in array :: " + (_weapon in RD501_FORCE_WALK_WEAPONS);
|
|
|
+if(_weapon in RD501_FORCE_WALK_WEAPONS) exitWith
|
|
|
{
|
|
|
if(!isForcedWalk _unit) then{
|
|
|
_unit call _fn_forceWalk;
|