mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Make sure explosive is still valid when updating timer
This commit is contained in:
parent
bbbfabec03
commit
f2a57797da
@ -61,6 +61,13 @@ _display displayAddEventHandler ["MouseZChanged", {
|
||||
[{
|
||||
params ["_display", "_pfhID"];
|
||||
|
||||
// Make sure explosive still exists and is near player
|
||||
if ((!isNull _display) && {!alive ACE_player} || {!alive GVAR(explosive)} || {(ACE_player distance GVAR(explosive)) > 5}) exitWith {
|
||||
INFO_2("explosive became invalid",ACE_player,GVAR(explosive));
|
||||
closeDialog 0;
|
||||
_pfhID call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
if (isNull _display) exitWith {
|
||||
_pfhID call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user