mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Code cleanup of Finger module is Incomming.
This commit is contained in:
parent
dc06927418
commit
f3fbf0c5ff
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
@ -13,8 +13,7 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_logic);
|
||||
|
||||
params ["_logic"];
|
||||
if !(isServer) exitWith {};
|
||||
|
||||
[_logic, QGVAR(enabled), "enabled"] call EFUNC(common,readSettingFromModule);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user