Advertisement
Marz1pan

Untitled

Oct 29th, 2019
606
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 0.74 KB | None | 0 0
  1. private _weap = _this select 1;
  2. private _projectile = _this select 6;
  3. private _unit = _this select 7;
  4. private _frame = ocap_captureFrameNo;
  5.  
  6. private _lastPos = [];
  7. waitUntil {
  8.     _pos = getPosATL _projectile;
  9.     if (((_pos select 0) isEqualTo 0) || isNull _projectile) exitWith {true};
  10.     _lastPos = _pos;
  11.     false;
  12. };
  13.  
  14. if (_weap isKindOf "StaticMortar") then {  
  15. if !((count _lastPos) isEqualTo 0) then {
  16.     [":FIRED:",[
  17.         (_unit getVariable "ocap_id"),
  18.         _frame,
  19.         "mineHit",
  20.         [_lastPos select 0, _lastPos select 1]
  21.     ]] call ocap_fnc_extension;
  22. }
  23. else {
  24. if !((count _lastPos) isEqualTo 0) then {
  25.     [":FIRED:",[
  26.         (_unit getVariable "ocap_id"),
  27.         _frame,
  28.         [_lastPos select 0, _lastPos select 1]
  29.     ]] call ocap_fnc_extension;
  30. };
  31. };
  32. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement