diff --git a/addons/finger/ACE_Settings.hpp b/addons/finger/ACE_Settings.hpp index 584d1d03de..e07a11555e 100644 --- a/addons/finger/ACE_Settings.hpp +++ b/addons/finger/ACE_Settings.hpp @@ -1,23 +1,24 @@ -#include "code\addon.hpp" - -#define LOC(x) $__LOCALIZE_PREFIX__##x - - class ACE_Settings { - class GVAR(FP_indicator_for_self) { - displayName = LOC(indicator_for_self); - description = LOC(indicator_for_self__desc); - isClientSettable = 1; - typeName = "BOOL"; - value = 1; - }; - class GVAR(FP_indicator_color) - { - value[] = {0.83, 0.68, 0.21, 0.75}; - typeName = "COLOR"; - isClientSettable = 1; - displayName = LOC(color); - description = LOC(color__desc); - }; - + class GVAR(canFingerEachOther) { + typeName = "BOOL"; + value = 1; + }; + class GVAR(maxRange) { + typeName = "SCALAR"; + value = 4; + }; + class GVAR(indicatorForSelf) { + displayName = CSTRING(indicatorForSelf_name); + description = CSTRING(indicatorForSelf_description); + isClientSettable = 1; + typeName = "BOOL"; + value = 1; + }; + class GVAR(indicatorColor) { + value[] = {0.83, 0.68, 0.21, 0.75}; + typeName = "COLOR"; + isClientSettable = 1; + displayName = CSTRING(indicatorColor_name); + description = CSTRING(indicatorColor_description); + }; }; diff --git a/addons/finger/CfgEventHandlers.hpp b/addons/finger/CfgEventHandlers.hpp new file mode 100644 index 0000000000..917a0acbd7 --- /dev/null +++ b/addons/finger/CfgEventHandlers.hpp @@ -0,0 +1,10 @@ +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + }; +}; +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_postInit)); + }; +}; diff --git a/addons/finger/XEH_postInit.sqf b/addons/finger/XEH_postInit.sqf new file mode 100644 index 0000000000..98b4f8c9db --- /dev/null +++ b/addons/finger/XEH_postInit.sqf @@ -0,0 +1,23 @@ +#include "script_component.hpp" + +[QGVAR(fingered), {_this call FUNC(incomingFinger)}] call EFUNC(common,addEventHandler); + +if (!hasInterface) exitWith {}; + +GVAR(lastFPTime) = -1; +GVAR(fingersHash) = HASH_CREATE; +GVAR(pfeh_id) = -1; + +["SettingsInitialized", { + //If not enabled, dont't bother adding keybind + if (!GVAR(canFingerEachOther)) exitWith {}; + + ["ACE3 Common", + QGVAR(finger), + [(localize LSTRING(keyComb)), (localize LSTRING(keyComb_description))], + { + _this call FUNC(keyPress); + }, + {false}, + [41, true, false, false], true] call cba_fnc_addKeybind; // Shift + Tilda (hold) +}] call EFUNC(common,addEventHandler); diff --git a/addons/finger/XEH_preInit.sqf b/addons/finger/XEH_preInit.sqf new file mode 100644 index 0000000000..f8ff9da03d --- /dev/null +++ b/addons/finger/XEH_preInit.sqf @@ -0,0 +1,9 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP(incomingFinger); +PREP(keyPress); +PREP(perFrameEH); + +ADDON = true; diff --git a/addons/finger/code/addon.hpp b/addons/finger/code/addon.hpp deleted file mode 100644 index aedbcad672..0000000000 --- a/addons/finger/code/addon.hpp +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef __ADDON_HPP_ -#define __ADDON_HPP_ - - -#define __ADDON_NAME__ ace_finger -#define __BASENAME__ __ADDON_NAME__##_var -#define __PREFIX__ "\z\ace\addons\finger" -#define __PREFIXC__ "\z\ace\addons\finger\code\" - -#define FUNC(x) __BASENAME__##_fnc_##x -#define CFUNC(x) __ADDON_NAME__##_fnc_##x - -#define GVAR(x) __BASENAME__##_##x - -#define __LOCALIZE_PREFIX__ STR_Addons_ACE__dfinger__ -#define LOCALIZE(x) (localize ('__LOCALIZE_PREFIX__##x')) - - - - -#define PV(x) private ['x']; x - - - - -#endif diff --git a/addons/finger/code/fn__OEF_renderer.sqf b/addons/finger/code/fn__OEF_renderer.sqf deleted file mode 100644 index 586e852ef0..0000000000 --- a/addons/finger/code/fn__OEF_renderer.sqf +++ /dev/null @@ -1,24 +0,0 @@ -#include "addon.hpp" -#include "main.hpp" - -#define BASE_SIZE 44 - - -PV(_pos) = [0,0,0]; -PV(_name) = ""; - - -PV(_fov_corr) = ((worldToScreen (positionCameraToWorld [1000, 0, 10000])) select 0) - 0.5; -PV(_sz) = BASE_SIZE * _fov_corr; - -{ - _pos = _x select 0; - _name = _x select 1; - - drawIcon3D [FP_ICON, [ - GVAR(FP_indicator_color) select 0, - GVAR(FP_indicator_color) select 1, - GVAR(FP_indicator_color) select 2, - (GVAR(FP_indicator_color) select 3) max MIN_OPAQUE - ], _pos, _sz, _sz, 0, _name, 1, 0.03, "PuristaMedium"]; -} forEach MAP_VALUES(GVAR(cur_fps)); diff --git a/addons/finger/code/fn__comm.sqf b/addons/finger/code/fn__comm.sqf deleted file mode 100644 index fd1a088325..0000000000 --- a/addons/finger/code/fn__comm.sqf +++ /dev/null @@ -1,94 +0,0 @@ -#include "addon.hpp" -#include "main.hpp" - -// finger-pointing array format: -// 1: source player -// 2: position of finger-pointing -// 3: players to broadcast the finger-pointing to - -// server-side event-handlers - -if (isServer) then -{ - // receives finger-pointing array and broadcasts it to provided players - - GVAR(fnc_pv_fpToServer) = - { - LOGV(_this); - - PV(_val) = _this select 1; - - PV(_sp) = _val select 0; - PV(_pfp) = _val select 1; - PV(_dps) = _val select 2; - - GVAR(pv_fpToClient) = [_sp, _pfp]; - PV(_owner) = 0; - { - _owner = owner _x; - - LOGV(_x); - LOGV(_owner); - - if (_owner > 0 && {isPlayer _x}) then - { - if (player == _x) then - { - [0, GVAR(pv_fpToClient)] call GVAR(fnc_pv_fpToClient); - } - else - { - _owner publicVariableClient 'GVAR(pv_fpToClient)'; - }; - }; - } forEach _dps; - - }; - - - - 'GVAR(pv_fpToServer)' addPublicVariableEventHandler GVAR(fnc_pv_fpToServer); - -}; - - -if (hasInterface) then -{ - // currently shown finger-pointings map - // key: source player - // value: [position, source player name, last update time] - // - - - GVAR(cur_fps) = CREATE_MAP(); - - GVAR(fp_handler_running) = false; - - - // receives pointing-object and starts drawing process in format - // 1: source player - // 2: position of finger-pointing - // - - GVAR(fnc_pv_fpToClient) = { - LOGV(_this); - - PV(_val) = _this select 1; - PV(_sp) = _val select 0; - PV(_pfp) = _val select 1; - - PV(_newval) = [_pfp, name _sp, diag_tickTime]; - MAP_SET(GVAR(cur_fps), _sp, _newval); - - if (!GVAR(fp_handler_running)) then - { - GVAR(fp_handler_running) = true; - - [] spawn CFUNC(_fp_handler); - }; - }; - - 'GVAR(pv_fpToClient)' addPublicVariableEventHandler GVAR(fnc_pv_fpToClient); - - -}; diff --git a/addons/finger/code/fn__fp_handler.sqf b/addons/finger/code/fn__fp_handler.sqf deleted file mode 100644 index 52dedaf9be..0000000000 --- a/addons/finger/code/fn__fp_handler.sqf +++ /dev/null @@ -1,44 +0,0 @@ -#include "addon.hpp" -#include "main.hpp" - -['GVAR(_OEF_renderer)', "onEachFrame", CFUNC(_OEF_renderer)] - call BIS_fnc_addStackedEventHandler; - - -// deleting figner-pointings which last more than FP_TIMEOUT - -while {MAP_LEN(GVAR(cur_fps)) > 0} do -{ - if (!( - alive player && - {player == vehicle player || - (vehicle player) isKindOf "StaticWeapon"} - )) exitWith - { - GVAR(cur_fps) = CREATE_MAP(); - }; - - - _ct = diag_tickTime; - - _i = 0; - while {_i < MAP_LEN(GVAR(cur_fps))} do - { - _e = MAP_VALUES(GVAR(cur_fps)) select _i; - if (_ct > (_e select 2) + FP_TIMEOUT) then - { - MAP_IDEL(GVAR(cur_fps), _i); - } - else - { - _i = _i + 1; - }; - }; - - sleep 0.1; -}; - - -['GVAR(_OEF_renderer)', "onEachFrame"] call BIS_fnc_addStackedEventHandler; - -GVAR(fp_handler_running) = false; diff --git a/addons/finger/code/fn__init.sqf b/addons/finger/code/fn__init.sqf deleted file mode 100644 index 266c4017fb..0000000000 --- a/addons/finger/code/fn__init.sqf +++ /dev/null @@ -1,18 +0,0 @@ -#include "addon.hpp" -#include "main.hpp" - -[] spawn -{ - [] call CFUNC(_comm); -}; - - -if (hasInterface) then -{ - [] spawn - { - [] call CFUNC(_mainLoop); - }; -}; - - diff --git a/addons/finger/code/fn__mainLoop.sqf b/addons/finger/code/fn__mainLoop.sqf deleted file mode 100644 index 0d737b91f8..0000000000 --- a/addons/finger/code/fn__mainLoop.sqf +++ /dev/null @@ -1,90 +0,0 @@ -#include "addon.hpp" -#include "main.hpp" - -LOG("Starting"); - -//while {isNull (findDisplay 46)} do {sleep 1;}; - - -GVAR(FP_keyComb) = FP_DEFAULT_KEYBIND; - -GVAR(lastFPTime) = -FP_ACTION_TIMEOUT; - - -["ACE3 Common", - "point_finger_at", - [LOCALIZE(keyComb), LOCALIZE(keyComb)], - { - - PV(_rv) = false; - if (alive player) then - { - if (!( - (player == vehicle player || - (vehicle player) isKindOf "StaticWeapon") && - cameraView in ["INTERNAL", "EXTERNAL"] - )) exitWith {}; - - _rv = true; - - if (diag_tickTime < GVAR(lastFPTime) + FP_ACTION_TIMEOUT) - exitWith {}; - - - PV(_pos_prec) = positionCameraToWorld [0, 0, FP_DISTANCE]; - PV(_pos) = positionCameraToWorld [ - random (2*FP_RANDOMIZATION_X) - FP_RANDOMIZATION_X, - random (2*FP_RANDOMIZATION_Y) - FP_RANDOMIZATION_Y, - FP_DISTANCE - ]; - - - PV(_dest_players) = []; - - PV(_pep) = eyePos player; - { - if (isPlayer _x && _x != player && alive _x && - {(_x == vehicle _x || (vehicle _x) isKindOf "StaticWeapon") && { - ((eyePos _x) vectorDistance _pep) < MAX_DIST_TO_OTHER_PLAYERS - }}) then - { - _dest_players pushBack _x; - }; - } forEach playableUnits; - - GVAR(pv_fpToServer) = [player, _pos, _dest_players]; - - LOGV(GVAR(pv_fpToServer)); - - if (isServer) then - { - [0, GVAR(pv_fpToServer)] call GVAR(fnc_pv_fpToServer); - } - else - { - publicVariableServer 'GVAR(pv_fpToServer)'; - }; - - - if (GVAR(FP_indicator_for_self)) then - { - [0, [player, _pos_prec]] call GVAR(fnc_pv_fpToClient); - }; - - player playActionNow "GestureGo"; - GVAR(lastFPTime) = diag_tickTime; - - _rv = true; - }; - - _rv; - }, - "", - [GVAR(FP_keyComb) select 0, - [GVAR(FP_keyComb) select 1, GVAR(FP_keyComb) select 2, GVAR(FP_keyComb) select 3]] -] call cba_fnc_addKeybind; - - - - -LOG("Done"); diff --git a/addons/finger/code/macros.hpp b/addons/finger/code/macros.hpp deleted file mode 100644 index 13b3a30807..0000000000 --- a/addons/finger/code/macros.hpp +++ /dev/null @@ -1,54 +0,0 @@ -#define XOR(x,y) (((x)||(y)) && !((x)&&(y))) -#define SQR(x) ((x)*(x)) - - -// debug - - -#ifdef DEBUG - #define LOG(msg) (diag_log text format["%1:%2> %3", __FILE__, __LINE__, (msg)]) - #define LOGV(msg) (diag_log text format["%1:%2> %3 = %4", __FILE__, __LINE__, (#msg), (msg)]) -#else - #define LOG(msg) - #define LOGV(msg) -#endif - - - - - -// map macros - -#define CREATE_MAP() [[],[]] - -#define MAP_KEYS(m) ((m) select 0) -#define MAP_VALUES(m) ((m) select 1) - -#define MAP_SET(m, k, v) if (true) then {_____map_t = MAP_KEYS(m) find (k);\ - if (_____map_t >= 0) exitWith {MAP_VALUES(m) set [_____map_t, (v)]};\ - _____map_t = count MAP_KEYS(m);\ - MAP_KEYS(m) set [_____map_t, (k)];\ - MAP_VALUES(m) set [_____map_t, (v)];\ -} - -#define MAP_GET(m, k) if (true) then {_____map_t = MAP_KEYS(m) find (k);\ - if (_____map_t >= 0) exitWith {MAP_VALUES(m) select _____map_t};\ - nil\ -} - -#define MAP_DEL(m, k) if (true) then {_____map_t = MAP_KEYS(m) find (k);\ - if (_____map_t >= 0) exitWith {\ - MAP_KEYS(m) deleteAt _____map_t;\ - MAP_VALUES(m) deleteAt _____map_t;\ - };\ -} - -#define MAP_LEN(m) (count MAP_KEYS(m)) - -#define MAP_IKEY(m, k) (MAP_KEYS(m) find (k)) -#define MAP_IGET(m, i) (MAP_VALUES(m) select (i)) -#define MAP_ISET(m, i, v) (MAP_VALUES(m) set [(i), (v)]) -#define MAP_IDEL(m, i) if (true) then {\ - MAP_KEYS(m) deleteAt (i);\ - MAP_VALUES(m) deleteAt (i);\ -} diff --git a/addons/finger/code/main.hpp b/addons/finger/code/main.hpp deleted file mode 100644 index 7a58ba5a75..0000000000 --- a/addons/finger/code/main.hpp +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef __MAIN_HPP_ -#define __MAIN_HPP_ - -#include "addon.hpp" - -#include "settings.hpp" - -#include "structures.hpp" -#include "macros.hpp" - - -#endif diff --git a/addons/finger/code/settings.hpp b/addons/finger/code/settings.hpp deleted file mode 100644 index 4ca9c7c129..0000000000 --- a/addons/finger/code/settings.hpp +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef __STRUCTURES_H__ -#define __STRUCTURES_H__ - -// #define DEBUG - - -#define FP_ICON "\z\ace\addons\finger\img\fp_icon.paa" - -#define FP_DEFAULT_KEYBIND [41, true, false, false] // Shift + Tilda - - -#define FP_TIMEOUT 2 -#define FP_ACTION_TIMEOUT 1 - -#define FP_DISTANCE 10000 -#define FP_RANDOMIZATION_X 350 -#define FP_RANDOMIZATION_Y 100 - -#define MAX_DIST_TO_OTHER_PLAYERS 4 - - -#define MIN_OPAQUE 0.1 - - -#endif diff --git a/addons/finger/code/structures.hpp b/addons/finger/code/structures.hpp deleted file mode 100644 index 4922612347..0000000000 --- a/addons/finger/code/structures.hpp +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef __STRUCTURES_H__ -#define __STRUCTURES_H__ - - - - - - - -#endif diff --git a/addons/finger/config.cpp b/addons/finger/config.cpp index dd97a6294d..46e8c05dc2 100644 --- a/addons/finger/config.cpp +++ b/addons/finger/config.cpp @@ -2,51 +2,17 @@ #define RECOMPILE 0 -class CfgPatches -{ - class ace_finger - { - units[]={}; - weapons[]={}; - - requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_common"}; - - author[]= - { - "Drill" - }; - authorUrl = "https://github.com/TheDrill/"; - - addon_version=6; - - VERSION_CONFIG; - }; +class CfgPatches { + class ace_finger { + units[]={}; + weapons[]={}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_common"}; + author[]= {"Drill"}; + authorUrl = "https://github.com/TheDrill/"; + VERSION_CONFIG; + }; }; -class CfgFunctions -{ - class ace_finger - { - class Main - { - file="\z\ace\addons\finger\code"; - class _init - { - preInit=0; - postInit=1; - recompile=RECOMPILE; - }; - - class _mainLoop {recompile=RECOMPILE;}; - class _comm {recompile=RECOMPILE;}; - class _fp_handler {recompile=RECOMPILE;}; - class _OEF_renderer {recompile=RECOMPILE;}; - }; - }; -}; - - - #include "ACE_Settings.hpp" - +#include "CfgEventHandlers.hpp" diff --git a/addons/finger/functions/fnc_incomingFinger.sqf b/addons/finger/functions/fnc_incomingFinger.sqf new file mode 100644 index 0000000000..4476d138af --- /dev/null +++ b/addons/finger/functions/fnc_incomingFinger.sqf @@ -0,0 +1,35 @@ +/* + * Author: TheDrill, PabstMirror + * Recieve an finger event, adds to the array (or updates if already present) and starts PFEH if not already running + * + * Arguments: + * 0: Source Unit (can be self) + * 1: Position being pointed at (from positionCameraToWorld) + * + * Return Value: + * None + * + * Example: + * [bob, [1,2,3]] call ace_finger_fnc_incomingFinger; + * + * Public: No + */ +#include "script_component.hpp" + +PARAMS_2(_sourceUnit,_fingerPosPrecise); + +private ["_data", "_fingerPos"]; + +//add some random float to location if it's not our own finger: +_fingerPos = if (_sourceUnit == ACE_player) then { + _fingerPosPrecise +} else { + _fingerPosPrecise vectorAdd [random (2*FP_RANDOMIZATION_X) - FP_RANDOMIZATION_X, random (2*FP_RANDOMIZATION_X) - FP_RANDOMIZATION_X, random (2*FP_RANDOMIZATION_Y) - FP_RANDOMIZATION_Y] +}; + +_data = [ACE_diagTime, _fingerPos, ([_sourceUnit] call EFUNC(common,getName))]; +HASH_SET(GVAR(fingersHash), _sourceUnit, _data); + +if (GVAR(pfeh_id) == -1) then { + GVAR(pfeh_id) = [DFUNC(perFrameEH), 0, []] call CBA_fnc_addPerFrameHandler; +}; \ No newline at end of file diff --git a/addons/finger/functions/fnc_keyPress.sqf b/addons/finger/functions/fnc_keyPress.sqf new file mode 100644 index 0000000000..c367a5929b --- /dev/null +++ b/addons/finger/functions/fnc_keyPress.sqf @@ -0,0 +1,55 @@ +/* + * Author: TheDrill + * On keypress, point and send position to nearby players + * + * Arguments: + * None + * + * Return Value: + * Key Handeled + * + * Example: + * [] call ace_finger_fnc_keyPress; + * + * Public: No + */ +#include "script_component.hpp" + +private["_fingerPosPrecise", "_playerEyePos", "_sendFingerToPlayers"]; + +if (!alive ACE_player) exitWith {false}; +// Conditions: canInteract +if !([ACE_player, ACE_player, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; +//make sure player is dismounted or in a static weapon: +if ((ACE_player != vehicle ACE_player) && {!((vehicle ACE_player) isKindOf "StaticWeapon")}) exitWith {false}; +//Check camera view (not in GUNNER) +if !(cameraView in ["INTERNAL", "EXTERNAL"]) exitWith {false}; +//Exit if run recently (run every 1 seconds) +if (ACE_diagTime < (GVAR(lastFPTime) + FP_ACTION_TIMEOUT)) exitWith {false}; + +GVAR(lastFPTime) = ACE_diagTime; + +_fingerPosPrecise = positionCameraToWorld [0, 0, FP_DISTANCE]; +_playerEyePos = eyePos ACE_player; + +_sendFingerToPlayers = []; + +{ + if ((((eyePos _x) vectorDistance _playerEyePos) < GVAR(maxRange)) && + {alive _x} && + {(_x == (vehicle _x)) || {(vehicle _x) isKindOf "StaticWeapon"}} && + {GVAR(indicatorForSelf) || {_x != ACE_player}} && + {!(lineIntersects [(eyePos _x), _playerEyePos, ACE_player, _x])} && + {[_x] call EFUNC(common,isPlayer)}) then { + + _sendFingerToPlayers pushBack _x; + }; +} forEach allUnits; + +TRACE_1("sending finger to",_sendFingerToPlayers); + +[QGVAR(fingered), _sendFingerToPlayers, [ACE_player, _fingerPosPrecise]] call EFUNC(common,targetEvent); + +ACE_player playActionNow "GestureGo"; + +true diff --git a/addons/finger/functions/fnc_perFrameEH.sqf b/addons/finger/functions/fnc_perFrameEH.sqf new file mode 100644 index 0000000000..b05846b4b9 --- /dev/null +++ b/addons/finger/functions/fnc_perFrameEH.sqf @@ -0,0 +1,50 @@ +/* + * Author: TheDrill, PabstMirror + * The perFrameEventHandler to draw the icons + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [fromCBA] call ace_finger_fnc_perFrameEH; + * + * Public: No + */ +#include "script_component.hpp" + +private["_drawColor", "_fovCorrection", "_iconSize", "_sourceUnit", "_timeLeftToShow"]; + +if (!alive ACE_player) then {GVAR(fingersHash) = HASH_CREATE;}; +// Conditions: canInteract +if !([ACE_player, ACE_player, ["isNotInside"]] call EFUNC(common,canInteractWith)) then {GVAR(fingersHash) = HASH_CREATE;}; +//make sure player is dismounted or in a static weapon: +if ((ACE_player != vehicle ACE_player) && {!((vehicle ACE_player) isKindOf "StaticWeapon")}) then {GVAR(fingersHash) = HASH_CREATE;}; + +_fovCorrection = ((worldToScreen (positionCameraToWorld [1000, 0, 10000])) select 0) - 0.5; +_iconSize = BASE_SIZE * _fovCorrection; + +{ + _sourceUnit = _x; + _data = HASH_GET(GVAR(fingersHash), _x); + EXPLODE_3_PVT(_data,_lastTime,_pos,_name); + _timeLeftToShow = _lastTime + FP_TIMEOUT - ACE_diagTime; + if (_timeLeftToShow <= 0) then { + HASH_REM(GVAR(fingersHash), _x); + } else { + _drawColor = + GVAR(indicatorColor); + //Fade out: + if (_timeLeftToShow < 0.5) then { + _drawColor set [3, ((_drawColor select 3) * (_timeLeftToShow / 0.5))]; + }; + + drawIcon3D [FP_ICON, _drawColor, _pos, _iconSize, _iconSize, 0, _name, 1, 0.03, "PuristaMedium"]; + }; +} forEach (GVAR(fingersHash) select 0); + +if ((count (GVAR(fingersHash) select 0)) == 0) then { + [GVAR(pfeh_id)] call CBA_fnc_removePerFrameHandler; + GVAR(pfeh_id) = -1; +}; diff --git a/addons/finger/functions/script_component.hpp b/addons/finger/functions/script_component.hpp new file mode 100644 index 0000000000..4d3625f072 --- /dev/null +++ b/addons/finger/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\finger\script_component.hpp" \ No newline at end of file diff --git a/addons/finger/script_component.hpp b/addons/finger/script_component.hpp index 3d1bf7d049..321e35498c 100644 --- a/addons/finger/script_component.hpp +++ b/addons/finger/script_component.hpp @@ -9,4 +9,14 @@ #define DEBUG_SETTINGS DEBUG_SETTINGS_FINGER #endif -#include "\z\ace\Addons\main\script_macros.hpp" \ No newline at end of file +#include "\z\ace\Addons\main\script_macros.hpp" + +#define BASE_SIZE 44 +#define FP_ICON "\z\ace\addons\finger\img\fp_icon.paa" + +#define FP_TIMEOUT 2 +#define FP_ACTION_TIMEOUT 1 + +#define FP_DISTANCE 10000 +#define FP_RANDOMIZATION_X 350 +#define FP_RANDOMIZATION_Y 100 diff --git a/addons/finger/stringtable.xml b/addons/finger/stringtable.xml index ad8e643c75..d16d6b4294 100644 --- a/addons/finger/stringtable.xml +++ b/addons/finger/stringtable.xml @@ -1,34 +1,28 @@ - - - - - - - - - - - Show finger indicator to self - Отображать пальце-индикатор для показывающего игрока - - - Render the indicator for the pointing player. This option doesn't affect whether the other players would see the indicator - Отображать индикатор для показывающего игрока. Эта настройка не влияет на то, будутт ли другие игроки видеть индикатор - - - - Finger indicator - Пальце-индикатор - - - Color of the finger-pointing indicator circle - Цвет индикатора пальце-указания - - - - Action "point a finger at" - Действие "показать пальцем на" - - - + + + + + Show finger indicator to self + Отображать пальце-индикатор для показывающего игрока + + + Render the indicator for the pointing player. This option doesn't affect whether the other players would see the indicator + Отображать индикатор для показывающего игрока. Эта настройка не влияет на то, будутт ли другие игроки видеть индикатор + + + Finger indicator + Пальце-индикатор + + + Color of the finger-pointing indicator circle + Цвет индикатора пальце-указания + + + Action "point a finger at" + Действие "показать пальцем на" + + + Shows a virtual marker of where you are pointing to nearby units. + +