Add a PFH to cool down all player weapons at (infrequent) regular intervals

This commit is contained in:
esteldunedain 2016-01-19 17:04:51 -03:00
parent 0313e7b322
commit 8b7ed38990

View File

@ -32,3 +32,17 @@ GVAR(weaponInfoCache) setText QGVAR(weaponInfoCache);
},
{false},
[19, [true, false, false]], false] call CBA_fnc_addKeybind; //SHIFT + R Key
// Create a PFH to cool down all player weapons at (infrequent) regular intervals
[{
if (primaryWeapon ACE_player) != "") then {
[ACE_player, primaryWeapon ACE_player, 0] call FUNC(updateTemperature);
};
if (handgunWeapon ACE_player) != "") then {
[ACE_player, handgunWeapon ACE_player, 0] call FUNC(updateTemperature);
};
if (secondaryWeapon ACE_player) != "") then {
[ACE_player, secondaryWeapon ACE_player, 0] call FUNC(updateTemperature);
};
}, 5, []] call CBA_fnc_addPerFrameHandler;