ACE3/addons/overheating/functions/fnc_updateTemperatureThread.sqf

26 lines
655 B
Plaintext
Raw Normal View History

/*
* Author: esteldunedain
2016-01-20 16:07:51 +00:00
* Update cooldown calculation of all player weapons at regular intervals.
*
* Argument:
* None
*
* Return value:
* None
*
* Example:
* [] call ace_overheating_fnc_updateTemperatureThread
*
* Public: No
*/
2016-01-20 16:07:51 +00:00
#include "script_component.hpp"
private _currentWeapon = currentWeapon ACE_player;
if ((_currentWeapon != "") && {_currentWeapon == primaryWeapon ACE_player || {_currentWeapon == handgunWeapon ACE_player}}) then {
[ACE_player, _currentWeapon, 0] call FUNC(updateTemperature);
};
// Schedule for execution again after 5 seconds
[DFUNC(updateTemperatureThread), [], 5] call EFUNC(common,waitAndExecute);