mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
overheating: change addPerFrameHandler to waitAndExecute
This commit is contained in:
parent
fefb599a55
commit
a7e016fa8f
@ -3,8 +3,8 @@
|
||||
PREP(checkTemperature);
|
||||
PREP(clearJam);
|
||||
PREP(cooldown);
|
||||
PREP(displayTemperature);
|
||||
PREP(jamWeapon);
|
||||
PREP(overheat);
|
||||
PREP(pfhDisplayTemperature);
|
||||
PREP(swapBarrel);
|
||||
PREP(swapBarrelCallback);
|
||||
|
@ -25,4 +25,4 @@ if (_action == "") then {
|
||||
_player playActionNow _action;
|
||||
|
||||
// Launch a PFH that waits a sec before displaying the temperature
|
||||
[FUNC(pfhDisplayTemperature), 1.0, [_player, _weapon, diag_tickTime]] call CBA_fnc_addPerFrameHandler;
|
||||
[FUNC(displayTemperature), [_player, _weapon], 1.0, 0] call EFUNC(common,waitAndExecute);
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Author: Commy2 and CAA-Picard
|
||||
*
|
||||
* PFH that displays the weapon temperature after a slight delay
|
||||
* Displays the weapon temperature
|
||||
*
|
||||
* Arguments:
|
||||
* 0: _player
|
||||
@ -13,14 +13,7 @@
|
||||
*/
|
||||
#include "\z\ace\addons\overheating\script_component.hpp"
|
||||
|
||||
EXPLODE_2_PVT(_this,_params,_pfhId);
|
||||
EXPLODE_3_PVT(_params,_player,_weapon,_startTime);
|
||||
|
||||
// Skip the first execution of the PFH
|
||||
if (diag_tickTime < _startTime + 0.5) exitWith {};
|
||||
|
||||
// Remove the PFH on the second execution
|
||||
[_pfhId] call cba_fnc_removePerFrameHandler;
|
||||
EXPLODE_2_PVT(_this,_player,_weapon);
|
||||
|
||||
// Calculate cool down of weapon since last shot
|
||||
private ["_string", "_overheat", "_temperature", "_time", "_barrelMass"];
|
Loading…
Reference in New Issue
Block a user