Skip to content

Commit

Permalink
Nil check for variable
Browse files Browse the repository at this point in the history
  • Loading branch information
theace0296 committed Sep 23, 2021
1 parent 4bebd8f commit 4531117
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions RandFramework/Server/objectives/fn_setCheckpoint.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -394,16 +394,18 @@ if (_PosFound) then {
if (!_bHasParkedCar) then {
[_guardUnit4, "Stand_IA", "ASIS"] call BIS_fnc_ambientAnimCombat;
} else {
private _Leandir = ([direction _ParkedCar, 45] call TRGM_GLOBAL_fnc_addtodirection);
_group3 setFormDir _Leandir;
dostop [_guardUnit4];
_guardUnit4 setDir (_Leandir);
sleep 0.1;
private _LeanPos = _ParkedCar getPos [1, _Leandir];
sleep 0.1;
_guardUnit4 setPos _LeanPos;
sleep 0.1;
[_guardUnit4, "LEAN", "ASIS"] call BIS_fnc_ambientAnimCombat;
if !(isNil "_ParkedCar") then {
private _Leandir = ([direction _ParkedCar, 45] call TRGM_GLOBAL_fnc_addtodirection);
_group3 setFormDir _Leandir;
dostop [_guardUnit4];
_guardUnit4 setDir (_Leandir);
sleep 0.1;
private _LeanPos = _ParkedCar getPos [1, _Leandir];
sleep 0.1;
_guardUnit4 setPos _LeanPos;
sleep 0.1;
[_guardUnit4, "LEAN", "ASIS"] call BIS_fnc_ambientAnimCombat;
};
};
};
};
Expand Down

0 comments on commit 4531117

Please sign in to comment.