Advertisement
anden3

Untitled

Jun 18th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 0.68 KB | None | 0 0
  1. _jamChance = _jamChance * ([[0.5, 1, 2, 8, 20, 150], 5 * _scaledTemperature] call EFUNC(common,interpolateFromArray));
  2.  
  3. // increase jam chance on dusty grounds if prone (and at ground level)
  4. if ((stance _unit == "PRONE") && {((getPosATL _unit) select 2) < 1}) then {
  5.     private _surface = configFile >> "CfgSurfaces" >> ((surfaceType getPosASL _unit) select [1]);
  6.     if (isClass _surface) then {
  7.         TRACE_1("dust",getNumber (_surface >> "dust"));
  8.         _jamChance = _jamChance + (getNumber (_surface >> "dust")) * _jamChance;
  9.     };
  10. };
  11.  
  12. TRACE_3("check for random jam",_unit,_weapon,_jamChance);
  13. if ((random 1) < _jamChance) then {
  14.     [_unit, _weapon] call FUNC(jamWeapon);
  15. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement