Merge branch 'master' into addMainAction

This commit is contained in:
PabstMirror 2015-08-09 13:00:56 -05:00
commit 5723c5eaac
312 changed files with 4332 additions and 1654 deletions

View File

@ -107,3 +107,4 @@ VyMajoris(W-Cephei)<vycanismajoriscsa@gmail.com>
Winter <simon@agius-muscat.net>
zGuba
Drill <drill87@gmail.com>
MikeMatrix <m.braun92@gmail.com>

View File

@ -4,10 +4,10 @@
</p>
<p align="center">
<a href="https://github.com/acemod/ACE3/releases">
<img src="https://img.shields.io/badge/Version-3.2.0-blue.svg"
<img src="https://img.shields.io/badge/Version-3.2.1-blue.svg"
alt="ACE version">
</a>
<a href="https://github.com/acemod/ACE3/releases/download/v3.2.0/ace3_3.2.0.zip">
<a href="https://github.com/acemod/ACE3/releases/download/v3.2.1/ace3_3.2.1.zip">
<img src="http://img.shields.io/badge/Download-56.5_MB-green.svg"
alt="ACE download">
</a>

View File

@ -1,31 +1,31 @@
class ACE_Settings {
class GVAR(enabled) {
displayName = "Advanced Ballistics";
description = "Enables advanced ballistics";
displayName = CSTRING(enabled_DisplayName);
description = CSTRING(enabled_Description);
typeName = "BOOL";
value = 0;
};
class GVAR(simulateForSnipers) {
displayName = "Enabled For Snipers";
description = "Enables advanced ballistics for non local snipers (when using high power optics)";
displayName = CSTRING(simulateForSnipers_DisplayName);
description = CSTRING(simulateForSnipers_Description);
typeName = "BOOL";
value = 1;
};
class GVAR(simulateForGroupMembers) {
displayName = "Enabled For Group Members";
description = "Enables advanced ballistics for non local group members";
displayName = CSTRING(simulateForGroupMembers_DisplayName);
description = CSTRING(simulateForGroupMembers_Description);
typeName = "BOOL";
value = 0;
};
class GVAR(simulateForEveryone) {
displayName = "Enabled For Everyone";
description = "Enables advanced ballistics for all non local players (enabling this may degrade performance during heavy firefights in multiplayer)";
displayName = CSTRING(simulateForEveryone_DisplayName);
description = CSTRING(simulateForEveryone_Description);
typeName = "BOOL";
value = 0;
};
class GVAR(disabledInFullAutoMode) {
displayName = "Disabled In FullAuto Mode";
description = "Disables advanced ballistics during full auto fire";
displayName = CSTRING(disabledInFullAutoMod_DisplayName);
description = CSTRING(disabledInFullAutoMod_Description);
typeName = "BOOL";
value = 0;
};
@ -38,32 +38,32 @@ class ACE_Settings {
};
*/
class GVAR(ammoTemperatureEnabled) {
displayName = "Enable Ammo Temperature Simulation";
description = "Muzzle velocity varies with ammo temperature";
displayName = CSTRING(ammoTemperatureEnabled_DisplayName);
description = CSTRING(ammoTemperatureEnabled_Description);
typeName = "BOOL";
value = 1;
};
class GVAR(barrelLengthInfluenceEnabled) {
displayName = "Enable Barrel Length Simulation";
description = "Muzzle velocity varies with barrel length";
displayName = CSTRING(barrelLengthInfluenceEnabled_DisplayName);
description = CSTRING(barrelLengthInfluenceEnabled_Description);
typeName = "BOOL";
value = 1;
};
class GVAR(bulletTraceEnabled) {
displayName = "Enable Bullet Trace Effect";
description = "Enables a bullet trace effect to high caliber bullets (only visible when looking through high power optics)";
displayName = CSTRING(bulletTraceEnabled_DisplayName);
description = CSTRING(bulletTraceEnabled_Description);
typeName = "BOOL";
value = 1;
};
class GVAR(simulationInterval) {
displayName = "Simulation Interval";
description = "Defines the interval between every calculation step";
displayName = CSTRING(simulationInterval_DisplayName);
description = CSTRING(simulationInterval_Description);
typeName = "SCALAR";
value = 0.0;
};
class GVAR(simulationRadius) {
displayName = "Simulation Radius";
description = "Defines the radius around the player (in meters) at which advanced ballistics are applied to projectiles";
displayName = CSTRING(simulationRadius_DisplayName);
description = CSTRING(simulationRadius_Description);
typeName = "SCALAR";
value = 3000;
};

View File

@ -53,7 +53,9 @@ if (!GVAR(simulateForEveryone) && !(local _unit)) then {
if (GVAR(disabledInFullAutoMode) && getNumber(configFile >> "CfgWeapons" >> _weapon >> _mode >> "autoFire") == 1) then { _abort = true; };
if (_abort || !(GVAR(extensionAvailable))) exitWith {
[_bullet, getNumber(configFile >> "CfgAmmo" >> _ammo >> "airFriction")] call EFUNC(winddeflection,updateTrajectoryPFH);
if (missionNamespace getVariable [QEGVAR(windDeflection,enabled), false]) then {
EGVAR(windDeflection,trackedBullets) pushBack [_bullet, getNumber(configFile >> "cfgAmmo" >> _ammo >> "airFriction")];
};
};
_AmmoCacheEntry = uiNamespace getVariable format[QGVAR(%1), _ammo];

View File

@ -21,7 +21,7 @@ class CfgVehicles {
author = "Ruthberg";
scope = 2;
scopeCurator = 2;
displayName = "ATragMX";
displayName = CSTRING(Name);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_ATragMX,1);

View File

@ -57,6 +57,6 @@ GVAR(DialogPFH) = [{
[_this select 1] call cba_fnc_removePerFrameHandler;
};
__ctrlBackground ctrlSetText format [QUOTE(PATHTOF(UI\ATRAG_%1.paa)), ["N", "D"] select (call EFUNC(common,ambientBrightness))];
}, 60, []] call cba_fnc_addPerFrameHandler;
}, 60, []] call CBA_fnc_addPerFrameHandler;
true

View File

@ -17,10 +17,10 @@
*/
#include "script_component.hpp"
private ["_itemClassname", "_itemVehClass", "_onAtachText", "_selfAttachPosition", "_attachedItem", "_tempObject", "_actionID", "_model"];
PARAMS_3(_attachToVehicle,_unit,_args);
_itemClassname = [_args, 0, ""] call CBA_fnc_defaultParam;
private ["_itemVehClass", "_onAtachText", "_selfAttachPosition", "_attachedItem", "_tempObject", "_actionID", "_model"];
params ["_attachToVehicle","_unit","_args"];
_args params [["_itemClassname","", [""]]];
TRACE_3("params",_attachToVehicle,_unit,_itemClassname);
//Sanity Check (_unit has item in inventory, not over attach limit)
if ((_itemClassname == "") || {!(_this call FUNC(canAttach))}) exitWith {ERROR("Tried to attach, but check failed");};
@ -69,9 +69,8 @@ if (_unit == _attachToVehicle) then { //Self Attachment
[{
private["_angle", "_dir", "_screenPos", "_realDistance", "_up", "_virtualPos", "_virtualPosASL", "_lineInterection"];
PARAMS_2(_args,_pfID);
EXPLODE_6_PVT(_args,_unit,_attachToVehicle,_itemClassname,_itemVehClass,_onAtachText,_actionID);
params ["_args","_idPFH"];
_args params ["_unit","_attachToVehicle","_itemClassname","_itemVehClass","_onAtachText","_actionID"];
_virtualPosASL = (eyePos _unit) vectorAdd (positionCameraToWorld [0,0,0.6]) vectorDiff (positionCameraToWorld [0,0,0]);
if (cameraView == "EXTERNAL") then {
@ -88,7 +87,7 @@ if (_unit == _attachToVehicle) then { //Self Attachment
{!([_unit, _attachToVehicle, []] call EFUNC(common,canInteractWith))} ||
{!([_attachToVehicle, _unit, _itemClassname] call FUNC(canAttach))}) then {
[_pfID] call CBA_fnc_removePerFrameHandler;
[_idPFH] call CBA_fnc_removePerFrameHandler;
[_unit, QGVAR(vehAttach), false] call EFUNC(common,setForceWalkStatus);
[] call EFUNC(interaction,hideMouseHint);
[_unit, "DefaultAction", (_unit getVariable [QGVAR(placeActionEH), -1])] call EFUNC(common,removeActionEventHandler);

View File

@ -17,14 +17,14 @@
*/
#include "script_component.hpp"
PARAMS_3(_attachToVehicle,_player,_args);
private ["_attachLimit", "_attachedObjects","_playerPos"];
params ["_attachToVehicle","_player","_args"];
_args params [["_itemClassname","", [""]]];
TRACE_3("params",_attachToVehicle,_unit,_itemClassname);
private ["_itemName", "_attachLimit", "_attachedObjects","_playerPos"];
_itemName = [_args, 0, ""] call CBA_fnc_defaultParam;
_attachLimit = [6, 1] select (_player == _attachToVehicle);
_attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []];
_playerPos = (ACE_player modelToWorldVisual (ACE_player selectionPosition "pilot"));
(canStand _player) && {(_attachToVehicle distance _player) < 7} && {alive _attachToVehicle} && {(count _attachedObjects) < _attachLimit} && {_itemName in ((itemsWithMagazines _player) + [""])};
(canStand _player) && {(_attachToVehicle distance _player) < 7} && {alive _attachToVehicle} && {(count _attachedObjects) < _attachLimit} && {_itemClassname in ((itemsWithMagazines _player) + [""])};

View File

@ -16,9 +16,9 @@
*/
#include "script_component.hpp"
PARAMS_2(_attachToVehicle,_unit);
private ["_attachedObjects", "_inRange"];
params ["_attachToVehicle", "_unit"];
TRACE_2("params",_attachToVehicle,_unit);
_attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []];

View File

@ -16,15 +16,16 @@
*/
#include "script_component.hpp"
PARAMS_2(_attachToVehicle,_unit);
private ["_attachedObjects", "_attachedItems", "_itemDisplayName"];
private ["_attachedObjects", "_attachedItems", "_itemDisplayName",
"_attachedObject", "_attachedIndex", "_itemName", "_minDistance",
"_unitPos", "_objectPos"
];
params ["_attachToVehicle","_unit"],
TRACE_2("params",_attachToVehicle,_unit);
_attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []];
_attachedItems = _attachToVehicle getVariable [QGVAR(ItemNames), []];
private ["_attachedObject", "_attachedIndex", "_itemName", "_minDistance", "_unitPos", "_objectPos"];
_attachedObject = objNull;
_attachedIndex = -1;
_itemName = "";

View File

@ -18,7 +18,8 @@
#include "script_component.hpp"
private ["_listed", "_actions", "_item", "_displayName", "_picture", "_action"];
PARAMS_2(_target,_player);
params ["_target","_player"];
TRACE_2("params",_target,_player);
_listed = [];
_actions = [];
@ -30,7 +31,7 @@ _actions = [];
if (getText (_item >> "ACE_Attachable") != "") then {
_displayName = getText(_item >> "displayName");
_picture = getText(_item >> "picture");
_action = [_x, _displayName, _picture, {_this call FUNC(attach)}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction);
_action = [_x, _displayName, _picture, {[{_this call FUNC(attach)}, _this] call EFUNC(common,execNextFrame)}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction);
_actions pushBack [_action, [], _target];
};
};
@ -43,7 +44,7 @@ _actions = [];
if (getText (_item >> "ACE_Attachable") != "") then {
_displayName = getText(_item >> "displayName");
_picture = getText(_item >> "picture");
_action = [_x, _displayName, _picture, {_this call FUNC(attach)}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction);
_action = [_x, _displayName, _picture, {[{_this call FUNC(attach)}, _this] call EFUNC(common,execNextFrame)}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction);
_actions pushBack [_action, [], _target];
};
};

View File

@ -27,7 +27,8 @@
private ["_startingOffset", "_startDistanceFromCenter", "_closeInUnitVector", "_closeInMax", "_closeInMin", "_closeInDistance", "_endPosTestOffset", "_endPosTest", "_doesIntersect", "_startingPosShifted", "_startASL", "_endPosShifted", "_endASL", "_attachedObject", "_currentObjects", "_currentItemNames"];
PARAMS_6(_unit,_attachToVehicle,_itemClassname,_itemVehClass,_onAtachText,_startingPosition);
params ["_unit", "_attachToVehicle", "_itemClassname", "_itemVehClass", "_onAtachText", "_startingPosition"];
TRACE_6("params",_unit,_attachToVehicle,_itemClassname,_itemVehClass,_onAtachText,_startingPosition);
_startingOffset = _attachToVehicle worldToModel _startingPosition;

View File

@ -1,9 +1,9 @@
// by commy2
#include "script_component.hpp"
private ["_wall", "_paper"];
private "_paper";
_wall = _this select 0;
params ["_wall"];
if (local _wall) then {
_paper = "UserTexture_1x2_F" createVehicle position _wall;

View File

@ -5,6 +5,13 @@ class ACE_Settings {
typeName = "BOOL";
value = 1;
};
class GVAR(requireSurrender) {
displayName = CSTRING(ModuleSettings_requireSurrender_name);
description = CSTRING(ModuleSettings_requireSurrender_description);
typeName = "SCALAR";
values[] = {ECSTRING(common,Disabled), CSTRING(SurrenderOnly), CSTRING(SurrenderOrNoWeapon)};
value = 1;
};
class GVAR(allowSurrender) {
displayName = CSTRING(ModuleSettings_allowSurrender_name);
description = CSTRING(ModuleSettings_allowSurrender_description);

View File

@ -189,6 +189,26 @@ class CfgVehicles {
typeName = "BOOL";
defaultValue = 1;
};
class requireSurrender {
displayName = CSTRING(ModuleSettings_allowSurrender_name);
description = CSTRING(ModuleSettings_allowSurrender_description);
typeName = "NUMBER";
class values {
class disable {
name = ECSTRING(common,No);
value = 0;
};
class Surrender {
name = CSTRING(SurrenderOnly);
value = 1;
default = 1;
};
class SurrenderOrNoWeapon {
name = CSTRING(SurrenderOrNoWeapon);
value = 2;
};
};
};
};
class ModuleDescription: ModuleDescription {
description = CSTRING(ModuleSettings_Description);

View File

@ -16,11 +16,11 @@
*/
#include "script_component.hpp"
PARAMS_2(_unit,_target);
params ["_unit", "_target"];
//Check sides, Player has cableTie, target is alive and not already handcuffed
(GVAR(allowHandcuffOwnSide) || {(side _unit) != (side _target)}) &&
("ACE_CableTie" in (items _unit)) &&
{alive _target} &&
{!(_target getVariable [QGVAR(isHandcuffed), false])}
{!(_target getVariable [QGVAR(isHandcuffed), false])} &&
(GVAR(requireSurrender) == 0 || ((_target getVariable [QGVAR(isSurrendering), false]) || (currentWeapon _target == "" && GVAR(requireSurrender) == 2)))

View File

@ -16,8 +16,7 @@
*/
#include "script_component.hpp"
PARAMS_2(_unit,_target);
params ["_unit", "_target"];
//Alive, handcuffed, not being escored, and not unconscious
(_target getVariable [QGVAR(isHandcuffed), false]) &&

View File

@ -16,7 +16,7 @@
*/
#include "script_component.hpp"
PARAMS_2(_unit,_target);
params ["_unit", "_target"];
_target getVariable [QGVAR(isHandcuffed), false]
|| {_target getVariable [QGVAR(isSurrendering), false]}

View File

@ -18,8 +18,7 @@
#include "script_component.hpp"
private ["_objects"];
PARAMS_3(_unit,_target,_vehicle);
params ["_unit", "_target","_vehicle"];
if (isNull _target) then {
_objects = attachedObjects _unit;

View File

@ -16,7 +16,7 @@
*/
#include "script_component.hpp"
PARAMS_2(_unit,_target);
params ["_unit", "_target"];
//Unit is handcuffed and not currently being escorted
_target getVariable [QGVAR(isHandcuffed), false] &&

View File

@ -16,8 +16,7 @@
*/
#include "script_component.hpp"
PARAMS_1(_unit);
DEFAULT_PARAM(1,_target,objNull);
params ["_unit", ["_target", objNull]];
if (isNull _target) then {
_target = _unit getVariable [QGVAR(escortedUnit), objNull];

View File

@ -16,12 +16,12 @@
*/
#include "script_component.hpp"
PARAMS_2(_unit,_newSurrenderState);
private "_returnValue";
params ["_unit", "_newSurrenderState"];
_returnValue = if (_newSurrenderState) then {
//no weapon equiped AND not currently surrendering and
//no weapon equiped AND not currently surrendering and
GVAR(allowSurrender) && {(currentWeapon _unit) == ""} && {!(_unit getVariable [QGVAR(isSurrendering), false])}
} else {
//is Surrendering

View File

@ -18,6 +18,6 @@
private ["_cargo"];
PARAMS_2(_player,_unit);
params ["_player", "_unit"];
((vehicle _unit) != _unit) && {_unit getVariable [QGVAR(isHandcuffed), false]}

View File

@ -16,10 +16,11 @@
*/
#include "script_component.hpp"
PARAMS_2(_unit,_target);
_unit removeItem "ACE_CableTie";
params ["_unit", "_target"];
playSound3D [QUOTE(PATHTO_R(sounds\cable_tie_zipping.ogg)), objNull, false, (getPosASL _target), 1, 1, 10];
["SetHandcuffed", [_target], [_target, true]] call EFUNC(common,targetEvent);
_unit removeItem "ACE_CableTie";

View File

@ -17,7 +17,7 @@
*/
#include "script_component.hpp"
PARAMS_3(_unit,_target,_state);
params ["_unit", "_target","_state"];
if (_state) then {
if (_unit getVariable [QGVAR(isEscorting), false]) exitWith {};

View File

@ -19,6 +19,7 @@
private ["_weapon", "_listedItemClasses", "_actions", "_allGear"];
PARAMS_2(_player,_unit);
params ["_player", "_unit"];
_weapon = currentWeapon _player;
if (_weapon == primaryWeapon _player && {_weapon != ""}) then {

View File

@ -17,9 +17,10 @@
*/
#include "script_component.hpp"
PARAMS_3(_unit,_target,_vehicle);
private "_objects";
params ["_unit", "_target","_vehicle"];
if (isNull _target) then {
_objects = attachedObjects _unit;
_objects = [_objects, {_this getVariable [QGVAR(isHandcuffed), false]}] call EFUNC(common,filter);

View File

@ -15,6 +15,6 @@
*/
#include "script_component.hpp"
PARAMS_2(_unit,_target);
params ["_unit", "_target"];
["SetHandcuffed", [_target], [_target, false]] call EFUNC(common,targetEvent);

View File

@ -16,6 +16,6 @@
*/
#include "script_component.hpp"
PARAMS_2(_unit,_target);
params ["_unit", "_target"];
["MoveOutCaptive", [_target], [_target]] call EFUNC(common,targetEvent);

View File

@ -17,7 +17,7 @@
*/
#include "script_component.hpp"
PARAMS_3(_vehicle,_dontcare,_unit);
params ["_vehicle", "_dontcare","_unit"];
if (local _unit) then {
if (_unit getVariable [QGVAR(isEscorting), false]) then {

View File

@ -17,7 +17,7 @@
*/
#include "script_component.hpp"
PARAMS_3(_vehicle,_dontcare,_unit);
params ["_vehicle", "_dontcare","_unit"];
if ((local _unit) && {_unit getVariable [QGVAR(isHandcuffed), false]}) then {
private ["_cargoIndex"];

View File

@ -15,7 +15,7 @@
*/
#include "script_component.hpp"
PARAMS_1(_oldUnit);
params ["_oldUnit"];
if (!local _oldUnit) exitWith {};

View File

@ -16,7 +16,7 @@
*/
#include "script_component.hpp"
EXPLODE_2_PVT(_this,_unit,_isUnconc);
params ["_unit","_isUnconc"];
if (!local _unit) exitWith {};

View File

@ -16,7 +16,7 @@
*/
#include "script_component.hpp"
PARAMS_2(_newUnit,_oldUnit);
params ["_newUnit","_oldUnit"];
//set showHUD based on new unit status:
if ((_newUnit getVariable [QGVAR(isHandcuffed), false]) || {_newUnit getVariable [QGVAR(isSurrendering), false]}) then {

View File

@ -16,7 +16,7 @@
*/
#include "script_component.hpp"
PARAMS_2(_unit,_dead);
params ["_unit","_dead"];
if (!local _unit) exitWith {};

View File

@ -15,7 +15,7 @@
*/
#include "script_component.hpp"
PARAMS_1(_unit);
params ["_unit"];
// prevent players from throwing grenades (added to all units)
[_unit, "Throw", {((_this select 1) getVariable [QGVAR(isHandcuffed), false]) || {(_this select 1) getVariable [QGVAR(isSurrendering), false]}}, {}] call EFUNC(common,addActionEventhandler);

View File

@ -17,7 +17,7 @@
*/
#include "script_component.hpp"
PARAMS_2(_unit,_zeusIsOpen);
params ["_unit","_zeusIsOpen"];
//set showHUD based on unit status:
if (!_zeusIsOpen) then {

View File

@ -13,7 +13,8 @@
#include "script_component.hpp"
PARAMS_1(_logic);
params ["_logic"];
[_logic, QGVAR(allowHandcuffOwnSide), "allowHandcuffOwnSide"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(allowSurrender), "allowSurrender"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(requireSurrender), "requireSurrender"] call EFUNC(common,readSettingFromModule);

View File

@ -17,9 +17,10 @@
*/
#include "script_component.hpp"
PARAMS_3(_logic,_units,_activated);
private ["_bisMouseOver", "_mouseOverObject"];
params ["_logic", "_units", "_activated"];
if (!_activated) exitWith {};
if (local _logic) then {

View File

@ -16,8 +16,7 @@
*/
#include "script_component.hpp"
PARAMS_2(_unit,_state);
params ["_unit","_state"];
if (!local _unit) exitwith {
ERROR("running setHandcuffed on remote unit");
@ -43,7 +42,7 @@ if (_state) then {
// fix anim on mission start (should work on dedicated servers)
[{
PARAMS_1(_unit);
params ["_unit"];
if (_unit getVariable [QGVAR(isHandcuffed), false] && {vehicle _unit == _unit}) then {
[_unit] call EFUNC(common,fixLoweredRifleAnimation);
[_unit, "ACE_AmovPercMstpScapWnonDnon", 1] call EFUNC(common,doAnimation);

View File

@ -16,8 +16,7 @@
*/
#include "script_component.hpp"
PARAMS_2(_unit,_state);
params ["_unit","_state"];
if (!local _unit) exitwith {
ERROR("running surrender on remote unit");

View File

@ -16,10 +16,10 @@
*/
#include "script_component.hpp"
PARAMS_2(_target,_vehicle);
private ["_cargoIndex"];
params ["_target","_vehicle"];
_target moveInCargo _vehicle;
_target assignAsCargo _vehicle;
_cargoIndex = _vehicle getCargoIndex _target;

View File

@ -15,8 +15,7 @@
*/
#include "script_component.hpp"
PARAMS_1(_unit);
params ["_unit"];
_unit setVariable [QGVAR(CargoIndex), -1, true];
moveOut _unit;

View File

@ -221,5 +221,17 @@
<German>Spieler können kapitulieren, nachdem sie ihre Waffe geholstert haben</German>
<Portuguese>Jogadores podem se render depois de guardar sua arma</Portuguese>
</Key>
<Key ID="STR_ACE_Captives_ModuleSettings_requireSurrender_name">
<English>Require surrendering</English>
</Key>
<Key ID="STR_ACE_Captives_ModuleSettings_requireSurrender_description">
<English>Require Players to surrender before they can be arrested</English>
</Key>
<Key ID="STR_ACE_Captives_SurrenderOnly">
<English>Surrendering only</English>
</Key>
<Key ID="STR_ACE_Captives_SurrenderOrNoWeapon">
<English>Surrendering or No weapon</English>
</Key>
</Package>
</Project>

View File

@ -37,6 +37,13 @@
};
}] call FUNC(addEventhandler);
["HeadbugFixUsed", {
PARAMS_2(_profileName,_animation);
diag_log text format ["[ACE] Headbug Used: Name: %1, Animation: %2", _profileName, _animation];
}] call FUNC(addEventHandler);
//~~~~~Get Map Data~~~~~
//Find MGRS zone and 100km grid for current map
[] call FUNC(getMGRSdata);
@ -111,8 +118,9 @@ if(!isServer) then {
};
["SEH", FUNC(_handleSyncedEvent)] call FUNC(addEventHandler);
["SEH_s", FUNC(_handleRequestSyncedEvent)] call FUNC(addEventHandler);
[FUNC(syncedEventPFH), 0.5, []] call cba_fnc_addPerFrameHandler;
if (isServer) then {
[FUNC(syncedEventPFH), 0.5, []] call CBA_fnc_addPerFrameHandler;
};
call FUNC(checkFiles);
@ -149,7 +157,7 @@ call FUNC(checkFiles);
//Event that settings are safe to use:
["SettingsInitialized", []] call FUNC(localEvent);
}, 0, [false]] call cba_fnc_addPerFrameHandler;
}, 0, [false]] call CBA_fnc_addPerFrameHandler;
["SettingsInitialized", {
@ -273,7 +281,7 @@ GVAR(OldPlayerWeapon) = currentWeapon ACE_player;
["playerWeaponChanged", [ACE_player, _newPlayerWeapon]] call FUNC(localEvent);
};
}, 0, []] call cba_fnc_addPerFrameHandler;
}, 0, []] call CBA_fnc_addPerFrameHandler;
// PFH to raise camera created event. Only works on these cams by BI.
@ -298,7 +306,7 @@ GVAR(OldIsCamera) = false;
["activeCameraChanged", [ACE_player, _isCamera]] call FUNC(localEvent);
};
}, 1, []] call cba_fnc_addPerFrameHandler; // feel free to decrease the sleep ACE_time if you need it.
}, 1, []] call CBA_fnc_addPerFrameHandler; // feel free to decrease the sleep ACE_time if you need it.
[QGVAR(StateArrested),false,true,QUOTE(ADDON)] call FUNC(defineVariable);
@ -326,13 +334,21 @@ if(isMultiplayer && { ACE_time > 0 || isNull player } ) then {
["PlayerJip", [player] ] call FUNC(localEvent);
[(_this select 1)] call cba_fnc_removePerFrameHandler;
};
}, 0, []] call cba_fnc_addPerFrameHandler;
}, 0, []] call CBA_fnc_addPerFrameHandler;
};
//Device Handler:
GVAR(deviceKeyHandlingArray) = [];
GVAR(deviceKeyCurrentIndex) = -1;
// Register localizations for the Keybinding categories
["ACE3 Equipment", localize LSTRING(ACEKeybindCategoryEquipment)] call cba_fnc_registerKeybindModPrettyName;
["ACE3 Common", localize LSTRING(ACEKeybindCategoryCommon)] call cba_fnc_registerKeybindModPrettyName;
["ACE3 Weapons", localize LSTRING(ACEKeybindCategoryWeapons)] call cba_fnc_registerKeybindModPrettyName;
["ACE3 Movement", localize LSTRING(ACEKeybindCategoryMovement)] call cba_fnc_registerKeybindModPrettyName;
["ACE3 Scope Adjustment", localize LSTRING(ACEKeybindCategoryScopeAdjustment)] call cba_fnc_registerKeybindModPrettyName;
["ACE3 Vehicles", localize LSTRING(ACEKeybindCategoryVehicles)] call cba_fnc_registerKeybindModPrettyName;
["ACE3 Equipment", QGVAR(openDevice), (localize "STR_ACE_Common_toggleHandheldDevice"),
{
[] call FUNC(deviceKeyFindValidIndex);

View File

@ -327,7 +327,7 @@ if (hasInterface) then {
// Raise ACE event
["playerChanged", [ACE_player, _oldPlayer]] call FUNC(localEvent);
};
}, 0, []] call cba_fnc_addPerFrameHandler;
}, 0, []] call CBA_fnc_addPerFrameHandler;
};
// Time handling
@ -340,7 +340,7 @@ ACE_pausedTime = 0;
ACE_virtualPausedTime = 0;
PREP(timePFH);
[FUNC(timePFH), 0, []] call cba_fnc_addPerFrameHandler;
[FUNC(timePFH), 0, []] call CBA_fnc_addPerFrameHandler;
// Init toHex
[0] call FUNC(toHex);

View File

@ -7,9 +7,10 @@ diag_log text format["REGISTERED ACE PFH HANDLERS"];
diag_log text format["-------------------------------------------"];
if (!isNil "ACE_PFH_COUNTER") then {
{
private["_pfh"];
_pfh = _x select 0;
diag_log text format["Registered PFH: id=%1, %1:%2", (_pfh select 0), (_pfh select 1), (_pfh select 2) ];
private ["_isActive"];
_x params ["_pfh", "_parameters"];
_isActive = if (!isNil {cba_common_PFHhandles select (_pfh select 0)}) then {"ACTIVE"} else {"REMOVED"};
diag_log text format["Registered PFH: id=%1 [%2, delay %3], %4:%5", (_pfh select 0), (_isActive), (_parameters select 1), (_pfh select 1), (_pfh select 2) ];
} forEach ACE_PFH_COUNTER;
};

View File

@ -10,21 +10,33 @@
#include "script_component.hpp"
private ["_pos","_dir","_anim"];
if (player != vehicle player || {(player getvariable ["ace_isUnconscious", false])}) exitWith {};
titleCut ["", "BLACK"];
_pos = getposATL player;
_dir = getDir player;
_anim = animationState player;
// create invisible headbug fix vehicle
_ACE_HeadbugFix = createVehicle ["ACE_Headbug_Fix", getposATL player, [], 0, "NONE"];
_ACE_HeadbugFix setDir _dir;
player moveInAny _ACE_HeadbugFix;
sleep 1.0;
unassignVehicle player;
player action ["Eject", vehicle player];
sleep 1.0;
deleteVehicle _ACE_HeadbugFix;
player setposATL _pos;
player setDir _dir;
titleCut ["", "PLAIN"];
_anim = animationState ACE_player;
["HeadbugFixUsed", [profileName, _anim]] call FUNC(serverEvent);
["HeadbugFixUsed", [profileName, _anim]] call FUNC(localEvent);
if (ACE_player != vehicle ACE_player || { !([ACE_player, objNull, ["isNotSitting"]] call FUNC(canInteractWith)) } ) exitWith {false};
_pos = getposATL ACE_player;
_dir = getDir ACE_player;
titleCut ["", "BLACK"];
[ACE_Player, "headBugFix"] call FUNC(hideUnit);
// create invisible headbug fix vehicle
_ACE_HeadbugFix = "ACE_Headbug_Fix" createVehicleLocal _pos;
_ACE_HeadbugFix setDir _dir;
ACE_player moveInAny _ACE_HeadbugFix;
sleep 0.1;
unassignVehicle ACE_player;
ACE_player action ["Eject", vehicle ACE_player];
ACE_player setDir _dir;
ACE_player setposATL _pos;
sleep 1.0;
deleteVehicle _ACE_HeadbugFix;
[ACE_Player, "headBugFix"] call FUNC(unhideUnit);
titleCut ["", "PLAIN"];
true

View File

@ -65,7 +65,8 @@ if (isNil _name) then {
localizedDescription,
possibleValues,
isForced,
defaultValue
defaultValue,
category
];*/
_settingData = [
_name,
@ -75,7 +76,8 @@ if (isNil _name) then {
getText (_optionEntry >> "description"),
getArray (_optionEntry >> "values"),
getNumber (_optionEntry >> "force") > 0,
_value
_value,
getText (_optionEntry >> "category")
];
//Strings in the values array won't be localized from the config, so just do that now:

View File

@ -36,7 +36,7 @@ if (isNil QGVAR(publishSchedId)) then {
GVAR(publishVarNames) = [];
GVAR(publishNextTime) = 1e7;
};
}, 0, []] call cba_fnc_addPerFrameHandler;
}, 0, []] call CBA_fnc_addPerFrameHandler;
};
// If the variable is not on the list

View File

@ -30,14 +30,14 @@ if (_vehicle isKindOf "Ship" ) then {
_emptyPos = (getPosASL _vehicle) call EFUNC(common,ASLtoPosition);
_emptyPos = [(_emptyPos select 0) + random(5), (_emptyPos select 1) + random(5), _emptyPos select 2 ];
} else {
if !(speed _vehicle <1 && {isTouchingGround _vehicle}) then {_validVehiclestate = false};
if !(speed _vehicle <1 && {(((getPosATL _vehicle) select 2) < 2)}) then {_validVehiclestate = false};
TRACE_1("Vehicle Ground Check", isTouchingGround _vehicle);
_emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 13, typeof _unit]);
};
};
TRACE_1("getPosASL Vehicle Check", getPosASL _vehicle);
if (!_validVehiclestate) exitwith { diag_log format["Unable to unload patient because invalid vehicle state. Either moving or Not close enough on the ground. %1", getPos _vehicle]; false };
if (!_validVehiclestate) exitwith { diag_log format["Unable to unload patient because invalid (%1) vehicle state. Either moving or Not close enough on the ground. position: %2 isTouchingGround: %3 Speed: %4", _vehicle, getPos _vehicle, isTouchingGround _vehicle, speed _vehicle]; false };
diag_log str _emptyPos;

View File

@ -598,5 +598,86 @@
<Polish>Następne urządzenie podręczne</Polish>
<Czech>Procházet ruční zařízení</Czech>
</Key>
<Key ID="STR_ACE_Common_Disabled">
<English>Disabled</English>
<Czech>Zakázáno</Czech>
<French>Non</French>
<German>Deaktiviert</German>
<Italian>Disattivato</Italian>
<Polish>Wyłączone</Polish>
<Portuguese>Desativado</Portuguese>
<Russian>Откл.</Russian>
<Spanish>Desactivado</Spanish>
</Key>
<Key ID="STR_ACE_Common_Enabled">
<English>Enabled</English>
<Czech>Zapnuto</Czech>
<French>Oui</French>
<German>Aktiviert</German>
<Italian>Attivato</Italian>
<Polish>Włączone</Polish>
<Portuguese>Ativado</Portuguese>
<Russian>Вкл.</Russian>
<Spanish>Activado</Spanish>
</Key>
<Key ID="STR_ACE_Common_Yes">
<English>Yes</English>
<German>Ja</German>
<Spanish>Si</Spanish>
<Polish>Tak</Polish>
<Czech>Ano</Czech>
<French>Oui</French>
<Russian>Да</Russian>
<Hungarian>Igen</Hungarian>
<Portuguese>Sim</Portuguese>
<Italian>Si</Italian>
</Key>
<Key ID="STR_ACE_Common_No">
<English>No</English>
<German>Nein</German>
<Spanish>No</Spanish>
<Polish>Nie</Polish>
<Czech>Ne</Czech>
<French>Non</French>
<Russian>Нет</Russian>
<Hungarian>Nem</Hungarian>
<Portuguese>Não</Portuguese>
<Italian>No</Italian>
</Key>
<Key ID="STR_ACE_Common_VehiclesOnly">
<English>Vehicles only</English>
</Key>
<Key ID="STR_ACE_Common_DoNotForce">
<English>Do Not Force</English>
<Polish>Nie wymuszaj</Polish>
<Spanish>No forzar</Spanish>
<German>Nicht erzwingen</German>
<Czech>Nevynucovat</Czech>
<Portuguese>Não forçar</Portuguese>
</Key>
<Key ID="STR_ACE_Common_ACEKeybindCategoryEquipment">
<English>ACE3 Equipment</English>
<Polish>ACE3 Wyposażenie</Polish>
</Key>
<Key ID="STR_ACE_Common_ACEKeybindCategoryCommon">
<English>ACE3 Common</English>
<Polish>ACE3 Ogólne</Polish>
</Key>
<Key ID="STR_ACE_Common_ACEKeybindCategoryWeapons">
<English>ACE3 Weapons</English>
<Polish>ACE3 Broń</Polish>
</Key>
<Key ID="STR_ACE_Common_ACEKeybindCategoryMovement">
<English>ACE3 Movement</English>
<Polish>ACE3 Ruch</Polish>
</Key>
<Key ID="STR_ACE_Common_ACEKeybindCategoryScopeAdjustment">
<English>ACE3 Scope Adjustment</English>
<Polish>ACE3 Regulacja optyki</Polish>
</Key>
<Key ID="STR_ACE_Common_ACEKeybindCategoryVehicles">
<English>ACE3 Vehicles</English>
<Polish>ACE3 Pojazdy</Polish>
</Key>
</Package>
</Project>

View File

@ -123,7 +123,8 @@ class CfgVehicles {
displayName = "$STR_ACE_ROLLWIRE";
distance = 4;
condition = "true";
statement = QUOTE([ARR_2(_target,_player)] call FUNC(deploy));
//wait a frame to handle "Do When releasing action menu key" option:
statement = QUOTE([ARR_2({_this call FUNC(deploy)}, [ARR_2(_target,_player)])] call EFUNC(common,execNextFrame));
showDisabled = 0;
exceptions[] = {};
priority = 5;

View File

@ -37,7 +37,7 @@ deleteVehicle _wirecoil;
_unit setVariable [QGVAR(wireDeployed), false];
GVAR(deployPFH) = [{
EXPLODE_4_PVT(_this select 0,_wireNoGeo,_wireNoGeoPos,_unit,_action);
EXPLODE_3_PVT(_this select 0,_wireNoGeo,_wireNoGeoPos,_unit);
private ["_range", "_posStart", "_posEnd", "_dirVect", "_dir", "_anim", "_wire"];
_posStart = (_wireNoGeo modelToWorldVisual (_wireNoGeo selectionPosition "start")) call EFUNC(common,positionToASL);
@ -73,7 +73,7 @@ GVAR(deployPFH) = [{
{
_wireNoGeo animate [_x, _anim];
} foreach WIRE_FAST;
}, 0, [_wireNoGeo, _wireNoGeoPos, _unit, _action]] call CBA_fnc_addPerFrameHandler;
}, 0, [_wireNoGeo, _wireNoGeoPos, _unit]] call CBA_fnc_addPerFrameHandler;
[localize "STR_ACE_ROLLWIRE", "", ""] call EFUNC(interaction,showMouseHint);

View File

@ -5,7 +5,7 @@
<English>Concertina Wire</English>
<German>NATO-Draht</German>
<Russian>Проволочная спираль</Russian>
<Polish>Drut kolczasty</Polish>
<Polish>Koncentrina</Polish>
<Spanish>Alambre de espino</Spanish>
<French>Concertina wire</French>
<Czech>Ostnatý drát</Czech>
@ -17,7 +17,7 @@
<English>Concertina Wire Coil</English>
<German>NATO-Draht Rolle</German>
<Russian>Проволочная спираль (моток)</Russian>
<Polish>Zwój drutu kolczastego</Polish>
<Polish>Zwój koncentriny</Polish>
<Spanish>Bobina de alambre de espino</Spanish>
<French>Concertina wire coil</French>
<Czech>Smyčka ostnatého drátu</Czech>
@ -29,7 +29,7 @@
<English>Dismount Concertina Wire</English>
<German>NATO-Draht abbauen</German>
<Russian>Демонтировать проволочную спираль</Russian>
<Polish>Zwiń drut kolczasty</Polish>
<Polish>Zwiń koncentrinę</Polish>
<Spanish>Desmontar alambre de espino</Spanish>
<French>Dismount Concertina wire</French>
<Czech>Svinout ostnatý drát</Czech>
@ -41,7 +41,7 @@
<English>Deploy Concertina Wire</English>
<German>NATO-Draht verlegen</German>
<Russian>Монтировать проволочную спираль</Russian>
<Polish>Rozwiń drut kolczasty</Polish>
<Polish>Rozwiń koncentrinę</Polish>
<Spanish>Desplegar alambre de espino</Spanish>
<French>Deploy Concertina wire</French>
<Czech>Rozvinout ostnatý drát</Czech>
@ -50,4 +50,4 @@
<Portuguese>Colocar arame farpado</Portuguese>
</Key>
</Package>
</Project>
</Project>

View File

@ -2,7 +2,7 @@
<Project name="ACE">
<Package name="finger">
<Key ID="STR_ACE_finger_indicatorForSelf_name">
<English>Show finger indicator to self</English>
<English>Show pointing indicator to self</English>
<Russian>Отображать пальце-индикатор для показывающего игрока</Russian>
<Polish>Pokaż indykator wskazywania palcem dla siebie</Polish>
</Key>
@ -12,12 +12,12 @@
<Polish> Wyświetl indykator kiedy wskazujesz coś palcem. Ta opcja nie wpływa na to, czy inni gracze zobaczą ten indykator czy też nie.</Polish>
</Key>
<Key ID="STR_ACE_finger_indicatorColor_name">
<English>Finger indicator</English>
<English>Pointing indicator</English>
<Russian>Пальце-индикатор</Russian>
<Polish>Indykator palca</Polish>
</Key>
<Key ID="STR_ACE_finger_indicatorColor_description">
<English>Color of the finger-pointing indicator circle</English>
<English>Color of the pointing indicator circle</English>
<Russian>Цвет индикатора пальце-указания</Russian>
<Polish>Kolor okręgu wyświetlanego przy wskazywaniu palcem</Polish>
</Key>
@ -27,19 +27,19 @@
<Polish>Akcja "wskaż palcem"</Polish>
</Key>
<Key ID="STR_ACE_finger_keyComb_description">
<English>Points, and shows a virtual marker of where you are looking to nearby units. Can be held down.</English>
<English>Points, and shows a virtual marker of where you are looking to nearby units. Can be held down.</English>
<Polish>Wskazuje a także wyświetla wirtualny marker-okrąg w miejscu, w które patrzysz, dla wszystkich pobliskich jednostek. Może być przytrzymywany.</Polish>
</Key>
<Key ID="STR_ACE_finger_moduleSettings_displayName">
<English>Finger Settings</English>
<English>Pointing Settings</English>
<Polish>Ustawienia wskazywania palcem</Polish>
</Key>
<Key ID="STR_ACE_finger_enabled_displayName">
<English>Finger Pointing Enabled</English>
<English>Pointing Enabled</English>
<Polish>Aktywuj wskazywanie</Polish>
</Key>
<Key ID="STR_ACE_finger_maxRange_displayName">
<English>Finger Max Range</English>
<English>Pointing Max Range</English>
<Polish>Maks. zasięg wskazywania</Polish>
</Key>
<Key ID="STR_ACE_finger_maxRange_description">

View File

@ -20,4 +20,4 @@ _positions set[(count _positions), [(getPos _obj), _objSpd]];
_data = [_origin, typeOf _origin, typeOf _obj, _objSpd, _positions, _color];
GVAR(traces) set[_index, _data];
[DFUNC(trackTrace), 0, [_obj, _index, ACE_time]] call cba_fnc_addPerFrameHandler;
[DFUNC(trackTrace), 0, [_obj, _index, ACE_time]] call CBA_fnc_addPerFrameHandler;

View File

@ -18,5 +18,5 @@ if(_depth <= 2) then {
_testParams = [_pos, [_indirectHitRange, _indirectHit], [], [], -4, _depth, 0];
[DFUNC(findReflections), 0, _testParams] call cba_fnc_addPerFrameHandler;
[DFUNC(findReflections), 0, _testParams] call CBA_fnc_addPerFrameHandler;
};

View File

@ -121,6 +121,6 @@ if(_zIndex < 5) then {
// _dirvec = _pos vectorFromTo ((ATLtoASL (player modelToWorldVisual (player selectionPosition "Spine3"))));
// _dirvec = _dirvec vectorMultiply 100;
// _can setVelocity _dirvec;
[DFUNC(doExplosions), 0, [_explosions, 0]] call cba_fnc_addPerFrameHandler;
[DFUNC(doExplosions), 0, [_explosions, 0]] call CBA_fnc_addPerFrameHandler;
[(_this select 1)] call cba_fnc_removePerFrameHandler;
};

View File

@ -1,5 +1,5 @@
#include "script_component.hpp"
if(!GVAR(tracesStarted)) then {
GVAR(tracesStarted) = true;
GVAR(traceID) = [FUNC(drawTraces), 0, []] call cba_fnc_addPerFrameHandler;
GVAR(traceID) = [FUNC(drawTraces), 0, []] call CBA_fnc_addPerFrameHandler;
};

View File

@ -56,4 +56,4 @@ GVAR(DustHandler) = [{
GVAR(DustHandler) = -1;
};
};
},0,[]] call CALLSTACK(cba_fnc_addPerFrameHandler);
},0,[]] call CALLSTACK(CBA_fnc_addPerFrameHandler);

View File

@ -2,6 +2,8 @@ class ACE_Settings {
class GVAR(EnableCombatDeafness) {
value = 1;
typeName = "BOOL";
displayName = CSTRING(CombatDeafness_DisplayName);
description = CSTRING(CombatDeafness_Description);
};
class GVAR(EarplugsVolume) {
value = 0.5;

View File

@ -109,6 +109,27 @@ class CfgVehicles {
typeName = "BOOL";
defaultValue = 1;
};
class DisableEarRinging {
displayName = CSTRING(DisableEarRinging);
typeName = "NUMBER";
class values {
class DoNotForce {
default = 1;
name = ECSTRING(common,DoNotForce);
value = -1;
};
/* Probably don't want to allow forcing ear ringing for people who have serious problems with the effect
class NotDisabled {
name = ECSTRING(common,No);
value = 0;
};
*/
class IsDisabled {
name = ECSTRING(common,Yes);
value = 1;
};
};
};
};
class ModuleDescription {
description = CSTRING(Module_Description);

View File

@ -16,4 +16,9 @@ if !(_activated) exitWith {};
[_logic, QGVAR(enableCombatDeafness), "EnableCombatDeafness"] call EFUNC(common,readSettingFromModule);
// Do Not Force - read module setting only non-default is set due to using SCALAR
if ((_logic getVariable "DisableEarRinging") != -1) then {
[_logic, QGVAR(DisableEarRinging), "DisableEarRinging"] call EFUNC(common,readSettingFromModule);
};
diag_log text "[ACE]: Hearing Module Initialized.";

View File

@ -126,7 +126,7 @@
<Portuguese>Ativar surdez em combate?</Portuguese>
</Key>
<Key ID="STR_ACE_Hearing_CombatDeafness_Description">
<English>Enable combat deafness?</English>
<English>Reduces the hearing ability as the player takes hearing damage</English>
<Polish>Możliwość chwilowej utraty słuchu przy głośnych wystrzałach i jednoczesnym braku włożonych stoperów</Polish>
<Spanish>Habilita la sordera de combate</Spanish>
<German>Aktiviere Taubheit im Gefecht?</German>
@ -134,7 +134,7 @@
<Portuguese>Ativar surdez em combate?</Portuguese>
</Key>
<Key ID="STR_ACE_Hearing_Module_Description">
<English></English>
<English>Controls combat deafness and ear ringing. When activated, players can be deafened when a gun is fired in their vicinity or an explosion takes place without hearing protection</English>
<Polish>Głuchota bojowa pojawia się w momentach, kiedy stoimy w pobliżu broni wielkokalibrowej bez ochrony słuchu, lub np. podczas ostrzału artyleryjskiego. Moduł ten pozwala na włączenie lub wyłączenie tego efektu.</Polish>
<German>Dieses Modul aktiviert/deaktiviert die Taubheit im Gefecht. Wenn aktiviert, können Spieler ohne Gehörschutz taub werden, wenn eine Waffe in ihrer Nähe abgefeuert wird oder eine Explosion stattfindet.</German>
<Czech>Ztráta sluchu je možná ve chvíly, kdy se v bezprostřední blízkosti střílí z velkorážní zbraně nebo při bombardování a osoba je bez ochrany sluchu (např. špunty). Tento modul umožňuje tuto věc povolit nebo zakázat.</Czech>

View File

@ -3,12 +3,14 @@ class ACE_Settings {
value = 0;
typeName = "BOOL";
isClientSettable = 1;
category = LSTRING(Category_InteractionMenu);
displayName = CSTRING(AlwaysUseCursorSelfInteraction);
};
class GVAR(cursorKeepCentered) {
value = 0;
typeName = "BOOL";
isClientSettable = 1;
category = LSTRING(Category_InteractionMenu);
displayName = CSTRING(cursorKeepCentered);
description = CSTRING(cursorKeepCenteredDescription);
};
@ -16,42 +18,49 @@ class ACE_Settings {
value = 0;
typeName = "BOOL";
isClientSettable = 1;
category = LSTRING(Category_InteractionMenu);
displayName = CSTRING(AlwaysUseCursorInteraction);
};
class GVAR(UseListMenu) {
value = 0;
typeName = "BOOL";
isClientSettable = 1;
category = LSTRING(Category_InteractionMenu);
displayName = CSTRING(UseListMenu);
};
class GVAR(colorTextMax) {
value[] = {1, 1, 1, 1};
typeName = "COLOR";
isClientSettable = 1;
category = LSTRING(Category_InteractionMenu);
displayName = CSTRING(ColorTextMax);
};
class GVAR(colorTextMin) {
value[] = {1, 1, 1, 0.25};
typeName = "COLOR";
isClientSettable = 1;
category = LSTRING(Category_InteractionMenu);
displayName = CSTRING(ColorTextMin);
};
class GVAR(colorShadowMax) {
value[] = {0, 0, 0, 1};
typeName = "COLOR";
isClientSettable = 1;
category = LSTRING(Category_InteractionMenu);
displayName = CSTRING(ColorShadowMax);
};
class GVAR(colorShadowMin) {
value[] = {0, 0, 0, 0.25};
typeName = "COLOR";
isClientSettable = 1;
category = LSTRING(Category_InteractionMenu);
displayName = CSTRING(ColorShadowMin);
};
class GVAR(textSize) {
value = 2;
typeName = "SCALAR";
isClientSettable = 1;
category = LSTRING(Category_InteractionMenu);
displayName = CSTRING(textSize);
values[] = {"$str_very_small", "$str_small", "$str_medium", "$str_large", "$str_very_large"};
};
@ -59,6 +68,7 @@ class ACE_Settings {
value = 2;
typeName = "SCALAR";
isClientSettable = 1;
category = LSTRING(Category_InteractionMenu);
displayName = CSTRING(shadowSetting);
description = CSTRING(shadowSettingDescription);
values[] = {"$STR_A3_OPTIONS_DISABLED", "$STR_A3_OPTIONS_ENABLED", CSTRING(shadowOutline)};
@ -67,12 +77,14 @@ class ACE_Settings {
value = 1;
typeName = "BOOL";
isClientSettable = 1;
category = LSTRING(Category_InteractionMenu);
displayName = CSTRING(ActionOnKeyRelease);
};
class GVAR(menuBackground) {
value = 0;
typeName = "SCALAR";
isClientSettable = 1;
category = LSTRING(Category_InteractionMenu);
displayName = CSTRING(background);
values[] = {"$STR_A3_OPTIONS_DISABLED", CSTRING(backgroundBlur), CSTRING(backgroundBlack)};
};
@ -80,6 +92,7 @@ class ACE_Settings {
value = 0;
typeName = "BOOL";
isClientSettable = 1;
category = LSTRING(Category_InteractionMenu);
displayName = CSTRING(addBuildingActions);
description = CSTRING(addBuildingActionsDescription);
};

View File

@ -19,7 +19,7 @@
*/
#include "script_component.hpp"
EXPLODE_4_PVT(_this,_objectType,_typeNum,_parentPath,_action);
params ["_objectType", "_typeNum", "_parentPath", "_action"];
// Ensure the config menu was compiled first
if (_typeNum == 0) then {

View File

@ -19,7 +19,7 @@
*/
#include "script_component.hpp"
EXPLODE_4_PVT(_this,_object,_typeNum,_parentPath,_action);
params ["_object", "_typeNum", "_parentPath", "_action"];
private ["_varName","_actionList"];
_varName = [QGVAR(actions),QGVAR(selfActions)] select _typeNum;

View File

@ -14,8 +14,8 @@
*/
#include "script_component.hpp"
EXPLODE_3_PVT(_this,_object,_origAction,_parentPath);
EXPLODE_2_PVT(_origAction,_origActionData,_origActionChildren);
params ["_object", "_origAction", "_parentPath"];
_origAction params ["_origActionData", "_origActionChildren"];
private ["_target","_player","_fullPath","_activeChildren","_dynamicChildren","_action","_actionData","_x"];

View File

@ -12,7 +12,7 @@
*/
#include "script_component.hpp";
EXPLODE_1_PVT(_this,_target);
params ["_target"];
private ["_objectType","_actionsVarName","_isMan"];
_objectType = _target;
@ -29,7 +29,7 @@ if !(isNil {missionNamespace getVariable [_actionsVarName, nil]}) exitWith {};
private "_recurseFnc";
_recurseFnc = {
private ["_actions", "_displayName", "_distance", "_icon", "_statement", "_position", "_condition", "_showDisabled", "_enableInside", "_canCollapse", "_runOnHover", "_children", "_entry", "_entryCfg", "_insertChildren", "_modifierFunction"];
EXPLODE_1_PVT(_this,_actionsCfg);
params ["_actionsCfg"];
_actions = [];
{

View File

@ -12,7 +12,7 @@
*/
#include "script_component.hpp";
EXPLODE_1_PVT(_this,_target);
params ["_target"];
private ["_objectType","_actionsVarName","_isMan"];
_objectType = _target;
@ -30,7 +30,7 @@ private "_recurseFnc";
_recurseFnc = {
private ["_actions", "_displayName", "_icon", "_statement", "_condition", "_showDisabled",
"_enableInside", "_canCollapse", "_runOnHover", "_children", "_entry", "_entryCfg", "_insertChildren", "_modifierFunction"];
EXPLODE_1_PVT(_this,_actionsCfg);
params ["_actionsCfg"];
_actions = [];
{

View File

@ -19,7 +19,7 @@ private "_recurseFnc";
_recurseFnc = {
private ["_actions", "_displayName", "_icon", "_statement", "_condition", "_showDisabled",
"_enableInside", "_canCollapse", "_runOnHover", "_children", "_entry", "_entryCfg", "_insertChildren", "_modifierFunction"];
EXPLODE_1_PVT(_this,_actionsCfg);
params ["_actionsCfg"];
_actions = [];
{

View File

@ -26,56 +26,31 @@
*/
#include "script_component.hpp"
EXPLODE_5_PVT(_this,_actionName,_displayName,_icon,_statement,_condition);
params [
"_actionName",
"_displayName",
"_icon",
"_statement",
"_condition",
["_insertChildren", {}],
["_customParams", []],
["_position", {[0, 0, 0]}],
["_distance", 2],
["_params", [false, false, false, false, false]],
["_modifierFunction", {}]
];
// IGNORE_PRIVATE_WARNING(_target);
private ["_insertChildren","_customParams","_position","_distance","_params", "_modifierFunction"];
_insertChildren = if (count _this > 5) then {
_this select 5
} else {
{}
};
_customParams = if (count _this > 6) then {
_this select 6
} else {
[]
};
_position = if (count _this > 7) then {
if (typeName (_this select 7) == "STRING") then {
_position = if (typeName (_position) == "STRING") then {
// If the action is set to a selection, create the suitable code
compile format ["_target selectionPosition '%1'", _this select 7];
compile format ["_target selectionPosition '%1'", _position];
} else {
if (typeName (_this select 7) == "ARRAY") then {
if (typeName (_position) == "ARRAY") then {
// If the action is set to a array position, create the suitable code
compile format ["%1", _this select 7];
compile format ["%1", _position];
} else {
_this select 7
_position;
};
}
} else {
{[0,0,0]}
};
_distance = if (count _this > 8) then {
_this select 8
} else {
2
};
_params = if (count _this > 9) then {
_this select 9
} else {
[false,false,false,false,false]
};
_modifierFunction = if (count _this > 10) then {
_this select 10
} else {
{}
};
};
[
_actionName,

View File

@ -1,11 +1,7 @@
// by commy2
#include "script_component.hpp"
private ["_ctrl", "_index", "_text"];
_ctrl = _this select 0;
_index = _this select 1;
_text = _this select 2;
params ["_ctrl", "_index", "_text"];
//systemChat str (_text != ARR_SELECT(GVAR(ParsedTextCached),_index,"-1"));

View File

@ -17,7 +17,7 @@
*/
#include "script_component.hpp"
EXPLODE_2_PVT(_this,_actionTreeList,_parentPath);
params ["_actionTreeList", "_parentPath"];
private ["_parentNode", "_foundParentNode", "_fnc_findFolder", "_actionTree"];
@ -31,10 +31,10 @@ _parentNode = [[],_actionTreeList];
_foundParentNode = false;
_fnc_findFolder = {
EXPLODE_3_PVT(_this,_parentPath,_level,_actionNode);
params ["_parentPath", "_level", "_actionNode"];
{
EXPLODE_2_PVT(_x,_actionData,_actionChildren);
_x params ["_actionData", "_actionChildren"];
if ((_actionData select 0) isEqualTo (_parentPath select _level)) exitWith {
if (count _parentPath == _level + 1) exitWith {

View File

@ -11,7 +11,7 @@
*/
#include "script_component.hpp"
EXPLODE_2_PVT(_this,_newUnit,_oldUnit);
params ["_newUnit", "_oldUnit"];
// add to new unit
private "_ehid";

View File

@ -13,7 +13,7 @@
*/
#include "script_component.hpp"
EXPLODE_2_PVT(_this,_longPath,_shortPath);
params ["_longPath", "_shortPath"];
private ["_isSubPath","_i"];
_isSubPath = true;

View File

@ -12,7 +12,7 @@
*/
#include "script_component.hpp"
EXPLODE_1_PVT(_this,_menuType);
params ["_menuType"];
if (GVAR(openedMenuType) == _menuType) exitWith {true};

View File

@ -12,8 +12,7 @@
*/
#include "script_component.hpp"
private "_calledByClicking";
_calledByClicking = _this select 1;
params ["_menuType", "_calledByClicking"];
// Exit if there's no menu opened
if (GVAR(openedMenuType) < 0) exitWith {true};

View File

@ -17,11 +17,11 @@
*/
#include "script_component.hpp"
EXPLODE_3_PVT(_this,_objectType,_typeNum,_fullPath);
params ["_objectType", "_typeNum", "_fullPath"];
private ["_res","_varName","_actionTrees", "_parentNode", "_found"];
_res = _fullPath call FUNC(splitPath);
EXPLODE_2_PVT(_res,_parentPath,_actionName);
_res params ["_parentPath", "_actionName"];
_varName = format [[QGVAR(Act_%1), QGVAR(SelfAct_%1)] select _typeNum, _objectType];
_actionTrees = missionNamespace getVariable [_varName, []];

View File

@ -17,11 +17,11 @@
*/
#include "script_component.hpp"
EXPLODE_3_PVT(_this,_object,_typeNum,_fullPath);
params ["_object", "_typeNum", "_fullPath"];
private ["_res","_varName","_actionList"];
_res = _fullPath call FUNC(splitPath);
EXPLODE_2_PVT(_res,_parentPath,_actionName);
_res params ["_parentPath", "_actionName"];
_varName = [QGVAR(actions),QGVAR(selfActions)] select _typeNum;
_actionList = _object getVariable [_varName, []];

View File

@ -78,7 +78,7 @@ _fnc_renderNearbyActions = {
_fnc_renderLastFrameActions = {
{
EXPLODE_3_PVT(_x,_target,_action,_objectActionList);
_x params ["_target", "_action", "_objectActionList"];
GVAR(objectActionList) = _objectActionList;
[_target, _action] call FUNC(renderBaseMenu);
@ -176,6 +176,6 @@ if (count GVAR(collectedActionPoints) > 1) then {
// Render the non-ocluded points
{
EXPLODE_3_PVT(_x,_z,_sPos,_activeActionTree);
_x params ["_z", "_sPos", "_activeActionTree"];
[[], _activeActionTree, _sPos, [180,360]] call FUNC(renderMenu);
} forEach GVAR(collectedActionPoints);

View File

@ -18,8 +18,8 @@ BEGIN_COUNTER(fnc_renderBaseMenu)
private ["_distance","_pos","_weaponDir","_ref","_sPos","_activeActionTree", "_line"];
EXPLODE_2_PVT(_this,_object,_baseActionNode);
EXPLODE_1_PVT(_baseActionNode,_actionData);
params ["_object", "_baseActionNode"];
_baseActionNode params ["_actionData"];
_distance = _actionData select 8;

View File

@ -16,7 +16,8 @@
#include "script_component.hpp"
#define DEFAULT_ICON QUOTE(\z\ace\addons\interaction\ui\dot_ca.paa)
private ["_ctrl", "_pos", "_displayNum"];
PARAMS_4(_text,_icon,_sPos,_textSettings);
params ["_text", "_icon", "_sPos", "_textSettings"];
//systemChat format ["Icon %1 - %2,%3", _text, _sPos select 0, _sPos select 1];

View File

@ -17,9 +17,9 @@
private ["_menuInSelectedPath", "_path", "_menuDepth", "_x", "_offset", "_newPos", "_forEachIndex", "_player", "_pos", "_target", "_textSettings"];
EXPLODE_4_PVT(_this,_parentPath,_action,_sPos,_angles);
EXPLODE_3_PVT(_action,_actionData,_activeChildren,_actionObject);
EXPLODE_2_PVT(_angles,_centerAngle,_maxAngleSpan);
params ["_parentPath", "_action", "_sPos", "_angles"];
_action params ["_actionData", "_activeChildren", "_actionObject"];
_angles params ["_centerAngle", "_maxAngleSpan"];
_menuDepth = (count GVAR(menuDepthPath));

View File

@ -13,7 +13,7 @@
*/
#include "script_component.hpp"
EXPLODE_2_PVT(_this,_sPos,_icon);
params ["_sPos", "_icon"];
private ["_displayNum", "_ctrl", "_pos"];

View File

@ -16,7 +16,7 @@ private ["_menuDepth", "_mixColor", "_pathCount", "_row", "_shadowColor", "_text
//Mixes 2 colors (number arrays) and makes a color string "#AARRGGBB" for structured text
_mixColor = {
PARAMS_3(_color1,_color2,_ratio);
params ["_color1", "_color2", "_ratio"];
private ["_return", "_mix", "_index"];
_return = "";
for "_index" from 0 to 3 do {

View File

@ -16,7 +16,7 @@
*/
#include "script_component.hpp"
PARAMS_1(_interactionType);
params ["_interactionType"];
//Ignore if not enabled:
if (!GVAR(addBuildingActions)) exitWith {};
@ -27,8 +27,8 @@ if ((vehicle ACE_player) != ACE_player) exitWith {};
[{
private ["_nearBuidlings", "_typeOfHouse", "_houseBeingScaned", "_actionSet", "_memPoints", "_memPointsActions", "_helperPos", "_helperObject"];
PARAMS_2(_args,_pfID);
EXPLODE_4_PVT(_args,_setPosition,_addedHelpers,_housesScaned,_housesToScanForActions);
params ["_args", "_pfID"];
_args params ["_setPosition", "_addedHelpers", "_housesScaned", "_housesToScanForActions"];
if (!EGVAR(interact_menu,keyDown)) then {
{deleteVehicle _x;} forEach _addedHelpers;
@ -75,7 +75,7 @@ if ((vehicle ACE_player) != ACE_player) exitWith {};
_housesScaned pushBack _houseBeingScaned;
_actionSet = [_typeOfHouse] call FUNC(userActions_getHouseActions);
EXPLODE_2_PVT(_actionSet,_memPoints,_memPointsActions);
_actionSet params ["_memPoints", "_memPointsActions"];
// systemChat format ["Add Actions for [%1] (count %2) @ %3", _typeOfHouse, (count _memPoints), diag_tickTime];
{

View File

@ -12,7 +12,7 @@
*/
#include "script_component.hpp"
PARAMS_1(_typeOfBuilding);
params ["_typeOfBuilding"];
private["_action", "_actionDisplayName", "_actionDisplayNameDefault", "_actionMaxDistance", "_actionOffset", "_actionPath", "_actionPosition", "_building", "_configPath", "_endIndex", "_iconImage", "_index", "_ladders", "_memPointIndex", "_memPoints", "_memPointsActions", "_startIndex"];
@ -24,7 +24,7 @@ _memPointsActions = [];
//Get the offset for a memory point:
_fnc_getMemPointOffset = {
PARAMS_1(_memoryPoint);
params ["_memoryPoint"];
_memPointIndex = _memPoints find _memoryPoint;
_actionOffset = [0,0,0];
if (_memPointIndex == -1) then {
@ -38,14 +38,14 @@ _fnc_getMemPointOffset = {
// Add UserActions for the building:
_fnc_userAction_Statement = {
PARAMS_3(_target,_player,_variable);
EXPLODE_2_PVT(_variable,_actionStatement,_actionCondition);
params ["_target", "_player", "_variable"];
_variable params ["_actionStatement", "_actionCondition"];
this = _target getVariable [QGVAR(building), objNull];
call _actionStatement;
};
_fnc_userAction_Condition = {
PARAMS_3(_target,_player,_variable);
EXPLODE_2_PVT(_variable,_actionStatement,_actionCondition);
params ["_target", "_player", "_variable"];
_variable params ["_actionStatement", "_actionCondition"];
this = _target getVariable [QGVAR(building), objNull];
if (isNull this) exitWith {false};
call _actionCondition;
@ -84,29 +84,29 @@ for "_index" from 0 to ((count _configPath) - 1) do {
// Add Ladder Actions for the building:
_fnc_ladder_ladderUp = {
PARAMS_3(_target,_player,_variable);
EXPLODE_1_PVT(_variable,_ladderIndex);
params ["_target", "_player", "_variable"];
_variable params ["_ladderIndex"];
_building = _target getVariable [QGVAR(building), objNull];
TRACE_3("Ladder Action - UP",_player,_building,_ladderIndex);
_player action ["LadderUp", _building, _ladderIndex, 0];
};
_fnc_ladder_ladderDown = {
PARAMS_3(_target,_player,_variable);
EXPLODE_1_PVT(_variable,_ladderIndex);
params ["_target", "_player", "_variable"];
_variable params ["_ladderIndex"];
_building = _target getVariable [QGVAR(building), objNull];
TRACE_3("Ladder Action - Down",_player,_building,_ladderIndex);
_player action ["LadderDown", _building, _ladderIndex, 1];
};
_fnc_ladder_conditional = {
PARAMS_2(_target,_player);
params ["_target", "_player"];
//(Check distance < 2) and (Don't show actions if on a ladder)
((_target distance _player) < 2) && {((getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState _player) >> "onLadder")) == 0)}
};
_ladders = getArray (configFile >> "CfgVehicles" >> _typeOfBuilding >> "ladders");
{
EXPLODE_2_PVT(_x,_ladderBottomMemPoint,_ladderTopMemPoint);
_x params ["_ladderBottomMemPoint", "_ladderTopMemPoint"];
_actionMaxDistance = 3; //interact_menu will check head -> target's offset; leave this high and do a precice distance check in condition

View File

@ -267,5 +267,9 @@
<Czech>Přidá možnost interakce pro otevření dvěří a umistňovat žebříky na budovy. (Poznámka: Použití této možnosti snižuje výkon při otevírání pomocí interakčního menu, zejména ve velkých městech.) </Czech>
<Spanish>Añade las acciones de interacción para la apertura de puertas y montaje de escaleras en los edificios. (Nota: Hay un coste de rendimiento al abrir el menú de interacción, especialmente en las ciudades)</Spanish>
</Key>
<Key ID="STR_ACE_Interact_Menu_Category_InteractionMenu">
<English>Interaction Menu</English>
<Polish>Menu interakcji</Polish>
</Key>
</Package>
</Project>
</Project>

View File

@ -91,7 +91,7 @@ class CfgVehicles {
class ACE_JoinGroup {
displayName = CSTRING(JoinGroup);
condition = QUOTE([ARR_2(_player,_target)] call DFUNC(canJoinGroup));
condition = QUOTE(GVAR(EnableTeamManagement) && {[ARR_2(_player,_target)] call DFUNC(canJoinGroup)});
statement = QUOTE([_player] joinSilent group _target);
showDisabled = 0;
priority = 2.6;
@ -351,7 +351,7 @@ class CfgVehicles {
hotkey = "7";
};
class ACE_Gesture_Yes {
displayName = CSTRING(Gestures_Yes);
displayName = ECSTRING(common,Yes);
condition = QUOTE(canStand _target);
statement = QUOTE(_target playActionNow ([ARR_2('gestureYes','gestureNod')] select floor random 2););
showDisabled = 1;
@ -359,7 +359,7 @@ class CfgVehicles {
hotkey = "8";
};
class ACE_Gesture_No {
displayName = CSTRING(Gestures_No);
displayName = ECSTRING(common,No);
condition = QUOTE(canStand _target);
statement = QUOTE(_target playActionNow 'gestureNo';);
showDisabled = 1;

View File

@ -385,30 +385,6 @@
<Portuguese>Olá</Portuguese>
<Italian>Ciao</Italian>
</Key>
<Key ID="STR_ACE_Interaction_Gestures_Yes">
<English>Yes</English>
<German>Ja</German>
<Spanish>Si</Spanish>
<Polish>Tak</Polish>
<Czech>Ano</Czech>
<French>Oui</French>
<Russian>Да</Russian>
<Hungarian>Igen</Hungarian>
<Portuguese>Sim</Portuguese>
<Italian>Si</Italian>
</Key>
<Key ID="STR_ACE_Interaction_Gestures_No">
<English>No</English>
<German>Nein</German>
<Spanish>No</Spanish>
<Polish>Nie</Polish>
<Czech>Ne</Czech>
<French>Non</French>
<Russian>Нет</Russian>
<Hungarian>Nem</Hungarian>
<Portuguese>Não</Portuguese>
<Italian>No</Italian>
</Key>
<Key ID="STR_ACE_Interaction_WeaponOnBack">
<English>Put weapon on back</English>
<German>Waffe wegstecken</German>

View File

@ -39,7 +39,7 @@ class CfgVehicles {
author = "Ruthberg";
scope = 2;
scopeCurator = 2;
displayName = "Kestrel 4500";
displayName = CSTRING(Name);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_Kestrel4500,1);

View File

@ -26,7 +26,7 @@ if(!isDedicated) then {
_uuid = [(vehicle ACE_player), ACE_player, QFUNC(vanillaLaserSeekerHandler), ACE_DEFAULT_LASER_WAVELENGTH, ACE_DEFAULT_LASER_CODE, ACE_DEFAULT_LASER_BEAMSPREAD] call FUNC(laserOn);
_laserTarget setVariable [QGVAR(uuid), _uuid, false];
[FUNC(laserTargetPFH), 0, [_laserTarget, ACE_player, _uuid]] call cba_fnc_addPerFrameHandler;
[FUNC(laserTargetPFH), 0, [_laserTarget, ACE_player, _uuid]] call CBA_fnc_addPerFrameHandler;
} else {
// server side ownership of laser
_laserTarget setVariable [QGVAR(owner), nil, true];

View File

@ -12,13 +12,13 @@
* Return value:
* Array, [Strongest compatible laser spot ASL pos, owner object] Nil array values if nothing found.
*/
#include "script_component.hpp"
private ["_pos", "_seekerWavelengths", "_seekerCode", "_spots", "_buckets", "_excludes", "_bucketIndex", "_finalPos", "_owner", "_obj", "_x", "_method"];
private ["_emitterWavelength", "_laserCode", "_divergence", "_laser", "_laserPos", "_laserDir", "_res", "_bucketPos", "_bucketList", "_c", "_forEachIndex", "_index"];
private ["_pos", "_seekerWavelengths", "_seekerCode", "_spots", "_buckets", "_excludes", "_bucketIndex", "_finalPos", "_owner", "_obj", "_x", "_method"];
private ["_emitterWavelength", "_laserCode", "_divergence", "_laser", "_res", "_bucketPos", "_bucketList", "_c", "_forEachIndex", "_index"];
private ["_testPos", "_finalBuckets", "_largest", "_largestIndex", "_finalBucket", "_owners", "_avgX", "_avgY", "_avgZ", "_count", "_maxOwner", "_maxOwnerIndex", "_finalOwner"];
private["_dir", "_seekerCos", "_seekerFov", "_testDotProduct", "_testPoint", "_testPointVector"];
private["_dir", "_seekerCos", "_seekerFov", "_testDotProduct", "_testPoint", "_testPointVector"];
_pos = _this select 0;
_dir = vectorNormalized (_this select 1);
@ -62,17 +62,19 @@ _finalOwner = nil;
};
};
};
_laserPos = _laser select 0;
_laserDir = _laser select 1;
_res = [_laserPos, _laserDir, _divergence] call FUNC(shootCone);
{
_testPoint = _x select 0;
_testPointVector = vectorNormalized (_testPoint vectorDiff _pos);
_testDotProduct = _dir vectorDotProduct _testPointVector;
if(_testDotProduct > _seekerCos) then {
_spots pushBack [_testPoint, _owner];
};
} forEach (_res select 2);
//Handle Weird Data Return
if (_laser params [["_laserPos", [], [[]], 3], ["_laserDir", [], [[]], 3]]) then {
_res = [_laserPos, _laserDir, _divergence] call FUNC(shootCone);
{
_testPoint = _x select 0;
_testPointVector = vectorNormalized (_testPoint vectorDiff _pos);
_testDotProduct = _dir vectorDotProduct _testPointVector;
if(_testDotProduct > _seekerCos) then {
_spots pushBack [_testPoint, _owner];
};
} forEach (_res select 2);
};
};
} forEach (GVAR(laserEmitters) select 1);
@ -119,10 +121,10 @@ if((count _spots) > 0) then {
_largestIndex = _index;
};
} forEach _buckets;
_finalBucket = _finalBuckets select _largestIndex;
_owners = HASH_CREATE;
if(count _finalBucket > 0) then {
_avgX = 0;
_avgY = 0;

View File

@ -83,7 +83,7 @@ if(!GVAR(active)) then {
// @TODO: Nou gets to field all tickets about missing lasers.
//_localLaserTarget = "LaserTargetW" createVehicleLocal (getpos ACE_player);
GVAR(selfDesignateHandle) = [FUNC(laserHudDesignatePFH), 0.1, [ACE_player, _laserUuid, nil]] call cba_fnc_addPerFrameHandler;
GVAR(selfDesignateHandle) = [FUNC(laserHudDesignatePFH), 0.1, [ACE_player, _laserUuid, nil]] call CBA_fnc_addPerFrameHandler;
} else {
[] call FUNC(laserHudDesignateOff);
[] call FUNC(laserHudDesignateOn);

View File

@ -5,7 +5,7 @@
#define MAJOR 3
#define MINOR 2
#define PATCHLVL 0
#define PATCHLVL 2
#define BUILD 0
#define VERSION MAJOR.MINOR.PATCHLVL.BUILD

View File

@ -39,14 +39,13 @@ class CfgVehicles {
};
};
class Module_F;
class ACE_ModuleBlueForceTracking: Module_F {
class ACE_ModuleBlueForceTracking: ACE_Module {
author = ECSTRING(common,ACETeam);
category = "ACE";
displayName = CSTRING(BFT_Module_DisplayName);
function = QFUNC(blueForceTrackingModule);
scope = 2;
isGlobal = 1;
isGlobal = 0;
icon = PATHTOF(UI\Icon_Module_BFTracking_ca.paa);
class Arguments {
class Enabled {

View File

@ -47,6 +47,7 @@ call FUNC(determineZoom);
["SettingsInitialized", {
// Start Blue Force Tracking if Enabled
if (GVAR(BFT_Enabled)) then {
diag_log text "[ACE] Blue Force Tracking Enabled (client)";
GVAR(BFT_markers) = [];
[FUNC(blueForceTrackingUpdate), GVAR(BFT_Interval), []] call CBA_fnc_addPerFrameHandler;
};

View File

@ -12,15 +12,12 @@
#include "script_component.hpp"
if !(hasInterface) exitWith {};
if (!isServer) exitWith {};
PARAMS_3(_logic,_units,_activated);
if !(_activated) exitWith {};
PARAMS_1(_logic);
[_logic, QGVAR(BFT_Enabled), "Enabled"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(BFT_Interval), "Interval"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(BFT_HideAiGroups), "HideAiGroups"] call EFUNC(common,readSettingFromModule);
diag_log text "[ACE]: Blue Force Tracking Module initialized.";
TRACE_2("[ACE]: Blue Force Tracking Module initialized.", GVAR(BFT_Interval), GVAR(BFT_HideAiGroups));
diag_log text "[ACE]: Blue Force Tracking Module initialized. (server)";

Some files were not shown because too many files have changed in this diff Show More