From bca5fa1f4a4dccc06c6dc933ced8656da6494283 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sat, 25 Jul 2015 03:20:03 -0500 Subject: [PATCH] Spall - execNextFrame instead of addPerFrameHandler --- addons/frag/functions/fnc_doSpall.sqf | 7 +++---- addons/frag/functions/fnc_spallHP.sqf | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/addons/frag/functions/fnc_doSpall.sqf b/addons/frag/functions/fnc_doSpall.sqf index 15764979d3..a5a5472e1b 100644 --- a/addons/frag/functions/fnc_doSpall.sqf +++ b/addons/frag/functions/fnc_doSpall.sqf @@ -2,12 +2,11 @@ #include "script_component.hpp" // ACE_player sideChat "WAAAAAAAAAAAAAAAAAAAAA"; -private ["_params", "_hitData", "_initialData", "_hpData", "_object", "_foundObjects", "_index", "_foundObjecsts", "_roundType", "_round", "_caliber", "_explosive", "_idh", "_alive", "_exit", "_vm", "_velocity", "_oldVelocity", "_curVelocity", "_diff", "_polar", "_unitDir", "_spallPos", "_pos1", "_i", "_pos2", "_blah", "_data", "_spallPolar", "_warn", "_c", "_m", "_k", "_gC", "_fragPower", "_fragTypes", "_spread", "_spallCount", "_elev", "_dir", "_vel", "_spallFragVect", "_fragType", "_fragment", "_pos"]; +private ["_hitData", "_initialData", "_hpData", "_object", "_foundObjects", "_index", "_foundObjecsts", "_roundType", "_round", "_caliber", "_explosive", "_idh", "_alive", "_exit", "_vm", "_velocity", "_oldVelocity", "_curVelocity", "_diff", "_polar", "_unitDir", "_spallPos", "_pos1", "_i", "_pos2", "_blah", "_data", "_spallPolar", "_warn", "_c", "_m", "_k", "_gC", "_fragPower", "_fragTypes", "_spread", "_spallCount", "_elev", "_dir", "_vel", "_spallFragVect", "_fragType", "_fragment", "_pos"]; -_params = _this select 0; -_hitData = _params select 0; +_hitData = _this select 0; _initialData = GVAR(spallHPData) select (_hitData select 0); -_hpData = (_hitData select 1) select (_params select 1); +_hpData = (_hitData select 1) select (_this select 1); _object = _hpData select 0; diff --git a/addons/frag/functions/fnc_spallHP.sqf b/addons/frag/functions/fnc_spallHP.sqf index 5e3719cb47..3756bb1416 100644 --- a/addons/frag/functions/fnc_spallHP.sqf +++ b/addons/frag/functions/fnc_spallHP.sqf @@ -21,7 +21,7 @@ if ((_this select 0) <= (count GVAR(spallHPData))) then { // diag_log text format["%1: %2", _forEachIndex, _x]; // } forEach _hp; // } forEach (_this select 1); - [DFUNC(doSpall), 0, [_this, _forEachIndex]] call cba_fnc_addPerFrameHandler; + [DFUNC(doSpall), [_this, _forEachIndex]] call EFUNC(common,execNextFrame); // player sideChat "WEEE"; } forEach (_this select 1); };