Merge branch 'master' into hearingRingingModule

Conflicts:
	addons/common/stringtable.xml
This commit is contained in:
Glowbal
2015-08-08 17:42:18 +02:00
181 changed files with 1637 additions and 1229 deletions

View File

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

View File

@ -4,10 +4,10 @@
</p> </p>
<p align="center"> <p align="center">
<a href="https://github.com/acemod/ACE3/releases"> <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"> alt="ACE version">
</a> </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" <img src="http://img.shields.io/badge/Download-56.5_MB-green.svg"
alt="ACE download"> alt="ACE download">
</a> </a>

View File

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

View File

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

View File

@ -57,6 +57,6 @@ GVAR(DialogPFH) = [{
[_this select 1] call cba_fnc_removePerFrameHandler; [_this select 1] call cba_fnc_removePerFrameHandler;
}; };
__ctrlBackground ctrlSetText format [QUOTE(PATHTOF(UI\ATRAG_%1.paa)), ["N", "D"] select (call EFUNC(common,ambientBrightness))]; __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 true

View File

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

View File

@ -17,14 +17,14 @@
*/ */
#include "script_component.hpp" #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); _attachLimit = [6, 1] select (_player == _attachToVehicle);
_attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []]; _attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []];
_playerPos = (ACE_player modelToWorldVisual (ACE_player selectionPosition "pilot")); _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" #include "script_component.hpp"
PARAMS_2(_attachToVehicle,_unit);
private ["_attachedObjects", "_inRange"]; private ["_attachedObjects", "_inRange"];
params ["_attachToVehicle", "_unit"];
TRACE_2("params",_attachToVehicle,_unit);
_attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []]; _attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []];

View File

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

View File

@ -18,7 +18,8 @@
#include "script_component.hpp" #include "script_component.hpp"
private ["_listed", "_actions", "_item", "_displayName", "_picture", "_action"]; private ["_listed", "_actions", "_item", "_displayName", "_picture", "_action"];
PARAMS_2(_target,_player); params ["_target","_player"];
TRACE_2("params",_target,_player);
_listed = []; _listed = [];
_actions = []; _actions = [];

View File

@ -27,7 +27,8 @@
private ["_startingOffset", "_startDistanceFromCenter", "_closeInUnitVector", "_closeInMax", "_closeInMin", "_closeInDistance", "_endPosTestOffset", "_endPosTest", "_doesIntersect", "_startingPosShifted", "_startASL", "_endPosShifted", "_endASL", "_attachedObject", "_currentObjects", "_currentItemNames"]; 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; _startingOffset = _attachToVehicle worldToModel _startingPosition;

View File

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

View File

@ -16,8 +16,7 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
PARAMS_2(_unit,_target); params ["_unit", "_target"];
//Check sides, Player has cableTie, target is alive and not already handcuffed //Check sides, Player has cableTie, target is alive and not already handcuffed
(GVAR(allowHandcuffOwnSide) || {(side _unit) != (side _target)}) && (GVAR(allowHandcuffOwnSide) || {(side _unit) != (side _target)}) &&

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -16,10 +16,10 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
PARAMS_2(_unit,_newSurrenderState);
private "_returnValue"; private "_returnValue";
params ["_unit", "_newSurrenderState"];
_returnValue = if (_newSurrenderState) then { _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])} GVAR(allowSurrender) && {(currentWeapon _unit) == ""} && {!(_unit getVariable [QGVAR(isSurrendering), false])}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -15,7 +15,7 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
PARAMS_1(_unit); params ["_unit"];
// prevent players from throwing grenades (added to all units) // 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); [_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" #include "script_component.hpp"
PARAMS_2(_unit,_zeusIsOpen); params ["_unit","_zeusIsOpen"];
//set showHUD based on unit status: //set showHUD based on unit status:
if (!_zeusIsOpen) then { if (!_zeusIsOpen) then {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -37,6 +37,13 @@
}; };
}] call FUNC(addEventhandler); }] 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~~~~~ //~~~~~Get Map Data~~~~~
//Find MGRS zone and 100km grid for current map //Find MGRS zone and 100km grid for current map
[] call FUNC(getMGRSdata); [] call FUNC(getMGRSdata);
@ -111,8 +118,9 @@ if(!isServer) then {
}; };
["SEH", FUNC(_handleSyncedEvent)] call FUNC(addEventHandler); ["SEH", FUNC(_handleSyncedEvent)] call FUNC(addEventHandler);
["SEH_s", FUNC(_handleRequestSyncedEvent)] 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); call FUNC(checkFiles);
@ -149,7 +157,7 @@ call FUNC(checkFiles);
//Event that settings are safe to use: //Event that settings are safe to use:
["SettingsInitialized", []] call FUNC(localEvent); ["SettingsInitialized", []] call FUNC(localEvent);
}, 0, [false]] call cba_fnc_addPerFrameHandler; }, 0, [false]] call CBA_fnc_addPerFrameHandler;
["SettingsInitialized", { ["SettingsInitialized", {
@ -273,7 +281,7 @@ GVAR(OldPlayerWeapon) = currentWeapon ACE_player;
["playerWeaponChanged", [ACE_player, _newPlayerWeapon]] call FUNC(localEvent); ["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. // 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); ["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); [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); ["PlayerJip", [player] ] call FUNC(localEvent);
[(_this select 1)] call cba_fnc_removePerFrameHandler; [(_this select 1)] call cba_fnc_removePerFrameHandler;
}; };
}, 0, []] call cba_fnc_addPerFrameHandler; }, 0, []] call CBA_fnc_addPerFrameHandler;
}; };
//Device Handler: //Device Handler:
GVAR(deviceKeyHandlingArray) = []; GVAR(deviceKeyHandlingArray) = [];
GVAR(deviceKeyCurrentIndex) = -1; 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"), ["ACE3 Equipment", QGVAR(openDevice), (localize "STR_ACE_Common_toggleHandheldDevice"),
{ {
[] call FUNC(deviceKeyFindValidIndex); [] call FUNC(deviceKeyFindValidIndex);

View File

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

View File

@ -7,9 +7,10 @@ diag_log text format["REGISTERED ACE PFH HANDLERS"];
diag_log text format["-------------------------------------------"]; diag_log text format["-------------------------------------------"];
if (!isNil "ACE_PFH_COUNTER") then { if (!isNil "ACE_PFH_COUNTER") then {
{ {
private["_pfh"]; private ["_isActive"];
_pfh = _x select 0; _x params ["_pfh", "_parameters"];
diag_log text format["Registered PFH: id=%1, %1:%2", (_pfh select 0), (_pfh select 1), (_pfh select 2) ]; _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; } forEach ACE_PFH_COUNTER;
}; };

View File

@ -10,21 +10,33 @@
#include "script_component.hpp" #include "script_component.hpp"
private ["_pos","_dir","_anim"]; 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

@ -36,7 +36,7 @@ if (isNil QGVAR(publishSchedId)) then {
GVAR(publishVarNames) = []; GVAR(publishVarNames) = [];
GVAR(publishNextTime) = 1e7; GVAR(publishNextTime) = 1e7;
}; };
}, 0, []] call cba_fnc_addPerFrameHandler; }, 0, []] call CBA_fnc_addPerFrameHandler;
}; };
// If the variable is not on the list // 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 = (getPosASL _vehicle) call EFUNC(common,ASLtoPosition);
_emptyPos = [(_emptyPos select 0) + random(5), (_emptyPos select 1) + random(5), _emptyPos select 2 ]; _emptyPos = [(_emptyPos select 0) + random(5), (_emptyPos select 1) + random(5), _emptyPos select 2 ];
} else { } 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); TRACE_1("Vehicle Ground Check", isTouchingGround _vehicle);
_emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 13, typeof _unit]); _emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 13, typeof _unit]);
}; };
}; };
TRACE_1("getPosASL Vehicle Check", getPosASL _vehicle); 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; diag_log str _emptyPos;

View File

@ -652,5 +652,29 @@
<Czech>Nevynucovat</Czech> <Czech>Nevynucovat</Czech>
<Portuguese>Não forçar</Portuguese> <Portuguese>Não forçar</Portuguese>
</Key> </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> </Package>
</Project> </Project>

View File

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

View File

@ -2,7 +2,7 @@
<Project name="ACE"> <Project name="ACE">
<Package name="finger"> <Package name="finger">
<Key ID="STR_ACE_finger_indicatorForSelf_name"> <Key ID="STR_ACE_finger_indicatorForSelf_name">
<English>Show finger indicator to self</English> <English>Show pointing indicator to self</English>
<Russian>Отображать пальце-индикатор для показывающего игрока</Russian> <Russian>Отображать пальце-индикатор для показывающего игрока</Russian>
<Polish>Pokaż indykator wskazywania palcem dla siebie</Polish> <Polish>Pokaż indykator wskazywania palcem dla siebie</Polish>
</Key> </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> <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>
<Key ID="STR_ACE_finger_indicatorColor_name"> <Key ID="STR_ACE_finger_indicatorColor_name">
<English>Finger indicator</English> <English>Pointing indicator</English>
<Russian>Пальце-индикатор</Russian> <Russian>Пальце-индикатор</Russian>
<Polish>Indykator palca</Polish> <Polish>Indykator palca</Polish>
</Key> </Key>
<Key ID="STR_ACE_finger_indicatorColor_description"> <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> <Russian>Цвет индикатора пальце-указания</Russian>
<Polish>Kolor okręgu wyświetlanego przy wskazywaniu palcem</Polish> <Polish>Kolor okręgu wyświetlanego przy wskazywaniu palcem</Polish>
</Key> </Key>
@ -31,15 +31,15 @@
<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> <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>
<Key ID="STR_ACE_finger_moduleSettings_displayName"> <Key ID="STR_ACE_finger_moduleSettings_displayName">
<English>Finger Settings</English> <English>Pointing Settings</English>
<Polish>Ustawienia wskazywania palcem</Polish> <Polish>Ustawienia wskazywania palcem</Polish>
</Key> </Key>
<Key ID="STR_ACE_finger_enabled_displayName"> <Key ID="STR_ACE_finger_enabled_displayName">
<English>Finger Pointing Enabled</English> <English>Pointing Enabled</English>
<Polish>Aktywuj wskazywanie</Polish> <Polish>Aktywuj wskazywanie</Polish>
</Key> </Key>
<Key ID="STR_ACE_finger_maxRange_displayName"> <Key ID="STR_ACE_finger_maxRange_displayName">
<English>Finger Max Range</English> <English>Pointing Max Range</English>
<Polish>Maks. zasięg wskazywania</Polish> <Polish>Maks. zasięg wskazywania</Polish>
</Key> </Key>
<Key ID="STR_ACE_finger_maxRange_description"> <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]; _data = [_origin, typeOf _origin, typeOf _obj, _objSpd, _positions, _color];
GVAR(traces) set[_index, _data]; 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]; _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 = _pos vectorFromTo ((ATLtoASL (player modelToWorldVisual (player selectionPosition "Spine3"))));
// _dirvec = _dirvec vectorMultiply 100; // _dirvec = _dirvec vectorMultiply 100;
// _can setVelocity _dirvec; // _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; [(_this select 1)] call cba_fnc_removePerFrameHandler;
}; };

View File

@ -1,5 +1,5 @@
#include "script_component.hpp" #include "script_component.hpp"
if(!GVAR(tracesStarted)) then { if(!GVAR(tracesStarted)) then {
GVAR(tracesStarted) = true; 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; GVAR(DustHandler) = -1;
}; };
}; };
},0,[]] call CALLSTACK(cba_fnc_addPerFrameHandler); },0,[]] call CALLSTACK(CBA_fnc_addPerFrameHandler);

View File

@ -39,7 +39,7 @@ class CfgVehicles {
author = "Ruthberg"; author = "Ruthberg";
scope = 2; scope = 2;
scopeCurator = 2; scopeCurator = 2;
displayName = "Kestrel 4500"; displayName = CSTRING(Name);
vehicleClass = "Items"; vehicleClass = "Items";
class TransportItems { class TransportItems {
MACRO_ADDITEM(ACE_Kestrel4500,1); 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); _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]; _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 { } else {
// server side ownership of laser // server side ownership of laser
_laserTarget setVariable [QGVAR(owner), nil, true]; _laserTarget setVariable [QGVAR(owner), nil, true];

View File

@ -16,7 +16,7 @@
#include "script_component.hpp" #include "script_component.hpp"
private ["_pos", "_seekerWavelengths", "_seekerCode", "_spots", "_buckets", "_excludes", "_bucketIndex", "_finalPos", "_owner", "_obj", "_x", "_method"]; 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 ["_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 ["_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"];
@ -62,8 +62,9 @@ _finalOwner = nil;
}; };
}; };
}; };
_laserPos = _laser select 0;
_laserDir = _laser select 1; //Handle Weird Data Return
if (_laser params [["_laserPos", [], [[]], 3], ["_laserDir", [], [[]], 3]]) then {
_res = [_laserPos, _laserDir, _divergence] call FUNC(shootCone); _res = [_laserPos, _laserDir, _divergence] call FUNC(shootCone);
{ {
_testPoint = _x select 0; _testPoint = _x select 0;
@ -74,6 +75,7 @@ _finalOwner = nil;
}; };
} forEach (_res select 2); } forEach (_res select 2);
}; };
};
} forEach (GVAR(laserEmitters) select 1); } forEach (GVAR(laserEmitters) select 1);
if((count _spots) > 0) then { if((count _spots) > 0) then {

View File

@ -83,7 +83,7 @@ if(!GVAR(active)) then {
// @TODO: Nou gets to field all tickets about missing lasers. // @TODO: Nou gets to field all tickets about missing lasers.
//_localLaserTarget = "LaserTargetW" createVehicleLocal (getpos ACE_player); //_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 { } else {
[] call FUNC(laserHudDesignateOff); [] call FUNC(laserHudDesignateOff);
[] call FUNC(laserHudDesignateOn); [] call FUNC(laserHudDesignateOn);

View File

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

View File

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

View File

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

View File

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

View File

@ -25,7 +25,7 @@ class ACE_Medical_Actions {
animationCallerProne = "AinvPpneMstpSlayW[wpn]Dnon_medicOther"; animationCallerProne = "AinvPpneMstpSlayW[wpn]Dnon_medicOther";
animationCallerSelf = "AinvPknlMstpSlayW[wpn]Dnon_medic"; animationCallerSelf = "AinvPknlMstpSlayW[wpn]Dnon_medic";
animationCallerSelfProne = "AinvPpneMstpSlayW[wpn]Dnon_medic"; animationCallerSelfProne = "AinvPpneMstpSlayW[wpn]Dnon_medic";
litter[] = { {"All", "", {{"ACE_MedicalLitterBase", "ACE_MedicalLitter_bandage1", "ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}} }; litter[] = { {"All", "_previousDamage > 0", {{"ACE_MedicalLitterBase", "ACE_MedicalLitter_bandage1", "ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}}, {"All", "_previousDamage <= 0", {"ACE_MedicalLitter_clean"}} };
}; };
class Morphine: Bandage { class Morphine: Bandage {
displayName = CSTRING(Inject_Morphine); displayName = CSTRING(Inject_Morphine);
@ -121,7 +121,7 @@ class ACE_Medical_Actions {
animationCallerProne = "AinvPpneMstpSlayW[wpn]Dnon_medicOther"; animationCallerProne = "AinvPpneMstpSlayW[wpn]Dnon_medicOther";
animationCallerSelf = "AinvPknlMstpSlayW[wpn]Dnon_medic"; animationCallerSelf = "AinvPknlMstpSlayW[wpn]Dnon_medic";
animationCallerSelfProne = "AinvPpneMstpSlayW[wpn]Dnon_medic"; animationCallerSelfProne = "AinvPpneMstpSlayW[wpn]Dnon_medic";
litter[] = { {"All", "", {{"ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}} }; litter[] = { {"All", "_previousDamage > 0", {{"ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}}, {"All", "_previousDamage <= 0", {"ACE_MedicalLitter_clean"}} };
}; };
class PackingBandage: fieldDressing { class PackingBandage: fieldDressing {
items[] = {"ACE_packingBandage"}; items[] = {"ACE_packingBandage"};
@ -246,6 +246,8 @@ class ACE_Medical_Actions {
callbackProgress = ""; callbackProgress = "";
animationPatient = ""; animationPatient = "";
animationCaller = ""; // TODO animationCaller = ""; // TODO
animationCallerProne = "";
animationCallerSelfProne = "";
itemConsumed = 0; itemConsumed = 0;
litter[] = {}; litter[] = {};
}; };

View File

@ -717,6 +717,9 @@ class CfgVehicles {
destrType = "DestructNo"; destrType = "DestructNo";
model = QUOTE(PATHTOF(data\littergeneric.p3d)); model = QUOTE(PATHTOF(data\littergeneric.p3d));
}; };
class ACE_MedicalLitter_clean: ACE_MedicalLitterBase {
model = QUOTE(PATHTOF(data\littergeneric_clean.p3d));
};
class ACE_MedicalLitter_bandage1: ACE_MedicalLitterBase { class ACE_MedicalLitter_bandage1: ACE_MedicalLitterBase {
model = QUOTE(PATHTOF(data\littergeneric_bandages1.p3d)); model = QUOTE(PATHTOF(data\littergeneric_bandages1.p3d));
}; };

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -16,12 +16,13 @@
#define MIN_ENTRIES_LITTER_CONFIG 3 #define MIN_ENTRIES_LITTER_CONFIG 3
private ["_target", "_className", "_config", "_litter", "_createLitter", "_position", "_createdLitter", "_caller", "_selectionName", "_usersOfItems"]; private ["_target", "_className", "_config", "_litter", "_createLitter", "_position", "_createdLitter", "_caller", "_selectionName", "_usersOfItems", "_previousDamage"];
_caller = _this select 0; _caller = _this select 0;
_target = _this select 1; _target = _this select 1;
_selectionName = _this select 2; _selectionName = _this select 2;
_className = _this select 3; _className = _this select 3;
_usersOfItems = _this select 5; _usersOfItems = _this select 5;
_previousDamage = _this select 6;
if !(GVAR(allowLitterCreation)) exitwith {}; if !(GVAR(allowLitterCreation)) exitwith {};
if (vehicle _caller != _caller || vehicle _target != _target) exitwith {}; if (vehicle _caller != _caller || vehicle _target != _target) exitwith {};
@ -76,7 +77,7 @@ _createdLitter = [];
_litterCondition = missionNamespace getvariable _litterCondition; _litterCondition = missionNamespace getvariable _litterCondition;
if (typeName _litterCondition != "CODE") then {_litterCondition = {false}}; if (typeName _litterCondition != "CODE") then {_litterCondition = {false}};
}; };
if !([_caller, _target, _selectionName, _className, _usersOfItems] call _litterCondition) exitwith {}; if !([_caller, _target, _selectionName, _className, _usersOfItems, _previousDamage] call _litterCondition) exitwith {};
if (typeName _litterOptions == "ARRAY") then { if (typeName _litterOptions == "ARRAY") then {
// Loop through through the litter options and place the litter // Loop through through the litter options and place the litter

View File

@ -31,6 +31,7 @@ if((count GVAR(allCreatedLitter)) > _maxLitterCount ) then {
GVAR(allCreatedLitter) pushBack [ACE_time, [_litterObject]]; GVAR(allCreatedLitter) pushBack [ACE_time, [_litterObject]];
if(!GVAR(litterPFHRunning) && {GVAR(litterCleanUpDelay) > 0}) then { if(!GVAR(litterPFHRunning) && {GVAR(litterCleanUpDelay) > 0}) then {
GVAR(litterPFHRunning) = true;
[{ [{
{ {
if (ACE_time - (_x select 0) >= GVAR(litterCleanUpDelay)) then { if (ACE_time - (_x select 0) >= GVAR(litterCleanUpDelay)) then {
@ -46,7 +47,7 @@ if(!GVAR(litterPFHRunning) && {GVAR(litterCleanUpDelay) > 0}) then {
[(_this select 1)] call CBA_fnc_removePerFrameHandler; [(_this select 1)] call CBA_fnc_removePerFrameHandler;
GVAR(litterPFHRunning) = false; GVAR(litterPFHRunning) = false;
}; };
}, 30, []] call cba_fnc_addPerFrameHandler; }, 30, []] call CBA_fnc_addPerFrameHandler;
}; };
true true

View File

@ -112,7 +112,7 @@ if (_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)]) exitW
}; };
0.89; 0.89;
}; };
0.89; _damageReturn min 0.89;
}; };
if (((_unit getVariable [QGVAR(enableRevive), GVAR(enableRevive)]) > 0) && {_damageReturn >= 0.9} && {_selection in ["", "head", "body"]}) exitWith { if (((_unit getVariable [QGVAR(enableRevive), GVAR(enableRevive)]) > 0) && {_damageReturn >= 0.9} && {_selection in ["", "head", "body"]}) exitWith {

View File

@ -156,7 +156,7 @@ if (_caller == _target) then {
_callerAnim = [getText (_config >> "animationCallerSelf"), getText (_config >> "animationCallerSelfProne")] select (stance _caller == "PRONE"); _callerAnim = [getText (_config >> "animationCallerSelf"), getText (_config >> "animationCallerSelfProne")] select (stance _caller == "PRONE");
}; };
_caller setvariable [QGVAR(selectedWeaponOnTreatment), currentWeapon _caller]; _caller setvariable [QGVAR(selectedWeaponOnTreatment), (weaponState _caller)];
// Cannot use secondairy weapon for animation // Cannot use secondairy weapon for animation
if (currentWeapon _caller == secondaryWeapon _caller) then { if (currentWeapon _caller == secondaryWeapon _caller) then {

View File

@ -44,9 +44,14 @@ if (vehicle _caller == _caller) then {
}; };
_caller setvariable [QGVAR(treatmentPrevAnimCaller), nil]; _caller setvariable [QGVAR(treatmentPrevAnimCaller), nil];
_weaponSelect = (_caller getvariable [QGVAR(selectedWeaponOnTreatment), ""]); _weaponSelect = (_caller getvariable [QGVAR(selectedWeaponOnTreatment), []]);
if (_weaponSelect != "") then { if ((_weaponSelect params [["_previousWeapon", ""]]) && {(_previousWeapon != "") && {_previousWeapon in (weapons _caller)}}) then {
_caller selectWeapon _weaponSelect; for "_index" from 0 to 99 do {
_caller action ["SwitchWeapon", _caller, _caller, _index];
//Just check weapon, muzzle and mode (ignore ammo in case they were reloading)
if (((weaponState _caller) select [0,3]) isEqualTo (_weaponSelect select [0,3])) exitWith {TRACE_1("Restoring", (weaponState _caller));};
if ((weaponState _caller) isEqualTo ["","","","",0]) exitWith {ERROR("weaponState not found");};
};
} else { } else {
_caller action ["SwitchWeapon", _caller, _caller, 99]; _caller action ["SwitchWeapon", _caller, _caller, 99];
}; };

View File

@ -42,9 +42,14 @@ if (vehicle _caller == _caller) then {
}; };
_caller setvariable [QGVAR(treatmentPrevAnimCaller), nil]; _caller setvariable [QGVAR(treatmentPrevAnimCaller), nil];
_weaponSelect = (_caller getvariable [QGVAR(selectedWeaponOnTreatment), ""]); _weaponSelect = (_caller getvariable [QGVAR(selectedWeaponOnTreatment), []]);
if (_weaponSelect != "") then { if ((_weaponSelect params [["_previousWeapon", ""]]) && {(_previousWeapon != "") && {_previousWeapon in (weapons _caller)}}) then {
_caller selectWeapon _weaponSelect; for "_index" from 0 to 99 do {
_caller action ["SwitchWeapon", _caller, _caller, _index];
//Just check weapon, muzzle and mode (ignore ammo in case they were reloading)
if (((weaponState _caller) select [0,3]) isEqualTo (_weaponSelect select [0,3])) exitWith {TRACE_1("Restoring", (weaponState _caller));};
if ((weaponState _caller) isEqualTo ["","","","",0]) exitWith {ERROR("weaponState not found");};
};
} else { } else {
_caller action ["SwitchWeapon", _caller, _caller, 99]; _caller action ["SwitchWeapon", _caller, _caller, 99];
}; };
@ -62,8 +67,19 @@ if (isNil _callback) then {
_callback = missionNamespace getvariable _callback; _callback = missionNamespace getvariable _callback;
}; };
_args call _callback; //Get current damage before treatment (for litter)
_previousDamage = switch (toLower _selectionName) do {
case ("head"): {_target getHitPointDamage "HitHead"};
case ("body"): {_target getHitPointDamage "HitBody"};
case ("hand_l"): {_target getHitPointDamage "HitLeftArm"};
case ("hand_r"): {_target getHitPointDamage "HitRightArm"};
case ("leg_l"): {_target getHitPointDamage "HitLeftLeg"};
case ("leg_r"): {_target getHitPointDamage "HitRightLeg"};
default {damage _target};
};
_args call _callback;
_args pushBack _previousDamage;
_args call FUNC(createLitter); _args call FUNC(createLitter);
//If we're not already tracking vitals, start: //If we're not already tracking vitals, start:

View File

@ -3,4 +3,4 @@ PARAMS_2(_target,_args);
if(isNil "_target" || {isNull _target} || {!local _target} ) exitWith { false }; if(isNil "_target" || {isNull _target} || {!local _target} ) exitWith { false };
[FUNC(guidancePFH), 0, _args] call cba_fnc_addPerFrameHandler; [FUNC(guidancePFH), 0, _args] call CBA_fnc_addPerFrameHandler;

View File

@ -101,12 +101,12 @@ _args = [_this,
// _guidingUnit = ACE_player; // _guidingUnit = ACE_player;
// //
// if(local _guidingUnit) then { // if(local _guidingUnit) then {
// [FUNC(guidancePFH), 0, _args ] call cba_fnc_addPerFrameHandler; // [FUNC(guidancePFH), 0, _args ] call CBA_fnc_addPerFrameHandler;
// } else { // } else {
// [QGVAR(handoff), [_guidingUnit, _args] ] call FUNC(doHandoff); // [QGVAR(handoff), [_guidingUnit, _args] ] call FUNC(doHandoff);
// }; // };
//} else { //} else {
[FUNC(guidancePFH), 0, _args ] call cba_fnc_addPerFrameHandler; [FUNC(guidancePFH), 0, _args ] call CBA_fnc_addPerFrameHandler;
//}; //};

View File

@ -117,7 +117,7 @@ if (_activated && local _logic) then {
}; };
}; };
}; };
}, 0.1, [_logic, _ambianceSounds, _minimalDistance, _maximalDistance, _minDelayBetweensounds, _maxDelayBetweenSounds, _volume, _followPlayers, ACE_time] ] call cba_fnc_addPerFrameHandler; }, 0.1, [_logic, _ambianceSounds, _minimalDistance, _maximalDistance, _minDelayBetweensounds, _maxDelayBetweenSounds, _volume, _followPlayers, ACE_time] ] call CBA_fnc_addPerFrameHandler;
}; };
true; true;

View File

@ -43,7 +43,7 @@ _fnc_stopCurrentBurst = {
_ammo = _unit ammo _weapon; _ammo = _unit ammo _weapon;
if (_ammo > 0) then { if (_ammo > 0) then {
_unit setAmmo [_weapon, 0]; _unit setAmmo [_weapon, 0];
[_fnc_stopCurrentBurst, 0, [_unit, _weapon, _ammo, diag_frameno]] call cba_fnc_addPerFrameHandler; [_fnc_stopCurrentBurst, 0, [_unit, _weapon, _ammo, diag_frameno]] call CBA_fnc_addPerFrameHandler;
}; };
// only display the hint once, after you try to shoot an already jammed weapon // only display the hint once, after you try to shoot an already jammed weapon

View File

@ -6,7 +6,6 @@ class CfgVehicles {
}; };
class TransportBackpacks { class TransportBackpacks {
MACRO_ADDBACKPACK(ACE_NonSteerableParachute,4); MACRO_ADDBACKPACK(ACE_NonSteerableParachute,4);
MACRO_ADDBACKPACK(ACE_ReserveParachute,4);
}; };
}; };
@ -93,7 +92,7 @@ class CfgVehicles {
class ACE_ReserveParachute: ACE_NonSteerableParachute { class ACE_ReserveParachute: ACE_NonSteerableParachute {
author = ECSTRING(common,ACETeam); author = ECSTRING(common,ACETeam);
displayName = CSTRING(ReserveParachute); displayName = CSTRING(ReserveParachute);
scope = 2; scope = 1;
mass = 70; mass = 70;
ParachuteClass = "NonSteerable_Parachute_F"; ParachuteClass = "NonSteerable_Parachute_F";
ace_reserveParachute = ""; ace_reserveParachute = "";

View File

@ -36,7 +36,7 @@ GVAR(PFH) = false;
["playerVehicleChanged",{ ["playerVehicleChanged",{
if (!GVAR(PFH) && {(vehicle ACE_player) isKindOf "ParachuteBase"}) then { if (!GVAR(PFH) && {(vehicle ACE_player) isKindOf "ParachuteBase"}) then {
GVAR(PFH) = true; GVAR(PFH) = true;
[FUNC(onEachFrame), 0.1, []] call CALLSTACK(cba_fnc_addPerFrameHandler); [FUNC(onEachFrame), 0.1, []] call CALLSTACK(CBA_fnc_addPerFrameHandler);
}; };
}] call EFUNC(common,addEventHandler); }] call EFUNC(common,addEventHandler);

View File

@ -24,4 +24,4 @@ _unit setVariable [QGVAR(chuteIsCut), false, true];
((_this select 0) select 1) playActionNow "Crouch"; ((_this select 0) select 1) playActionNow "Crouch";
[(_this select 1)] call CALLSTACK(cba_fnc_removePerFrameHandler); [(_this select 1)] call CALLSTACK(cba_fnc_removePerFrameHandler);
}; };
}, 1, [ACE_time,_unit]] call CALLSTACK(cba_fnc_addPerFrameHandler); }, 1, [ACE_time,_unit]] call CALLSTACK(CBA_fnc_addPerFrameHandler);

View File

@ -49,4 +49,4 @@ GVAR(AltimeterActive) = true;
(_this select 0) set [2, _height]; (_this select 0) set [2, _height];
(_this select 0) set [3, _curTime]; (_this select 0) set [3, _curTime];
}, 0.2, [uiNamespace getVariable ["ACE_Altimeter", displayNull], _unit,floor ((getPosASL _unit) select 2), ACE_time]] call CALLSTACK(cba_fnc_addPerFrameHandler); }, 0.2, [uiNamespace getVariable ["ACE_Altimeter", displayNull], _unit,floor ((getPosASL _unit) select 2), ACE_time]] call CALLSTACK(CBA_fnc_addPerFrameHandler);

105
addons/sitting/CfgMoves.hpp Normal file
View File

@ -0,0 +1,105 @@
// Enable visual head movement while free-looking
#define MACRO_ANIMATION \
head = "headDefault";
class CfgMovesBasic;
class CfgMovesMaleSdr: CfgMovesBasic {
class States {
class HubSittingChairA_idle1;
class GVAR(HubSittingChairA_idle1): HubSittingChairA_idle1 {
MACRO_ANIMATION
};
class HubSittingChairA_idle2;
class GVAR(HubSittingChairA_idle2): HubSittingChairA_idle2 {
MACRO_ANIMATION
};
class HubSittingChairA_idle3;
class GVAR(HubSittingChairA_idle3): HubSittingChairA_idle3 {
MACRO_ANIMATION
};
class HubSittingChairA_move1;
class GVAR(HubSittingChairA_move1): HubSittingChairA_move1 {
MACRO_ANIMATION
};
class HubSittingChairB_idle1;
class GVAR(HubSittingChairB_idle1): HubSittingChairB_idle1 {
MACRO_ANIMATION
};
class HubSittingChairB_idle2;
class GVAR(HubSittingChairB_idle2): HubSittingChairB_idle2 {
MACRO_ANIMATION
};
class HubSittingChairB_idle3;
class GVAR(HubSittingChairB_idle3): HubSittingChairB_idle3 {
MACRO_ANIMATION
};
class HubSittingChairB_move1;
class GVAR(HubSittingChairB_move1): HubSittingChairB_move1 {
MACRO_ANIMATION
};
class HubSittingChairC_idle1;
class GVAR(HubSittingChairC_idle1): HubSittingChairC_idle1 {
MACRO_ANIMATION
};
class HubSittingChairC_idle2;
class GVAR(HubSittingChairC_idle2): HubSittingChairC_idle2 {
MACRO_ANIMATION
};
class HubSittingChairC_idle3;
class GVAR(HubSittingChairC_idle3): HubSittingChairC_idle3 {
MACRO_ANIMATION
};
class HubSittingChairC_move1;
class GVAR(HubSittingChairC_move1): HubSittingChairC_move1 {
MACRO_ANIMATION
};
class HubSittingChairUA_idle1;
class GVAR(HubSittingChairUA_idle1): HubSittingChairUA_idle1 {
MACRO_ANIMATION
};
class HubSittingChairUA_idle2;
class GVAR(HubSittingChairUA_idle2): HubSittingChairUA_idle2 {
MACRO_ANIMATION
};
class HubSittingChairUA_idle3;
class GVAR(HubSittingChairUA_idle3): HubSittingChairUA_idle3 {
MACRO_ANIMATION
};
class HubSittingChairUA_move1;
class GVAR(HubSittingChairUA_move1): HubSittingChairUA_move1 {
MACRO_ANIMATION
};
class HubSittingChairUB_idle1;
class GVAR(HubSittingChairUB_idle1): HubSittingChairUB_idle1 {
MACRO_ANIMATION
};
class HubSittingChairUB_idle2;
class GVAR(HubSittingChairUB_idle2): HubSittingChairUB_idle2 {
MACRO_ANIMATION
};
class HubSittingChairUB_idle3;
class GVAR(HubSittingChairUB_idle3): HubSittingChairUB_idle3 {
MACRO_ANIMATION
};
class HubSittingChairUB_move1;
class GVAR(HubSittingChairUB_move1): HubSittingChairUB_move1 {
MACRO_ANIMATION
};
class HubSittingChairUC_idle1;
class GVAR(HubSittingChairUC_idle1): HubSittingChairUC_idle1 {
MACRO_ANIMATION
};
class HubSittingChairUC_idle2;
class GVAR(HubSittingChairUC_idle2): HubSittingChairUC_idle2 {
MACRO_ANIMATION
};
class HubSittingChairUC_idle3;
class GVAR(HubSittingChairUC_idle3): HubSittingChairUC_idle3 {
MACRO_ANIMATION
};
class HubSittingChairUC_move1;
class GVAR(HubSittingChairUC_move1): HubSittingChairUC_move1 {
MACRO_ANIMATION
};
};
};

View File

@ -39,7 +39,7 @@ class CfgVehicles {
class ACE_MainActions { \ class ACE_MainActions { \
displayName = ECSTRING(interaction,MainAction); \ displayName = ECSTRING(interaction,MainAction); \
selection = ""; \ selection = ""; \
distance = 1.25; \ distance = 1.5; \
condition = "true"; \ condition = "true"; \
class GVAR(Sit) { \ class GVAR(Sit) { \
displayName = CSTRING(Sit); \ displayName = CSTRING(Sit); \

View File

@ -12,6 +12,7 @@ class CfgPatches {
}; };
}; };
#include "CfgEventHandlers.hpp"
#include "ACE_Settings.hpp" #include "ACE_Settings.hpp"
#include "CfgEventHandlers.hpp"
#include "CfgMoves.hpp"
#include "CfgVehicles.hpp" #include "CfgVehicles.hpp"

View File

@ -10,17 +10,16 @@
* Can Sit Down <BOOL> * Can Sit Down <BOOL>
* *
* Example: * Example:
* [seat, player] call ace_sitting_fnc_canSit; * [seat, player] call ace_sitting_fnc_canSit
* *
* Public: No * Public: No
*/ */
//#define DEBUG_MODE_FULL
#include "script_component.hpp" #include "script_component.hpp"
PARAMS_2(_seat,_player); params ["_seat", "_player"];
// Sitting enabled, is seat object, not occupied and standing up (or not on a big slope) // Sitting enabled, is seat object, not occupied and standing up (or not on a big slope)
GVAR(enable) && GVAR(enable) &&
{getNumber (configFile >> "CfgVehicles" >> typeOf _seat >> QGVAR(canSit)) == 1} && {getNumber (configFile >> "CfgVehicles" >> typeOf _seat >> QGVAR(canSit)) == 1} &&
{isNil{_seat getVariable QGVAR(seatOccupied)}} && {isNil {_seat getVariable QGVAR(seatOccupied)}} &&
{round (vectorUp _seat select 0) == 0 && {round (vectorUp _seat select 1) == 0} && {round (vectorUp _seat select 2) == 1}} {round (vectorUp _seat select 0) == 0 && {round (vectorUp _seat select 1) == 0} && {round (vectorUp _seat select 2) == 1}}

View File

@ -15,7 +15,7 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
PARAMS_1(_player); params ["_player"];
// Sitting // Sitting
(_player getVariable [QGVAR(isSitting),false]) (_player getVariable [QGVAR(isSitting), false])

View File

@ -9,40 +9,40 @@
* Random Animation <STRING> * Random Animation <STRING>
* *
* Example: * Example:
* _animation = call ace_sitting_fnc_getRandomAnimation; * _animation = call ace_sitting_fnc_getRandomAnimation
* *
* Public: No * Public: No
*/ */
#include "script_component.hpp" #include "script_component.hpp"
private ["_animations"]; private "_animations";
// Animations Pool // Animations Pool
_animations = [ _animations = [
"HubSittingChairUA_idle1", QGVAR(HubSittingChairA_idle1),
"HubSittingChairUA_idle2", QGVAR(HubSittingChairA_idle2),
"HubSittingChairUA_idle3", QGVAR(HubSittingChairA_idle3),
"HubSittingChairUA_move1", QGVAR(HubSittingChairA_move1),
"HubSittingChairUB_idle1", QGVAR(HubSittingChairB_idle1),
"HubSittingChairUB_idle2", QGVAR(HubSittingChairB_idle2),
"HubSittingChairUB_idle3", QGVAR(HubSittingChairB_idle3),
"HubSittingChairUB_move1", QGVAR(HubSittingChairB_move1),
"HubSittingChairUC_idle1", QGVAR(HubSittingChairC_idle1),
"HubSittingChairUC_idle2", QGVAR(HubSittingChairC_idle2),
"HubSittingChairUC_idle3", QGVAR(HubSittingChairC_idle3),
"HubSittingChairUC_move1", QGVAR(HubSittingChairC_move1),
"HubSittingChairA_idle1", QGVAR(HubSittingChairUA_idle1),
"HubSittingChairA_idle2", QGVAR(HubSittingChairUA_idle2),
"HubSittingChairA_idle3", QGVAR(HubSittingChairUA_idle3),
"HubSittingChairA_move1", QGVAR(HubSittingChairUA_move1),
"HubSittingChairB_idle1", QGVAR(HubSittingChairUB_idle1),
"HubSittingChairB_idle2", QGVAR(HubSittingChairUB_idle2),
"HubSittingChairB_idle3", QGVAR(HubSittingChairUB_idle3),
"HubSittingChairB_move1", QGVAR(HubSittingChairUB_move1),
"HubSittingChairC_idle1", QGVAR(HubSittingChairUC_idle1),
"HubSittingChairC_idle2", QGVAR(HubSittingChairUC_idle2),
"HubSittingChairC_idle3", QGVAR(HubSittingChairUC_idle3),
"HubSittingChairC_move1" QGVAR(HubSittingChairUC_move1)
]; ];
// Select random animation // Select random animation

View File

@ -9,13 +9,13 @@
* None * None
* *
* Example: * Example:
* player call ace_sitting_fnc_handleInterrupt; * player call ace_sitting_fnc_handleInterrupt
* *
* Public: No * Public: No
*/ */
#include "script_component.hpp" #include "script_component.hpp"
PARAMS_1(_player); params ["_player"];
if (_player getVariable [QGVAR(isSitting), false]) then { if (_player getVariable [QGVAR(isSitting), false]) then {
_player call FUNC(stand); _player call FUNC(stand);

View File

@ -10,18 +10,21 @@
* None * None
* *
* Example: * Example:
* [seat, seatPos] call ace_sitting_fnc_hasChairMoved; * [seat, seatPos] call ace_sitting_fnc_hasChairMoved
* *
* Public: No * Public: No
*/ */
//#define DEBUG_MODE_FULL
#include "script_component.hpp" #include "script_component.hpp"
PARAMS_2(_seat,_seatPosOrig); params ["_seat", "_seatPosOrig"];
TRACE_2("Chair position",_seatPosOrig,getPosASL _seat); TRACE_2("Chair position",_seatPosOrig,getPosASL _seat);
(getPosASL _seat) params ["_seatX", "_seatY", "_seatZ"];
_seatPosOrig params ["_seatOrigX", "_seatOrigY", "_seatOrigZ"];
// Check each coordinate due to possibility of tiny movements in simulation // Check each coordinate due to possibility of tiny movements in simulation
(getPosASL _seat) select 0 < (_seatPosOrig select 0) - 0.01 || {(getPosASL _seat) select 0 > (_seatPosOrig select 0) + 0.01} || if (abs (_seatX - _seatOrigX) > 0.01) exitWith {true};
{(getPosASL _seat) select 1 < (_seatPosOrig select 1) - 0.01 || {(getPosASL _seat) select 1 > (_seatPosOrig select 1) + 0.01}} || if (abs (_seatY - _seatOrigY) > 0.01) exitWith {true};
{(getPosASL _seat) select 2 < (_seatPosOrig select 2) - 0.01 || {(getPosASL _seat) select 2 > (_seatPosOrig select 2) + 0.01}} if (abs (_seatZ - _seatOrigZ) > 0.01) exitWith {true};
false

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