mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
GVAR(enabled) - readme
This commit is contained in:
parent
7cf77de8cf
commit
c5c36c42e1
@ -1,4 +1,9 @@
|
||||
class ACE_Settings {
|
||||
class GVAR(enabled) {
|
||||
value = 1;
|
||||
typeName = "BOOL";
|
||||
displayName = CSTRING(enabled_displayName);
|
||||
};
|
||||
class GVAR(maxRange) {
|
||||
value = 4;
|
||||
typeName = "SCALAR";
|
||||
|
@ -9,6 +9,11 @@ class CfgVehicles {
|
||||
isGlobal = 0;
|
||||
author = ECSTRING(common,ACETeam);
|
||||
class Arguments {
|
||||
class enabled {
|
||||
displayName = CSTRING(enabled_DisplayName);
|
||||
typeName = "BOOL";
|
||||
defaultValue = 1;
|
||||
};
|
||||
class maxRange {
|
||||
displayName = CSTRING(maxRange_displayName);
|
||||
description = CSTRING(maxRange_description);
|
||||
|
12
addons/finger/README.md
Normal file
12
addons/finger/README.md
Normal file
@ -0,0 +1,12 @@
|
||||
ace_finger
|
||||
===========
|
||||
|
||||
Allows players to point and show a virtual spot in the distance to nearby players.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [Drill](https://github.com/TheDrill/)
|
||||
- [PabstMirror](https://github.com/PabstMirror)
|
@ -8,7 +8,7 @@ GVAR(pfeh_id) = -1;
|
||||
|
||||
["SettingsInitialized", {
|
||||
//If not enabled, dont't bother adding keybind or eventhandler
|
||||
if (GVAR(maxRange) <= 0) exitWith {};
|
||||
if (!GVAR(enabled)) exitWith {};
|
||||
|
||||
[QGVAR(fingered), {_this call FUNC(incomingFinger)}] call EFUNC(common,addEventHandler);
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private["_fingerPosPrecise", "_playerEyePos", "_sendFingerToPlayers"];
|
||||
private["_fingerPosPrecise", "_playerEyePos", "_sendFingerToPlayers", "_nearbyMen"];
|
||||
|
||||
if (!alive ACE_player) exitWith {false};
|
||||
// Conditions: canInteract
|
||||
@ -25,7 +25,7 @@ if ((ACE_player != vehicle ACE_player) && {!((vehicle ACE_player) isKindOf "Stat
|
||||
//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};
|
||||
if (ACE_diagTime < (GVAR(lastFPTime) + FP_ACTION_TIMEOUT)) exitWith {true};
|
||||
|
||||
GVAR(lastFPTime) = ACE_diagTime;
|
||||
|
||||
@ -34,6 +34,12 @@ _playerEyePos = eyePos ACE_player;
|
||||
|
||||
_sendFingerToPlayers = [];
|
||||
|
||||
|
||||
_nearbyMen = (ACE_player nearObjects ["CAManBase", (GVAR(maxRange) + 2)]);
|
||||
{
|
||||
_nearbyMen append (crew _x);
|
||||
} forEach (ACE_player nearObjects ["StaticWeapon", (GVAR(maxRange) + 2)]);
|
||||
|
||||
{
|
||||
if ((((eyePos _x) vectorDistance _playerEyePos) < GVAR(maxRange)) &&
|
||||
{alive _x} &&
|
||||
@ -44,7 +50,7 @@ _sendFingerToPlayers = [];
|
||||
|
||||
_sendFingerToPlayers pushBack _x;
|
||||
};
|
||||
} forEach allUnits;
|
||||
} forEach _nearbyMen;
|
||||
|
||||
TRACE_1("sending finger to",_sendFingerToPlayers);
|
||||
|
||||
|
@ -17,4 +17,5 @@ PARAMS_1(_logic);
|
||||
|
||||
if !(isServer) exitWith {};
|
||||
|
||||
[_logic, QGVAR(enabled), "enabled"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(maxRange), "maxRange"] call EFUNC(common,readSettingFromModule);
|
||||
|
@ -27,11 +27,14 @@
|
||||
<Key ID="STR_ACE_finger_moduleSettings_displayName">
|
||||
<English>Finger Settings</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_finger_enabled_displayName">
|
||||
<English>Finger Pointing Enabled</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_finger_maxRange_displayName">
|
||||
<English>Finger Max Range</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_finger_maxRange_description">
|
||||
<English>How far away players can finger each other. Set to 0 to disable fingering. [default: 4]</English>
|
||||
<English>How far away players can finger each other. [default: 4]</English>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
|
Loading…
Reference in New Issue
Block a user