ACE3/addons/frag/functions/fnc_spallHP.sqf
ulteq 0d6d96e76c Cleanup++:
* Added missing privates
* Removed unused privates
* Replaced some old vector calculations with new vector commands
2015-04-27 22:04:35 +02:00

30 lines
1.2 KiB
Plaintext

#include "script_component.hpp"
private ["_initialData", "_hpData", "_round", "_hpRound", "_hpDirect"];
//player sideChat format["f: %1 c: %2", (_this select 0), (count GVAR(spallHPData))];
if ((_this select 0) <= (count GVAR(spallHPData))) then {
_initialData = GVAR(spallHPData) select (_this select 0);
if (!isNil "_initialData") then {
_hpRound = ((_this select 1) select 0) select 2;
_round = _initialData select 3;
_hpDirect = ((_this select 1) select 0) select 10;
if (_hpDirect && {_round == _hpRound}) then {
{
_hpData = _x;
_round = _initialData select 3;
// diag_log text format["HPDUMP-------------------------------------"];
// {
// _hp = _x;
// diag_log text format["%1 --", _forEachIndex];
// {
// diag_log text format["%1: %2", _forEachIndex, _x];
// } forEach _hp;
// } forEach (_this select 1);
[DFUNC(doSpall), 0, [_this, _forEachIndex]] call cba_fnc_addPerFrameHandler;
// player sideChat "WEEE";
} forEach (_this select 1);
};
};
};