Code cleanup of Finger module is Incomming.

This commit is contained in:
jokoho48 2015-08-10 00:19:27 +02:00
parent dc06927418
commit f3fbf0c5ff
4 changed files with 6 additions and 7 deletions

View File

@ -16,10 +16,10 @@
*/
#include "script_component.hpp"
PARAMS_2(_sourceUnit,_fingerPosPrecise);
private ["_data", "_fingerPos"];
params ["_sourceUnit", "_fingerPosPrecise"];
//add some random float to location if it's not our own finger:
_fingerPos = if (_sourceUnit == ACE_player) then {
_fingerPosPrecise

View File

@ -50,7 +50,7 @@ _nearbyMen = (ACE_player nearObjects ["CAManBase", (GVAR(maxRange) + 2)]);
_sendFingerToPlayers pushBack _x;
};
} forEach _nearbyMen;
} count _nearbyMen;
TRACE_1("sending finger to",_sendFingerToPlayers);

View File

@ -13,8 +13,7 @@
#include "script_component.hpp"
PARAMS_1(_logic);
params ["_logic"];
if !(isServer) exitWith {};
[_logic, QGVAR(enabled), "enabled"] call EFUNC(common,readSettingFromModule);

View File

@ -30,7 +30,7 @@ _iconSize = BASE_SIZE * _fovCorrection;
{
_data = HASH_GET(GVAR(fingersHash), _x);
EXPLODE_3_PVT(_data,_lastTime,_pos,_name);
_data params ["_lastTime", "_pos", "_name"];
_timeLeftToShow = _lastTime + FP_TIMEOUT - ACE_diagTime;
if (_timeLeftToShow <= 0) then {
HASH_REM(GVAR(fingersHash), _x);
@ -43,7 +43,7 @@ _iconSize = BASE_SIZE * _fovCorrection;
drawIcon3D [QUOTE(PATHTOF(UI\fp_icon.paa)), _drawColor, _pos, _iconSize, _iconSize, 0, _name, 1, 0.03, "PuristaMedium"];
};
} forEach (GVAR(fingersHash) select 0);
} count (GVAR(fingersHash) select 0);
if ((count (GVAR(fingersHash) select 0)) == 0) then {
[GVAR(pfeh_id)] call CBA_fnc_removePerFrameHandler;