Code cleanup

This commit is contained in:
ulteq 2015-04-26 23:05:58 +02:00
parent 3e5462f3d4
commit 6170ef0d50
11 changed files with 12 additions and 96 deletions

View File

@ -1,18 +1,5 @@
#include "script_component.hpp"
if(isServer) then {
[QGVAR(frag_eh), { _this call FUNC(frago); }] call ace_common_fnc_addEventHandler;
};
/*
GVAR(replacedBisArtyWrapper) = false;
[] spawn {
waitUntil {
if(!(isNil "BIS_ARTY_F_ShellFlight")) then {
ACE_WRAPPER_BIS_ARTY_F_ShellFlight = BIS_ARTY_F_ShellFlight;
BIS_ARTY_F_ShellFlight = FUNC(BIS_ARTY_WRAPPER);
GVAR(replacedBisArtyWrapper) = true;
};
sleep 4;
GVAR(replacedBisArtyWrapper)
};
};
*/
};

View File

@ -1,48 +1,37 @@
#include "script_component.hpp"
ADDON = false;
PREP(doSpall);
PREP(fired);
PREP(frago);
PREP(trackFragRound);
PREP(spallTrack);
PREP(doSpall);
PREP(vectorDiffFast);
PREP(trackFragRound);
GVAR(trackedObjects) = [];
GVAR(blackList) = [];
GVAR(traceFrags) = false;
GVAR(replacedBisArtyWrapper) = true;
GVAR(trackedObjects) = [];
GVAR(TOTALFRAGS) = 0;
GVAR(spallIsTrackingCount) = 0;
GVAR(spallHPData) = [];
GVAR(spallIsTrackingCount) = 0;
GVAR(autoTrace) = true;
GVAR(traceID) = -1;
GVAR(traces) = [];
GVAR(tracesStarted) = false;
GVAR(traceID) = -1;
GVAR(autoTrace) = true;
// TODO setting
GVAR(enabled) = true;
// * Other Shit */
PREP(frag_trace);
PREP(denyFrag);
PREP(BIS_ARTY_WRAPPER);
PREP(startTracing);
PREP(stopTracing);
PREP(clearTraces);
PREP(trackTrace);
PREP(addTrack);
PREP(drawTraces);
PREP(removeTrack);
PREP(spallHP);
PREP(addBlackList);
PREP(addManualTrack);
PREP(startTracing);
PREP(stopTracing);
PREP(trackTrace);
ADDON = true;

View File

@ -10,7 +10,5 @@ class CfgPatches {
};
};
//PRELOAD_ADDONS;
#include "CfgEventhandlers.hpp"
#include "CfgAmmo.hpp"
#include "CfgAmmo.hpp"

View File

@ -1,13 +0,0 @@
#include "script_component.hpp"
_ret = [(_this select 6)] call FUNC(removeTrack);
if(!_ret) then {
[(_this select 6)] call FUNC(addBlackList);
};
_this call ACE_WRAPPER_BIS_ARTY_F_ShellFlight;
_catEntry = BIS_ARTY_SHELLCAT select ((count BIS_ARTY_SHELLCAT) - 1);
_shell = _catEntry select 0;
_ARTY_DeployOnImpact = getText (configFile >> "CfgAmmo" >> "ARTY_DeployOnImpact");
if(_ARTY_DeployOnImpact == "") then {
_this set[6, _shell];
_this call FUNC(fired);
};

View File

@ -1,4 +0,0 @@
#include "script_component.hpp"
private ["_round"];
_round = _this select 0;
GVAR(blackList) set[(count GVAR(blackList)), _round];

View File

@ -1,7 +0,0 @@
#include "script_component.hpp"
private ["_round"];
_round = _this select 0;
if(alive _round) then {
GVAR(trackedObjects) set[(count GVAR(trackedObjects)), _round];
[DFUNC(trackFragRound), 0, [_round, (getPosASL _round), (velocity _round), (typeOf _round), time, objNull, false, 0, 0]] call cba_fnc_addPerFrameHandler;
};

View File

@ -1,2 +0,0 @@
#include "script_component.hpp"
GVAR(traces) = [];

View File

@ -1,7 +0,0 @@
#include "script_component.hpp"
private ["_ret"];
_ret = [(_this select 0)] call FUNC(removeTrack);
if(!_ret) then {
[(_this select 0)] call FUNC(addBlackList);
};

View File

@ -1,10 +0,0 @@
#include "script_component.hpp"
private ["_params", "_shell"];
_params = _this select 0;
_shell = _params select 0;
if(alive _shell) then {
drop ["\Ca\Data\Cl_basic","","Billboard",1,30,(getPos _shell),[0,0,0],1,1.275,1.0,0.0,[0.5],[[0,1,0,1]],[0],0.0,2.0,"","",""];
} else {
[_this select 1] call cba_fnc_removePerFrameHandler;
};

View File

@ -1,15 +0,0 @@
#include "script_component.hpp"
private["_p1","_p2","_return"];
_p1 = _this select 0;
_p2 = _this select 1;
if ((count _p1) != (count _p2)) then {textLogFormat ["BIS_FNC Error: vectors not of same size"]};
_return = [];
{
_return set[_forEachIndex, (_p2 select _forEachIndex) - _x];
} forEach _p1;
_return