Clear the caches again after performing the action, cause it's very possible something changed as a result.

This commit is contained in:
Nicolás Badano 2015-03-21 20:37:01 -03:00
parent 6a83d0d9fc
commit 32be87806b
3 changed files with 13 additions and 1 deletions

View File

@ -25,7 +25,11 @@ if(GVAR(actionSelected)) then {
// Check the action conditions
_actionData = GVAR(selectedAction) select 0;
if ([_target, _player, _actionData select 6] call (_actionData select 4)) then {
// Call the statement
[_target, _player, _actionData select 6] call (_actionData select 3);
// Clear the conditions caches again if the action was performed
["clearConditionCaches", []] call EFUNC(common,localEvent);
};
};

View File

@ -26,10 +26,14 @@ if(GVAR(actionSelected)) then {
// Clear the conditions caches
["clearConditionCaches", []] call EFUNC(common,localEvent);
// Check the action conditions
// Check the action conditions
_actionData = GVAR(selectedAction) select 0;
if ([_target, _player, _actionData select 6] call (_actionData select 4)) then {
// Call the statement
[_target, _player, _actionData select 6] call (_actionData select 3);
// Clear the conditions caches again if the action was performed
["clearConditionCaches", []] call EFUNC(common,localEvent);
};
};

View File

@ -186,7 +186,11 @@ if(GVAR(keyDown) || GVAR(keyDownSelfAction)) then {
// Check the action conditions
_actionData = GVAR(selectedAction) select 0;
if ([_target, _player, _actionData select 6] call (_actionData select 4)) then {
// Call the statement
[_target, _player, _actionData select 6] call (_actionData select 3);
// Clear the conditions caches again if the action was performed
["clearConditionCaches", []] call EFUNC(common,localEvent);
};
};
};