mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'release'
This commit is contained in:
commit
c8a54fd090
@ -4,7 +4,7 @@
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/acemod/ACE3/releases/latest">
|
||||
<img src="https://img.shields.io/badge/Version-3.6.1-blue.svg?style=flat-square" alt="ACE3 Version">
|
||||
<img src="https://img.shields.io/badge/Version-3.6.2-blue.svg?style=flat-square" alt="ACE3 Version">
|
||||
</a>
|
||||
<a href="https://github.com/acemod/ACE3/issues">
|
||||
<img src="https://img.shields.io/github/issues-raw/acemod/ACE3.svg?style=flat-square&label=Issues" alt="ACE3 Issues">
|
||||
|
@ -1,4 +1,5 @@
|
||||
|
||||
PREP(actionKeysNamesConverted);
|
||||
PREP(addCanInteractWithCondition);
|
||||
PREP(addLineToDebugDraw);
|
||||
PREP(addSetting);
|
||||
@ -32,6 +33,7 @@ PREP(displayText);
|
||||
PREP(displayTextPicture);
|
||||
PREP(displayTextStructured);
|
||||
PREP(doAnimation);
|
||||
PREP(doGesture);
|
||||
PREP(dropBackpack);
|
||||
PREP(endRadioTransmission);
|
||||
PREP(eraseCache);
|
||||
|
@ -118,6 +118,8 @@ if (isServer) then {
|
||||
[QGVAR(setVelocity), {(_this select 0) setVelocity (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||
[QGVAR(playMove), {(_this select 0) playMove (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||
[QGVAR(playMoveNow), {(_this select 0) playMoveNow (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||
[QGVAR(playAction), {(_this select 0) playAction (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||
[QGVAR(playActionNow), {(_this select 0) playActionNow (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||
[QGVAR(switchMove), {(_this select 0) switchMove (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||
[QGVAR(setVectorDirAndUp), {(_this select 0) setVectorDirAndUp (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||
[QGVAR(setVanillaHitPointDamage), {(_this select 0) setHitPointDamage (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||
@ -406,14 +408,15 @@ GVAR(OldIsCamera) = false;
|
||||
|
||||
GVAR(isReloading) = false;
|
||||
|
||||
["isNotReloading", {!GVAR(isReloading)}] call FUNC(addCanInteractWithCondition);
|
||||
|
||||
["keyDown", {
|
||||
if ((_this select 1) in actionKeys "ReloadMagazine" && {alive ACE_player}) then {
|
||||
//Ignore mounted (except ffv)
|
||||
if (!(player call CBA_fnc_canUseWeapon)) exitWith {};
|
||||
private _weapon = currentWeapon ACE_player;
|
||||
|
||||
if (_weapon != "") then {
|
||||
private _gesture = getText (configfile >> "CfgWeapons" >> _weapon >> "reloadAction");
|
||||
if (_gesture == "") exitWith {}; //Ignore weapons with no reload gesture (binoculars)
|
||||
private _isLauncher = _weapon isKindOf ["Launcher", configFile >> "CfgWeapons"];
|
||||
private _config = ["CfgGesturesMale", "CfgMovesMaleSdr"] select _isLauncher;
|
||||
private _duration = getNumber (configfile >> _config >> "States" >> _gesture >> "speed");
|
||||
|
110
addons/common/functions/fnc_actionKeysNamesConverted.sqf
Normal file
110
addons/common/functions/fnc_actionKeysNamesConverted.sqf
Normal file
@ -0,0 +1,110 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
* Reports same as actionKeysNames(Array) but in a format processable by "keyDown".
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Action name <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* Keybinds, format: [DIK, _shift, _ctrl, _alt] <ARRAY>
|
||||
*
|
||||
* Example:
|
||||
* "ReloadMagazine" call ace_common_fnc_actionKeysNamesConverted
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
#define LAST_DIK 250
|
||||
#define PLACEHOLDER_PLUS "<PLUS>"
|
||||
|
||||
#define LKEYNAME_LSHIFT localize "STR_DIK_LSHIFT"
|
||||
#define LKEYNAME_RSHIFT localize "STR_DIK_RSHIFT"
|
||||
#define LKEYNAME_LCONTROL localize "STR_DIK_LCONTROL"
|
||||
#define LKEYNAME_RCONTROL localize "STR_DIK_RCONTROL"
|
||||
#define LKEYNAME_LALT localize "STR_DIK_LMENU"
|
||||
#define LKEYNAME_RALT localize "STR_DIK_RMENU"
|
||||
|
||||
// stored in ui namespace to force it to be recreated every game start
|
||||
// this way we make it work in savegames after a language change
|
||||
private _keyTable = uiNamespace getVariable QGVAR(keyNameTable);
|
||||
|
||||
if (isNil "_keyTable") then {
|
||||
_keyTable = [];
|
||||
uiNamespace setVariable [QGVAR(keyNameTable), _keyTable];
|
||||
|
||||
for "_i" from 0 to LAST_DIK do {
|
||||
private _keyName = keyName _i;
|
||||
|
||||
// keys are reported as nested strings for god knows why
|
||||
_keyName = _keyName select [1, count _keyName - 2];
|
||||
|
||||
_keyTable pushBack _keyName;
|
||||
};
|
||||
};
|
||||
|
||||
private _keyCache = uiNamespace getVariable [QGVAR(keyNameCache), locationNull];
|
||||
|
||||
if (isNull _keyCache) then {
|
||||
_keyCache = call CBA_fnc_createNamespace;
|
||||
uiNamespace setVariable [QGVAR(keyNameCache), _keyCache];
|
||||
};
|
||||
|
||||
params [["_action", "", [""]]];
|
||||
|
||||
private _keybinds = actionKeysNamesArray _action apply {
|
||||
private _keyName = _x;
|
||||
private _keybind = _keyCache getVariable _keyName;
|
||||
|
||||
if (isNil "_keybind") then {
|
||||
private _key = -1;
|
||||
private _shift = false;
|
||||
private _ctrl = false;
|
||||
private _alt = false;
|
||||
|
||||
// copy, keep original varname for cache
|
||||
private _keyImage = _keyName;
|
||||
|
||||
// handle "+" being a key and the seperator - as first character
|
||||
if ((_keyImage select [0,1]) isEqualTo "+") then {
|
||||
_keyImage = PLACEHOLDER_PLUS + (_keyImage select [1]);
|
||||
};
|
||||
|
||||
// - and as character seperated by "+"
|
||||
_keyImage = [_keyImage, "++", "+" + PLACEHOLDER_PLUS] call CBA_fnc_replace;
|
||||
|
||||
// get single keys (also revert back non-seperator "+" keys)
|
||||
_keyImage = _keyImage splitString "+" apply {
|
||||
[_x, "+"] select (_x isEqualTo PLACEHOLDER_PLUS);
|
||||
};
|
||||
|
||||
// parse single keys
|
||||
{
|
||||
switch (true) do {
|
||||
case (_x in [LKEYNAME_LSHIFT, LKEYNAME_RSHIFT]): {
|
||||
_shift = true;
|
||||
};
|
||||
case (_x in [LKEYNAME_LCONTROL, LKEYNAME_RCONTROL]): {
|
||||
_ctrl = true;
|
||||
};
|
||||
case (_x in [LKEYNAME_LALT, LKEYNAME_RALT]): {
|
||||
_alt = true;
|
||||
};
|
||||
default {
|
||||
// @todo handle double keys? ("C+R")
|
||||
// currently only reports last key
|
||||
// not usable by keyDown by default
|
||||
_key = _keyTable find _x;
|
||||
};
|
||||
};
|
||||
} forEach _keyImage;
|
||||
|
||||
// cache
|
||||
_keybind = [_key, _shift, _ctrl, _alt];
|
||||
_keyCache setVariable [_keyName, _keybind];
|
||||
};
|
||||
|
||||
_keybind
|
||||
};
|
||||
|
||||
_keybinds
|
@ -1,13 +1,17 @@
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Blurs screen.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: ID <NUMBER>
|
||||
* 1: Show? <BOOL, NUMBER>
|
||||
* 1: Show? <BOOL/NUMBER>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [5, true] call ace_common_fnc_blurScreen
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
24
addons/common/functions/fnc_doGesture.sqf
Normal file
24
addons/common/functions/fnc_doGesture.sqf
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
* Play a gesture.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
* 1: Animation <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [player, "gestureGo"] call ace_common_fnc_doGesture
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_unit", "_animation", ["_priority", 0]];
|
||||
TRACE_3("params",_unit,_animation,_priority);
|
||||
|
||||
if (!GVAR(isReloading) || {_priority > 0}) then {
|
||||
[QGVAR(playActionNow), [_unit, _animation], _unit] call CBA_fnc_targetEvent;
|
||||
};
|
@ -69,6 +69,33 @@ class CfgVehicles {
|
||||
GVAR(canCarry) = 1;
|
||||
GVAR(canDrag) = 1;
|
||||
};
|
||||
class Box_Syndicate_Ammo_F: ReammoBox_F {
|
||||
GVAR(canCarry) = 1;
|
||||
GVAR(canDrag) = 1;
|
||||
};
|
||||
class Box_IED_Exp_F: ReammoBox_F {
|
||||
GVAR(canCarry) = 1;
|
||||
GVAR(canDrag) = 1;
|
||||
};
|
||||
class Box_Syndicate_Wps_F: ReammoBox_F {
|
||||
GVAR(canCarry) = 1;
|
||||
GVAR(canDrag) = 1;
|
||||
};
|
||||
class Box_Syndicate_WpsLaunch_F: ReammoBox_F {
|
||||
GVAR(canCarry) = 1;
|
||||
GVAR(canDrag) = 1;
|
||||
};
|
||||
|
||||
class Box_NATO_Equip_F: ReammoBox_F {
|
||||
GVAR(canCarry) = 1;
|
||||
GVAR(carryDirection) = 270;
|
||||
GVAR(canDrag) = 1;
|
||||
};
|
||||
class Box_NATO_Uniforms_F: ReammoBox_F {
|
||||
GVAR(canCarry) = 1;
|
||||
GVAR(carryDirection) = 270;
|
||||
GVAR(canDrag) = 1;
|
||||
};
|
||||
|
||||
// Remove Larger crate dragging support.
|
||||
// Would be better to allow some sort of joint push/drag functionality
|
||||
|
@ -26,7 +26,7 @@ private _inBuilding = [_unit] call FUNC(isObjectOnObject);
|
||||
|
||||
if !(_unit getVariable ["ACE_isUnconscious", false]) then {
|
||||
// play release animation
|
||||
_unit playAction "released";
|
||||
[_unit, "released"] call EFUNC(common,doGesture);
|
||||
};
|
||||
|
||||
// prevent collision damage
|
||||
|
@ -39,7 +39,9 @@ _unit selectWeapon primaryWeapon _unit;
|
||||
[_unit, _target, true] call EFUNC(common,claim);
|
||||
|
||||
// can't play action that depends on weapon if it was added the same frame
|
||||
[{_this playActionNow "grabDrag";}, _unit] call CBA_fnc_execNextFrame;
|
||||
[{
|
||||
[_this, "grabDrag"] call EFUNC(common,doGesture);
|
||||
}, _unit] call CBA_fnc_execNextFrame;
|
||||
|
||||
// move a bit closer and adjust direction when trying to pick up a person
|
||||
if (_target isKindOf "CAManBase") then {
|
||||
|
@ -27,7 +27,7 @@ TRACE_7("params",_unit,_pos,_dir,_magazineClass,_triggerConfig,_triggerSpecificV
|
||||
|
||||
private ["_ammo", "_explosive", "_attachedTo", "_magazineTrigger", "_pitch", "_digDistance", "_canDigDown", "_soundEnviron", "_surfaceType"];
|
||||
|
||||
_unit playActionNow "PutDown";
|
||||
[_unit, "PutDown"] call EFUNC(common,doGesture);
|
||||
|
||||
_attachedTo = objNull;
|
||||
if (!isNull _setupPlaceholderObject) then {
|
||||
|
@ -185,7 +185,7 @@ GVAR(TweakedAngle) = 0;
|
||||
_expSetupVehicle setVariable [QGVAR(Direction), _placeAngle, true];
|
||||
|
||||
_unit removeMagazine _magClassname;
|
||||
_unit playActionNow "PutDown";
|
||||
[_unit, "PutDown"] call EFUNC(common,doGesture);
|
||||
_unit setVariable [QGVAR(PlantingExplosive), true];
|
||||
[{_this setVariable [QGVAR(PlantingExplosive), false]}, _unit, 1.5] call CBA_fnc_waitAndExecute;
|
||||
|
||||
|
@ -46,7 +46,7 @@ if (ACE_player != _unit) then {
|
||||
if (isPlayer _unit) then {
|
||||
[QGVAR(startDefuse), [_unit, _target], _unit] call CBA_fnc_targetEvent;
|
||||
} else {
|
||||
_unit playActionNow _actionToPlay;
|
||||
[_unit, _actionToPlay] call EFUNC(common,doGesture);
|
||||
_unit disableAI "MOVE";
|
||||
_unit disableAI "TARGET";
|
||||
_defuseTime = [[_unit] call EFUNC(Common,isEOD), _target] call _fnc_DefuseTime;
|
||||
@ -59,7 +59,7 @@ if (ACE_player != _unit) then {
|
||||
}, [_unit, _target], _defuseTime] call CBA_fnc_waitAndExecute;
|
||||
};
|
||||
} else {
|
||||
_unit playActionNow _actionToPlay;
|
||||
[_unit, _actionToPlay] call EFUNC(common,doGesture);
|
||||
_isEOD = [_unit] call EFUNC(Common,isEOD);
|
||||
_defuseTime = [_isEOD, _target] call _fnc_DefuseTime;
|
||||
if (_isEOD || {!GVAR(RequireSpecialist)}) then {
|
||||
|
@ -7,3 +7,12 @@
|
||||
[QGVAR(startFastRope), {
|
||||
[FUNC(fastRopeServerPFH), 0, _this] call CBA_fnc_addPerFrameHandler;
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
["ACE3 Vehicles", QGVAR(cutRopes), localize LSTRING(Interaction_cutRopes), {
|
||||
if ([vehicle ACE_player] call FUNC(canCutRopes)) then {
|
||||
[vehicle ACE_player] call FUNC(cutRopes);
|
||||
true
|
||||
} else {
|
||||
false
|
||||
};
|
||||
}, {false}] call CBA_fnc_addKeybind;
|
||||
|
@ -60,6 +60,6 @@ TRACE_1("sending finger to",_sendFingerToPlayers);
|
||||
|
||||
[QGVAR(fingered), [ACE_player, _fingerPosASL, _originASL vectorDistance _fingerPosASL], _sendFingerToPlayers] call CBA_fnc_targetEvent;
|
||||
|
||||
ACE_player playActionNow "GestureGo";
|
||||
[ACE_player, "GestureGo"] call EFUNC(common,doGesture);
|
||||
|
||||
true
|
||||
|
@ -14,42 +14,42 @@ class CfgVehicles {
|
||||
class GVAR(Advance) {
|
||||
displayName = CSTRING(Advance);
|
||||
condition = QUOTE(true);
|
||||
statement = QUOTE(_target playActionNow 'gestureAdvance';);
|
||||
statement = QUOTE([ARR_2(_target,'gestureAdvance')] call EFUNC(common,doGesture););
|
||||
showDisabled = 1;
|
||||
priority = 1.9;
|
||||
};
|
||||
class GVAR(Go) {
|
||||
displayName = CSTRING(Go);
|
||||
condition = QUOTE(true);
|
||||
statement = QUOTE(_target playActionNow ([ARR_2('gestureGo','gestureGoB')] select floor random 2););
|
||||
statement = QUOTE([ARR_2(_target,selectRandom [ARR_2('gestureGo','gestureGoB')])] call EFUNC(common,doGesture););
|
||||
showDisabled = 1;
|
||||
priority = 1.8;
|
||||
};
|
||||
class GVAR(Follow) {
|
||||
displayName = CSTRING(Follow);
|
||||
condition = QUOTE(true);
|
||||
statement = QUOTE(_target playActionNow 'gestureFollow';);
|
||||
statement = QUOTE([ARR_2(_target,'gestureFollow')] call EFUNC(common,doGesture););
|
||||
showDisabled = 1;
|
||||
priority = 1.7;
|
||||
};
|
||||
class GVAR(Up) {
|
||||
displayName = CSTRING(Up);
|
||||
condition = QUOTE(true);
|
||||
statement = QUOTE(_target playActionNow 'gestureUp';);
|
||||
statement = QUOTE([ARR_2(_target,'gestureUp')] call EFUNC(common,doGesture););
|
||||
showDisabled = 1;
|
||||
priority = 1.5;
|
||||
};
|
||||
class GVAR(CeaseFire) {
|
||||
displayName = CSTRING(CeaseFire);
|
||||
condition = QUOTE(true);
|
||||
statement = QUOTE(_target playActionNow 'gestureCeaseFire';);
|
||||
statement = QUOTE([ARR_2(_target,'gestureCeaseFire')] call EFUNC(common,doGesture););
|
||||
showDisabled = 1;
|
||||
priority = 1.3;
|
||||
};
|
||||
class GVAR(Stop) {
|
||||
displayName = CSTRING(Stop);
|
||||
condition = QUOTE(true);
|
||||
statement = QUOTE(_target playActionNow 'gestureFreeze';); // BI animation - is actualls "stop" in all stances but prone
|
||||
statement = QUOTE([ARR_2(_target,'gestureFreeze')] call EFUNC(common,doGesture);); // BI animation - is actualls "stop" in all stances but prone
|
||||
showDisabled = 1;
|
||||
priority = 1.2;
|
||||
};
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
TRACE_1("params",_this);
|
||||
|
||||
if (EGVAR(common,isReloading)) exitWith {false};
|
||||
if (GVAR(showOnInteractionMenu) == 0) exitWith {false};
|
||||
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
|
||||
@ -34,5 +33,5 @@ private _gesture = if ((_this select [0,2]) == "BI") then {
|
||||
};
|
||||
|
||||
TRACE_1("playing gesture",_gesture);
|
||||
ACE_player playAction _gesture;
|
||||
[ACE_player, _gesture] call EFUNC(common,doGesture);
|
||||
true
|
||||
|
@ -27,7 +27,7 @@ _effects set [BROKEN, _broken];
|
||||
SETGLASSES(_unit,_effects);
|
||||
|
||||
if ((stance _unit != "PRONE") && {primaryWeapon _unit != ""} && {currentWeapon _unit == primaryWeapon _unit}) then {
|
||||
_unit playActionNow "gestureWipeFace";
|
||||
[_unit, "gestureWipeFace"] call EFUNC(common,doGesture);
|
||||
};
|
||||
|
||||
[{
|
||||
|
@ -68,7 +68,7 @@ private _uid = format [QGVAR(ATCache_%1), _actionName];
|
||||
private _activeActionTree = [
|
||||
[_object, _baseActionNode, [], _distanceToBasePoint],
|
||||
DFUNC(collectActiveActionTree),
|
||||
_object, _uid, 1.0, "interactMenuClosed"
|
||||
_object, _uid, 1.0, "ace_interactMenuClosed"
|
||||
] call EFUNC(common,cachedCall);
|
||||
|
||||
END_COUNTER(fnc_collectActiveActionTree)
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
params ["_unit", "_target"];
|
||||
|
||||
_unit playActionNow "GestureGo";
|
||||
[_unit, "GestureGo"] call EFUNC(common,doGesture);
|
||||
|
||||
private "_chance";
|
||||
_chance = [0.5, 0.8] select (count weapons _unit > 0);
|
||||
|
@ -45,7 +45,7 @@ _player removeMagazines _magToPassClassName;
|
||||
};
|
||||
} foreach _filteredMags;
|
||||
|
||||
_player playActionNow "PutDown";
|
||||
[_player, "PutDown"] call EFUNC(common,doGesture);
|
||||
|
||||
_target addMagazine [_magToPassClassName, _magToPassAmmoCount];
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
_unit playActionNow "GestureGo";
|
||||
[_unit, "GestureGo"] call EFUNC(common,doGesture);
|
||||
|
||||
private "_chance";
|
||||
_chance = [0.5, 0.8] select (count weapons _unit > 0);
|
||||
|
@ -23,6 +23,6 @@ if (_unit == ACE_player) then {
|
||||
addCamShake [4, 0.5, 5];
|
||||
};
|
||||
|
||||
_unit playActionNow "PutDown";
|
||||
[_unit, "PutDown"] call EFUNC(common,doGesture);
|
||||
|
||||
[QGVAR(tapShoulder), [_target, _shoulderNum], [_target]] call CBA_fnc_targetEvent;
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
#define MAJOR 3
|
||||
#define MINOR 6
|
||||
#define PATCHLVL 1
|
||||
#define PATCHLVL 2
|
||||
#define BUILD 0
|
||||
|
||||
#define VERSION MAJOR.MINOR.PATCHLVL.BUILD
|
||||
|
@ -16,9 +16,9 @@ class Cfg3DEN {
|
||||
class Value: ctrlToolbox {
|
||||
idc = 100;
|
||||
style = "0x02";
|
||||
x = "48 * (pixelW * pixelGrid * 0.25)";
|
||||
w = "82 * (pixelW * pixelGrid * 0.25)";
|
||||
h = "5 * (pixelH * pixelGrid * 0.25)";
|
||||
x = "48 * (pixelW * pixelGrid * 0.50)";
|
||||
w = "82 * (pixelW * pixelGrid * 0.50)";
|
||||
h = "5 * (pixelH * pixelGrid * 0.50)";
|
||||
rows = 1;
|
||||
columns = 4;
|
||||
strings[] = {"$STR_3DEN_Attributes_Lock_Default_text", CSTRING(AssignMedicRoles_role_none), CSTRING(AssignMedicRoles_role_medic), CSTRING(AssignMedicRoles_role_doctorShort)};
|
||||
|
@ -20,4 +20,4 @@
|
||||
params ["", "_target", "_selection", "_classname"];
|
||||
|
||||
// parameters, function, namespace, uid
|
||||
[_this, DFUNC(canTreat), _target, format [QGVAR(canTreat_%1_%2), _selection, _classname], MAX_DURATION_CACHE, "clearConditionCaches"] call EFUNC(common,cachedCall);
|
||||
[_this, DFUNC(canTreat), _target, format [QGVAR(canTreat_%1_%2), _selection, _classname], MAX_DURATION_CACHE, QEGVAR(interact_menu,clearConditionCaches)] call EFUNC(common,cachedCall);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Updates the display (several times a second) called from the pfeh
|
||||
*
|
||||
@ -49,7 +49,7 @@ case (APP_MODE_INFODISPLAY): {
|
||||
_compassAngleText = if (GVAR(settingUseMils)) then {
|
||||
[(floor ((6400 / 360) * (([ACE_player] call CBA_fnc_headDir) select 0))), 4, 0] call CBA_fnc_formatNumber;
|
||||
} else {
|
||||
([(floor (([ACE_player] call CBA_fnc_headDir) select 0)), 3, 1] call CBA_fnc_formatNumber) + "°" //degree symbol is in UTF-8
|
||||
([([ACE_player] call CBA_fnc_headDir) select 0, 3, 1] call CBA_fnc_formatNumber) + "°" //degree symbol is in UTF-8
|
||||
};
|
||||
(_display displayCtrl IDC_MODEDISPLAY_HEADINGNUM) ctrlSetText _compassAngleText;
|
||||
|
||||
@ -89,7 +89,7 @@ case (APP_MODE_INFODISPLAY): {
|
||||
_bearingText = if (GVAR(settingUseMils)) then {
|
||||
[(floor ((6400 / 360) * (_bearing))), 4, 0] call CBA_fnc_formatNumber;
|
||||
} else {
|
||||
([(floor (_bearing)), 3, 1] call CBA_fnc_formatNumber) + "°" //degree symbol is in UTF-8
|
||||
([_bearing, 3, 1] call CBA_fnc_formatNumber) + "°" //degree symbol is in UTF-8
|
||||
};
|
||||
_2dDistanceKm = ((getPosASL ACE_player) distance2D _targetPosLocationASL) / 1000;
|
||||
_rangeText = format ["%1km", ([_2dDistanceKm, 1, 1] call CBA_fnc_formatNumber)];
|
||||
@ -109,7 +109,7 @@ case (APP_MODE_COMPASS): {
|
||||
_compassAngleText = if (GVAR(settingUseMils)) then {
|
||||
[(floor ((6400 / 360) * (([ACE_player] call CBA_fnc_headDir) select 0))), 4, 0] call CBA_fnc_formatNumber;
|
||||
} else {
|
||||
([(floor (([ACE_player] call CBA_fnc_headDir) select 0)), 3, 1] call CBA_fnc_formatNumber) + "°" //degree symbol is in UTF-8
|
||||
([([ACE_player] call CBA_fnc_headDir) select 0, 3, 1] call CBA_fnc_formatNumber) + "°" //degree symbol is in UTF-8
|
||||
};
|
||||
(_display displayCtrl IDC_MODECOMPASS_HEADING) ctrlSetText _compassAngleText;
|
||||
|
||||
@ -145,7 +145,7 @@ case (APP_MODE_COMPASS): {
|
||||
_bearingText = if (GVAR(settingUseMils)) then {
|
||||
[(floor ((6400 / 360) * (_bearing))), 4, 0] call CBA_fnc_formatNumber;
|
||||
} else {
|
||||
([(floor (_bearing)), 3, 1] call CBA_fnc_formatNumber) + "°" //degree symbol is in UTF-8
|
||||
([_bearing, 3, 1] call CBA_fnc_formatNumber) + "°" //degree symbol is in UTF-8
|
||||
};
|
||||
_2dDistanceKm = ((getPosASL ACE_player) distance2D _targetPosLocationASL) / 1000;
|
||||
_rangeText = format ["%1km", ([_2dDistanceKm, 1, 1] call CBA_fnc_formatNumber)];
|
||||
|
@ -104,7 +104,8 @@ class RscDisplayMain: RscStandardDisplay {
|
||||
class controls {
|
||||
class ACE_Open_settingsMenu_Btn : ACE_Open_SettingsMenu_BtnBase {
|
||||
action = "if (missionName != '') then {createDialog 'ACE_settingsMenu';};";
|
||||
y = "4 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + safezoneY";
|
||||
x = "safezoneX";
|
||||
y = "safezoneY";
|
||||
idc = 80085;
|
||||
};
|
||||
|
||||
|
@ -3,8 +3,7 @@
|
||||
|
||||
if (hasInterface) then {
|
||||
// Add keybinds
|
||||
["ACE3 Weapons", QGVAR(unjamWeapon), localize LSTRING(UnjamWeapon),
|
||||
{
|
||||
["ACE3 Weapons", QGVAR(unjamWeapon), localize LSTRING(UnjamWeapon), {
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
@ -14,9 +13,7 @@ if (hasInterface) then {
|
||||
// Statement
|
||||
[ACE_player, currentMuzzle ACE_player, false] call FUNC(clearJam);
|
||||
true
|
||||
},
|
||||
{false},
|
||||
[19, [true, false, false]], false] call CBA_fnc_addKeybind; //SHIFT + R Key
|
||||
}, {false}, [19, [true, false, false]], false] call CBA_fnc_addKeybind; //SHIFT + R Key
|
||||
};
|
||||
|
||||
["ace_settingsInitialized", {
|
||||
|
@ -28,7 +28,7 @@ if (_assistant isEqualTo _gunner) then {
|
||||
_action = "Gear";
|
||||
};
|
||||
};
|
||||
_assistant playActionNow _action;
|
||||
[_assistant, _action] call EFUNC(common,doGesture);
|
||||
|
||||
// Waits a sec before displaying the temperature
|
||||
[FUNC(displayTemperature), [_gunner, _weapon], 1.0] call CBA_fnc_waitAndExecute;
|
||||
|
@ -32,7 +32,7 @@ if (_weapon in _jammedWeapons) then {
|
||||
_clearJamAction = getText (configFile >> "CfgWeapons" >> _weapon >> "reloadAction");
|
||||
};
|
||||
|
||||
_unit playActionNow _clearJamAction;
|
||||
[_unit, _clearJamAction, 1] call EFUNC(common,doGesture);
|
||||
if (_weapon == primaryWeapon _unit) then {
|
||||
playSound QGVAR(fixing_rifle);
|
||||
} else {
|
||||
|
@ -26,7 +26,7 @@ if (stance _gunner != "PRONE") then {
|
||||
};
|
||||
|
||||
// Barrel dismount gesture
|
||||
_gunner playActionNow QGVAR(GestureDismountMuzzle);
|
||||
[_gunner, QGVAR(GestureDismountMuzzle)] call EFUNC(common,doGesture);
|
||||
playSound "ACE_BarrelSwap";
|
||||
|
||||
private _duration = 3.0;
|
||||
|
@ -23,7 +23,7 @@ TRACE_3("params",_assistant,_gunner,_weapon);
|
||||
|
||||
if (_assistant isEqualTo _gunner) then {
|
||||
// Barrel mount gesture
|
||||
_gunner playAction QGVAR(GestureMountMuzzle);
|
||||
[_gunner, QGVAR(GestureMountMuzzle)] call EFUNC(common,doGesture);
|
||||
playSound "ACE_BarrelSwap";
|
||||
};
|
||||
|
||||
|
@ -14,14 +14,20 @@
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
private["_unit"];
|
||||
_unit = _this select 0;
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
GVAR(PFH) = false;
|
||||
|
||||
[_unit, "AmovPercMevaSrasWrflDf_AmovPknlMstpSrasWrflDnon", 2] call EFUNC(common,doAnimation);
|
||||
|
||||
_unit setVariable [QGVAR(chuteIsCut), false, true];
|
||||
|
||||
[{
|
||||
if (CBA_missionTime >= ((_this select 0) select 0) + 1) then {
|
||||
((_this select 0) select 1) playActionNow "Crouch";
|
||||
[(_this select 1)] call CALLSTACK(CBA_fnc_removePerFrameHandler);
|
||||
(_this select 0) params ["_time", "_unit"];
|
||||
|
||||
if (CBA_missionTime > _time + 1) then {
|
||||
[_unit, "Crouch"] call EFUNC(common,doGesture);
|
||||
[_this select 1] call CALLSTACK(CBA_fnc_removePerFrameHandler);
|
||||
};
|
||||
}, 1, [CBA_missionTime,_unit]] call CALLSTACK(CBA_fnc_addPerFrameHandler);
|
||||
}, 1, [CBA_missionTime, _unit]] call CALLSTACK(CBA_fnc_addPerFrameHandler);
|
||||
|
@ -513,7 +513,11 @@ class CfgVehicles {
|
||||
class Weapon_SMG_02_F: Weapon_Base_F {
|
||||
displayName = CSTRING(SMG_02_Name);
|
||||
};
|
||||
|
||||
|
||||
class Weapon_SMG_05_F: Weapon_Base_F {
|
||||
displayName = CSTRING(SMG_05);
|
||||
};
|
||||
|
||||
class Weapon_hgun_PDW2000_F: Weapon_Base_F {
|
||||
displayName = CSTRING(hgun_PDW2000_Name);
|
||||
};
|
||||
|
@ -4,8 +4,7 @@
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
// Add keybinds
|
||||
["ACE3 Weapons", QGVAR(checkAmmo), localize LSTRING(checkAmmo),
|
||||
{
|
||||
["ACE3 Weapons", QGVAR(checkAmmo), localize LSTRING(checkAmmo), {
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, vehicle ACE_player, ["isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
@ -14,9 +13,7 @@ if (!hasInterface) exitWith {};
|
||||
// Statement
|
||||
[ACE_player] call FUNC(checkAmmo);
|
||||
true
|
||||
},
|
||||
{false},
|
||||
[19, [false, true, false]], false] call CBA_fnc_addKeybind;
|
||||
}, {false}, [19, [false, true, false]], false] call CBA_fnc_addKeybind;
|
||||
|
||||
[QGVAR(syncAmmo), {
|
||||
//To propagate the setAmmo change, do it on all clients
|
||||
|
@ -31,7 +31,7 @@ if (count _this > 1) then {
|
||||
};
|
||||
|
||||
if (_unit == _target) then {
|
||||
_unit playActionNow "Gear";
|
||||
[_unit, "Gear", 1] call EFUNC(common,doGesture);
|
||||
};
|
||||
|
||||
[FUNC(displayAmmo), [_target], 1, 0.1] call CBA_fnc_waitAndExecute;
|
||||
|
@ -57,7 +57,7 @@ private _onFailure = {
|
||||
_player addMagazine _magazine;
|
||||
};
|
||||
|
||||
_player playActionNow "PutDown";
|
||||
[_player, "PutDown"] call EFUNC(common,doGesture);
|
||||
|
||||
// Remove the magazine with maximum remaining ammo
|
||||
[_player, _magazineType, _maxAmmo] call EFUNC(common,removeSpecificMagazine);
|
||||
|
@ -16,9 +16,9 @@ class Cfg3DEN {
|
||||
class Value: ctrlToolbox {
|
||||
idc = 100;
|
||||
style = "0x02";
|
||||
x = "48 * (pixelW * pixelGrid * 0.25)";
|
||||
w = "82 * (pixelW * pixelGrid * 0.25)";
|
||||
h = "5 * (pixelH * pixelGrid * 0.25)";
|
||||
x = "48 * (pixelW * pixelGrid * 0.50)";
|
||||
w = "82 * (pixelW * pixelGrid * 0.50)";
|
||||
h = "5 * (pixelH * pixelGrid * 0.50)";
|
||||
rows = 1;
|
||||
columns = 4;
|
||||
strings[] = {"$STR_3DEN_Attributes_Lock_Default_text", CSTRING(AssignEngineerRole_role_none), CSTRING(AssignEngineerRole_role_engineer), CSTRING(AssignEngineerRole_role_specialist)};
|
||||
|
@ -53,6 +53,6 @@ call EFUNC(interaction,hideMouseHint);
|
||||
[_unit, "DefaultAction", _unit getVariable [QGVAR(Deploy), -1]] call EFUNC(common,removeActionEventHandler);
|
||||
|
||||
// play animation
|
||||
_unit playActionNow "PutDown";
|
||||
[_unit, "PutDown"] call EFUNC(common,doGesture);
|
||||
|
||||
_unit setVariable [QGVAR(isDeploying), false, true];
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
params ["_unit", "_sandbag"];
|
||||
|
||||
_unit playActionNow "PutDown";
|
||||
[_unit, "PutDown"] call EFUNC(common,doGesture);
|
||||
|
||||
_unit setVariable [QGVAR(isUsingSandbag), true];
|
||||
|
||||
|
@ -105,7 +105,7 @@ if ( !([ 0.5*TAG_SIZE, 0.5*TAG_SIZE] call _fnc_isOk) ||
|
||||
private _vectorDirAndUp = [_surfaceNormal vectorMultiply -1, _v3];
|
||||
|
||||
// Everything ok, make the unit create the tag
|
||||
_unit playActionNow "PutDown";
|
||||
[_unit, "PutDown"] call EFUNC(common,doGesture);
|
||||
|
||||
[{
|
||||
params ["", "", "", "", "_unit"];
|
||||
|
@ -27,7 +27,7 @@ class CfgWeapons {
|
||||
};
|
||||
|
||||
class LMG_Minigun: LMG_RCWS {
|
||||
magazines[] = {"1000Rnd_65x39_Belt","1000Rnd_65x39_Belt_Green","1000Rnd_65x39_Belt_Tracer_Green","1000Rnd_65x39_Belt_Tracer_Red","1000Rnd_65x39_Belt_Tracer_Yellow","1000Rnd_65x39_Belt_Yellow","2000Rnd_65x39_Belt","2000Rnd_65x39_Belt_Green","2000Rnd_65x39_Belt_Tracer_Green","2000Rnd_65x39_Belt_Tracer_Green_Splash","2000Rnd_65x39_Belt_Tracer_Red","2000Rnd_65x39_Belt_Tracer_Yellow","2000Rnd_65x39_Belt_Tracer_Yellow_Splash","2000Rnd_65x39_Belt_Yellow","2000Rnd_762x51_Belt_T_Green","2000Rnd_762x51_Belt_T_Red","2000Rnd_762x51_Belt_T_Yellow","200Rnd_65x39_Belt","200Rnd_65x39_Belt_Tracer_Green","200Rnd_65x39_Belt_Tracer_Red","200Rnd_65x39_Belt_Tracer_Yellow","5000Rnd_762x51_Belt","5000Rnd_762x51_Yellow_Belt"};
|
||||
magazines[] = {"1000Rnd_65x39_Belt","1000Rnd_65x39_Belt_Green","1000Rnd_65x39_Belt_Tracer_Green","1000Rnd_65x39_Belt_Tracer_Red","1000Rnd_65x39_Belt_Tracer_Yellow","1000Rnd_65x39_Belt_Yellow","2000Rnd_65x39_Belt","2000Rnd_65x39_Belt_Green","2000Rnd_65x39_Belt_Tracer_Green","2000Rnd_65x39_Belt_Tracer_Green_Splash","2000Rnd_65x39_Belt_Tracer_Red","2000Rnd_65x39_Belt_Tracer_Yellow","2000Rnd_65x39_Belt_Tracer_Yellow_Splash","2000Rnd_65x39_Belt_Yellow","2000Rnd_762x51_Belt_T_Green","2000Rnd_762x51_Belt_T_Red","2000Rnd_762x51_Belt_T_Yellow","200Rnd_65x39_Belt","200Rnd_65x39_Belt_Tracer_Green","200Rnd_65x39_Belt_Tracer_Red","200Rnd_65x39_Belt_Tracer_Yellow","5000Rnd_762x51_Belt","5000Rnd_762x51_Yellow_Belt","500Rnd_65x39_Belt","500Rnd_65x39_Belt_Tracer_Red_Splash","500Rnd_65x39_Belt_Tracer_Green_Splash","500Rnd_65x39_Belt_Tracer_Yellow_Splash"};
|
||||
};
|
||||
|
||||
class HMG_127: LMG_RCWS {
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/acemod/ACE3/releases">
|
||||
<img src="https://img.shields.io/badge/Version-3.6.1-blue.svg?style=flat-square" alt="ACE3 Version">
|
||||
<img src="https://img.shields.io/badge/Version-3.6.2-blue.svg?style=flat-square" alt="ACE3 Version">
|
||||
</a>
|
||||
<a href="https://github.com/acemod/ACE3/issues">
|
||||
<img src="https://img.shields.io/github/issues-raw/acemod/ACE3.svg?style=flat-square&label=Issues" alt="ACE3 Fehlermeldungen">
|
||||
|
@ -3,7 +3,7 @@
|
||||
</p>
|
||||
<p align="center">
|
||||
<a href="https://github.com/acemod/ACE3/releases">
|
||||
<img src="https://img.shields.io/badge/Wersja-3.6.1-blue.svg?style=flat-square" alt="ACE3 Wersja">
|
||||
<img src="https://img.shields.io/badge/Wersja-3.6.2-blue.svg?style=flat-square" alt="ACE3 Wersja">
|
||||
</a>
|
||||
<a href="https://github.com/acemod/ACE3/issues">
|
||||
<img src="https://img.shields.io/github/issues-raw/acemod/ACE3.svg?label=Zagadnienia&style=flat-square" alt="ACE3 Zagadnienia">
|
||||
|
4
mod.cpp
4
mod.cpp
@ -1,8 +1,8 @@
|
||||
name = "Advanced Combat Environment 3.6.1";
|
||||
name = "Advanced Combat Environment 3.6.2";
|
||||
picture = "logo_ace3_ca.paa";
|
||||
actionName = "GitHub";
|
||||
action = "https://github.com/acemod/ACE3";
|
||||
description = "ACE3 - Version 3.6.1";
|
||||
description = "ACE3 - Version 3.6.2";
|
||||
logo = "logo_ace3_ca.paa";
|
||||
logoOver = "logo_ace3_ca.paa";
|
||||
tooltip = "ACE3";
|
||||
|
Loading…
Reference in New Issue
Block a user