Optimized EFUNC(common,cachedCall)

This commit is contained in:
esteldunedain 2016-02-08 16:09:14 -03:00
parent 62fb26200f
commit b358c4a8af

View File

@ -17,9 +17,9 @@
*/
#include "script_component.hpp"
params ["_params", "_function", "_namespace", "_uid", "_duration", "_event"];
if ((_namespace getVariable [_uid, [-99999]]) select 0 < ACE_diagTime) then {
params ["_params", "_function", "_namespace", "_uid", "_duration", "_event"];
_namespace setVariable [_uid, [ACE_diagTime + _duration, _params call _function]];
// Does the cache needs to be cleared on an event?