Merge branch 'master' into hearingRingingModule

Conflicts:
	addons/common/stringtable.xml
This commit is contained in:
Glowbal 2015-08-08 17:42:18 +02:00
commit 12f0808784
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>
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 = [];

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

@ -16,8 +16,7 @@
*/
#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)}) &&

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,7 @@
#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);

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

@ -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

@ -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

@ -652,5 +652,29 @@
<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

@ -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

@ -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)";

View File

@ -25,7 +25,7 @@ class ACE_Medical_Actions {
animationCallerProne = "AinvPpneMstpSlayW[wpn]Dnon_medicOther";
animationCallerSelf = "AinvPknlMstpSlayW[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 {
displayName = CSTRING(Inject_Morphine);
@ -121,7 +121,7 @@ class ACE_Medical_Actions {
animationCallerProne = "AinvPpneMstpSlayW[wpn]Dnon_medicOther";
animationCallerSelf = "AinvPknlMstpSlayW[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 {
items[] = {"ACE_packingBandage"};
@ -246,6 +246,8 @@ class ACE_Medical_Actions {
callbackProgress = "";
animationPatient = "";
animationCaller = ""; // TODO
animationCallerProne = "";
animationCallerSelfProne = "";
itemConsumed = 0;
litter[] = {};
};

View File

@ -717,6 +717,9 @@ class CfgVehicles {
destrType = "DestructNo";
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 {
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
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;
_target = _this select 1;
_selectionName = _this select 2;
_className = _this select 3;
_usersOfItems = _this select 5;
_previousDamage = _this select 6;
if !(GVAR(allowLitterCreation)) exitwith {};
if (vehicle _caller != _caller || vehicle _target != _target) exitwith {};
@ -76,7 +77,7 @@ _createdLitter = [];
_litterCondition = missionNamespace getvariable _litterCondition;
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 {
// 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]];
if(!GVAR(litterPFHRunning) && {GVAR(litterCleanUpDelay) > 0}) then {
GVAR(litterPFHRunning) = true;
[{
{
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;
GVAR(litterPFHRunning) = false;
};
}, 30, []] call cba_fnc_addPerFrameHandler;
}, 30, []] call CBA_fnc_addPerFrameHandler;
};
true

View File

@ -112,7 +112,7 @@ if (_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)]) exitW
};
0.89;
};
0.89;
_damageReturn min 0.89;
};
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");
};
_caller setvariable [QGVAR(selectedWeaponOnTreatment), currentWeapon _caller];
_caller setvariable [QGVAR(selectedWeaponOnTreatment), (weaponState _caller)];
// Cannot use secondairy weapon for animation
if (currentWeapon _caller == secondaryWeapon _caller) then {

View File

@ -44,9 +44,14 @@ if (vehicle _caller == _caller) then {
};
_caller setvariable [QGVAR(treatmentPrevAnimCaller), nil];
_weaponSelect = (_caller getvariable [QGVAR(selectedWeaponOnTreatment), ""]);
if (_weaponSelect != "") then {
_caller selectWeapon _weaponSelect;
_weaponSelect = (_caller getvariable [QGVAR(selectedWeaponOnTreatment), []]);
if ((_weaponSelect params [["_previousWeapon", ""]]) && {(_previousWeapon != "") && {_previousWeapon in (weapons _caller)}}) then {
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 {
_caller action ["SwitchWeapon", _caller, _caller, 99];
};

View File

@ -42,9 +42,14 @@ if (vehicle _caller == _caller) then {
};
_caller setvariable [QGVAR(treatmentPrevAnimCaller), nil];
_weaponSelect = (_caller getvariable [QGVAR(selectedWeaponOnTreatment), ""]);
if (_weaponSelect != "") then {
_caller selectWeapon _weaponSelect;
_weaponSelect = (_caller getvariable [QGVAR(selectedWeaponOnTreatment), []]);
if ((_weaponSelect params [["_previousWeapon", ""]]) && {(_previousWeapon != "") && {_previousWeapon in (weapons _caller)}}) then {
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 {
_caller action ["SwitchWeapon", _caller, _caller, 99];
};
@ -62,8 +67,19 @@ if (isNil _callback) then {
_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);
//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 };
[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;
//
// if(local _guidingUnit) then {
// [FUNC(guidancePFH), 0, _args ] call cba_fnc_addPerFrameHandler;
// [FUNC(guidancePFH), 0, _args ] call CBA_fnc_addPerFrameHandler;
// } else {
// [QGVAR(handoff), [_guidingUnit, _args] ] call FUNC(doHandoff);
// };
//} 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;

View File

@ -43,7 +43,7 @@ _fnc_stopCurrentBurst = {
_ammo = _unit ammo _weapon;
if (_ammo > 0) then {
_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

View File

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

View File

@ -36,7 +36,7 @@ GVAR(PFH) = false;
["playerVehicleChanged",{
if (!GVAR(PFH) && {(vehicle ACE_player) isKindOf "ParachuteBase"}) then {
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);

View File

@ -24,4 +24,4 @@ _unit setVariable [QGVAR(chuteIsCut), false, true];
((_this select 0) select 1) playActionNow "Crouch";
[(_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 [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 { \
displayName = ECSTRING(interaction,MainAction); \
selection = ""; \
distance = 1.25; \
distance = 1.5; \
condition = "true"; \
class GVAR(Sit) { \
displayName = CSTRING(Sit); \

View File

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

View File

@ -10,17 +10,16 @@
* Can Sit Down <BOOL>
*
* Example:
* [seat, player] call ace_sitting_fnc_canSit;
* [seat, player] call ace_sitting_fnc_canSit
*
* Public: No
*/
//#define DEBUG_MODE_FULL
#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)
GVAR(enable) &&
{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}}

View File

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

View File

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

View File

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

View File

@ -10,18 +10,21 @@
* None
*
* Example:
* [seat, seatPos] call ace_sitting_fnc_hasChairMoved;
* [seat, seatPos] call ace_sitting_fnc_hasChairMoved
*
* Public: No
*/
//#define DEBUG_MODE_FULL
#include "script_component.hpp"
PARAMS_2(_seat,_seatPosOrig);
params ["_seat", "_seatPosOrig"];
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
(getPosASL _seat) select 0 < (_seatPosOrig select 0) - 0.01 || {(getPosASL _seat) select 0 > (_seatPosOrig select 0) + 0.01} ||
{(getPosASL _seat) select 1 < (_seatPosOrig select 1) - 0.01 || {(getPosASL _seat) select 1 > (_seatPosOrig select 1) + 0.01}} ||
{(getPosASL _seat) select 2 < (_seatPosOrig select 2) - 0.01 || {(getPosASL _seat) select 2 > (_seatPosOrig select 2) + 0.01}}
if (abs (_seatX - _seatOrigX) > 0.01) exitWith {true};
if (abs (_seatY - _seatOrigY) > 0.01) exitWith {true};
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