mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' into armake
This commit is contained in:
commit
f956ea557a
2
.github/CONTRIBUTING.md
vendored
2
.github/CONTRIBUTING.md
vendored
@ -24,6 +24,6 @@ ACE2, AGM and CSE had a lot of features implemented or planned. All of them are
|
|||||||
Please refrain from making requests for any planned or existing features from either ACE2, AGM or CSE. Most of them are already being or have been considered for porting or a rewrite.
|
Please refrain from making requests for any planned or existing features from either ACE2, AGM or CSE. Most of them are already being or have been considered for porting or a rewrite.
|
||||||
|
|
||||||
## Requesting a feature
|
## Requesting a feature
|
||||||
In order to avoid duplicates and keep the issue tracker organized, we have created a common issue for [ACE3 Feature requests](https://github.com/acemod/ACE3/issues/414). Any and all relevant requests should be submitted there, where they will also get discussed and evaluated. Before adding a new one, make sure to check the previous entries from the thread and do a quick search for similar suggestions; please don't reiterate requests for features that had already been accepted for inclusion, or those which were disregarded earlier.
|
In order to avoid duplicates and keep the issue tracker organized, we have created a common issue for [ACE3 Feature requests](https://github.com/acemod/ACE3/issues/3594). Any and all relevant requests should be submitted there, where they will also get discussed and evaluated. Before adding a new one, make sure to check the previous entries from the thread and do a quick search for similar suggestions; please don't reiterate requests for features that had already been accepted for inclusion, or those which were disregarded earlier.
|
||||||
|
|
||||||
Following their approval, feature requests may be moved by moderators to a separate issue for further discussion.
|
Following their approval, feature requests may be moved by moderators to a separate issue for further discussion.
|
||||||
|
@ -12,6 +12,7 @@ before_script:
|
|||||||
fi
|
fi
|
||||||
script:
|
script:
|
||||||
- python3 tools/sqf_validator.py
|
- python3 tools/sqf_validator.py
|
||||||
|
- python3 tools/config_style_checker.py
|
||||||
- if [ -n "${GH_TOKEN}" ] && [ "${TRAVIS_BRANCH}" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
|
- if [ -n "${GH_TOKEN}" ] && [ "${TRAVIS_BRANCH}" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
|
||||||
python3 tools/deploy.py;
|
python3 tools/deploy.py;
|
||||||
fi
|
fi
|
||||||
|
@ -75,6 +75,7 @@ Gianmarco Varriale (TeamNuke) <admin@forhost.org>
|
|||||||
GieNkoV <gienkov.grzegorz@gmail.com>
|
GieNkoV <gienkov.grzegorz@gmail.com>
|
||||||
GitHawk <githawk@gmx.net>
|
GitHawk <githawk@gmx.net>
|
||||||
gpgpgpgp
|
gpgpgpgp
|
||||||
|
Grey-Soldierman <gungamer101@hotmail.com>
|
||||||
Grzegorz
|
Grzegorz
|
||||||
Hamburger SV
|
Hamburger SV
|
||||||
Harakhti <shadowdragonphd@gmail.com>
|
Harakhti <shadowdragonphd@gmail.com>
|
||||||
@ -111,6 +112,7 @@ Sniperwolf572 <tenga6@gmail.com>
|
|||||||
System98
|
System98
|
||||||
SzwedzikPL <szwedzikpl@gmail.com>
|
SzwedzikPL <szwedzikpl@gmail.com>
|
||||||
Tachi <zaveruha007@gmail.com>
|
Tachi <zaveruha007@gmail.com>
|
||||||
|
Tessa Elieff <Fastroping Sound - CreativeCommons Attributions 3.0>
|
||||||
Toaster <jonathan.pereira@gmail.com>
|
Toaster <jonathan.pereira@gmail.com>
|
||||||
Tonic
|
Tonic
|
||||||
Tourorist <tourorist@gmail.com>
|
Tourorist <tourorist@gmail.com>
|
||||||
@ -119,4 +121,3 @@ voiper
|
|||||||
VyMajoris(W-Cephei)<vycanismajoriscsa@gmail.com>
|
VyMajoris(W-Cephei)<vycanismajoriscsa@gmail.com>
|
||||||
Winter <simon@agius-muscat.net>
|
Winter <simon@agius-muscat.net>
|
||||||
zGuba
|
zGuba
|
||||||
Grey-Soldierman <gungamer101@hotmail.com>
|
|
||||||
|
2
LICENSE
2
LICENSE
@ -26,6 +26,8 @@ Some folders of this project may contain a separate LICENSE file. Should
|
|||||||
that be the case, everything in that folder and all subfolders is subject
|
that be the case, everything in that folder and all subfolders is subject
|
||||||
to that license instead.
|
to that license instead.
|
||||||
|
|
||||||
|
- ARMA PUBLIC LICENSE (\addons\apl)
|
||||||
|
- CreativeCommons Attributions 3.0 (\addons\fastroping\data\sounds)
|
||||||
|
|
||||||
============================================================================
|
============================================================================
|
||||||
Full GNU General Public License Text
|
Full GNU General Public License Text
|
||||||
|
@ -3,12 +3,15 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://github.com/acemod/ACE3/releases">
|
<a href="https://github.com/acemod/ACE3/releases/latest">
|
||||||
<img src="https://img.shields.io/badge/Version-3.5.0-blue.svg?style=flat-square" alt="ACE3 Version">
|
<img src="https://img.shields.io/badge/Version-3.5.1-blue.svg?style=flat-square" alt="ACE3 Version">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/acemod/ACE3/issues">
|
<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">
|
<img src="https://img.shields.io/github/issues-raw/acemod/ACE3.svg?style=flat-square&label=Issues" alt="ACE3 Issues">
|
||||||
</a>
|
</a>
|
||||||
|
<a href="https://github.com/acemod/ACE3/releases">
|
||||||
|
<img src="https://img.shields.io/github/downloads/acemod/ACE3/total.svg?style=flat-square&label=Downloads" alt="ACE3 Downloads">
|
||||||
|
</a>
|
||||||
<a href="https://forums.bistudio.com/topic/181341-ace3-a-collaborative-merger-between-agm-cse-and-ace/?p=2859670">
|
<a href="https://forums.bistudio.com/topic/181341-ace3-a-collaborative-merger-between-agm-cse-and-ace/?p=2859670">
|
||||||
<img src="https://img.shields.io/badge/BIF-Thread-lightgrey.svg?style=flat-square" alt="BIF Thread">
|
<img src="https://img.shields.io/badge/BIF-Thread-lightgrey.svg?style=flat-square" alt="BIF Thread">
|
||||||
</a>
|
</a>
|
||||||
|
@ -1,29 +1,34 @@
|
|||||||
class ACE_Settings {
|
class ACE_Settings {
|
||||||
class GVAR(enabled) {
|
class GVAR(enabled) {
|
||||||
|
category = CSTRING(DisplayName);
|
||||||
displayName = CSTRING(enabled_DisplayName);
|
displayName = CSTRING(enabled_DisplayName);
|
||||||
description = CSTRING(enabled_Description);
|
description = CSTRING(enabled_Description);
|
||||||
typeName = "BOOL";
|
typeName = "BOOL";
|
||||||
value = 0;
|
value = 0;
|
||||||
};
|
};
|
||||||
class GVAR(simulateForSnipers) {
|
class GVAR(simulateForSnipers) {
|
||||||
|
category = CSTRING(DisplayName);
|
||||||
displayName = CSTRING(simulateForSnipers_DisplayName);
|
displayName = CSTRING(simulateForSnipers_DisplayName);
|
||||||
description = CSTRING(simulateForSnipers_Description);
|
description = CSTRING(simulateForSnipers_Description);
|
||||||
typeName = "BOOL";
|
typeName = "BOOL";
|
||||||
value = 1;
|
value = 1;
|
||||||
};
|
};
|
||||||
class GVAR(simulateForGroupMembers) {
|
class GVAR(simulateForGroupMembers) {
|
||||||
|
category = CSTRING(DisplayName);
|
||||||
displayName = CSTRING(simulateForGroupMembers_DisplayName);
|
displayName = CSTRING(simulateForGroupMembers_DisplayName);
|
||||||
description = CSTRING(simulateForGroupMembers_Description);
|
description = CSTRING(simulateForGroupMembers_Description);
|
||||||
typeName = "BOOL";
|
typeName = "BOOL";
|
||||||
value = 0;
|
value = 0;
|
||||||
};
|
};
|
||||||
class GVAR(simulateForEveryone) {
|
class GVAR(simulateForEveryone) {
|
||||||
|
category = CSTRING(DisplayName);
|
||||||
displayName = CSTRING(simulateForEveryone_DisplayName);
|
displayName = CSTRING(simulateForEveryone_DisplayName);
|
||||||
description = CSTRING(simulateForEveryone_Description);
|
description = CSTRING(simulateForEveryone_Description);
|
||||||
typeName = "BOOL";
|
typeName = "BOOL";
|
||||||
value = 0;
|
value = 0;
|
||||||
};
|
};
|
||||||
class GVAR(disabledInFullAutoMode) {
|
class GVAR(disabledInFullAutoMode) {
|
||||||
|
category = CSTRING(DisplayName);
|
||||||
displayName = CSTRING(disabledInFullAutoMod_DisplayName);
|
displayName = CSTRING(disabledInFullAutoMod_DisplayName);
|
||||||
description = CSTRING(disabledInFullAutoMod_Description);
|
description = CSTRING(disabledInFullAutoMod_Description);
|
||||||
typeName = "BOOL";
|
typeName = "BOOL";
|
||||||
@ -31,6 +36,7 @@ class ACE_Settings {
|
|||||||
};
|
};
|
||||||
/* // TODO: We currently do not have firedEHs on vehicles
|
/* // TODO: We currently do not have firedEHs on vehicles
|
||||||
class GVAR(vehicleGunnerEnabled) {
|
class GVAR(vehicleGunnerEnabled) {
|
||||||
|
category = CSTRING(DisplayName);
|
||||||
displayName = "Enabled For Vehicle Gunners";
|
displayName = "Enabled For Vehicle Gunners";
|
||||||
description = "Enables advanced ballistics for vehicle gunners";
|
description = "Enables advanced ballistics for vehicle gunners";
|
||||||
typeName = "BOOL";
|
typeName = "BOOL";
|
||||||
@ -38,30 +44,35 @@ class ACE_Settings {
|
|||||||
};
|
};
|
||||||
*/
|
*/
|
||||||
class GVAR(ammoTemperatureEnabled) {
|
class GVAR(ammoTemperatureEnabled) {
|
||||||
|
category = CSTRING(DisplayName);
|
||||||
displayName = CSTRING(ammoTemperatureEnabled_DisplayName);
|
displayName = CSTRING(ammoTemperatureEnabled_DisplayName);
|
||||||
description = CSTRING(ammoTemperatureEnabled_Description);
|
description = CSTRING(ammoTemperatureEnabled_Description);
|
||||||
typeName = "BOOL";
|
typeName = "BOOL";
|
||||||
value = 1;
|
value = 1;
|
||||||
};
|
};
|
||||||
class GVAR(barrelLengthInfluenceEnabled) {
|
class GVAR(barrelLengthInfluenceEnabled) {
|
||||||
|
category = CSTRING(DisplayName);
|
||||||
displayName = CSTRING(barrelLengthInfluenceEnabled_DisplayName);
|
displayName = CSTRING(barrelLengthInfluenceEnabled_DisplayName);
|
||||||
description = CSTRING(barrelLengthInfluenceEnabled_Description);
|
description = CSTRING(barrelLengthInfluenceEnabled_Description);
|
||||||
typeName = "BOOL";
|
typeName = "BOOL";
|
||||||
value = 1;
|
value = 1;
|
||||||
};
|
};
|
||||||
class GVAR(bulletTraceEnabled) {
|
class GVAR(bulletTraceEnabled) {
|
||||||
|
category = CSTRING(DisplayName);
|
||||||
displayName = CSTRING(bulletTraceEnabled_DisplayName);
|
displayName = CSTRING(bulletTraceEnabled_DisplayName);
|
||||||
description = CSTRING(bulletTraceEnabled_Description);
|
description = CSTRING(bulletTraceEnabled_Description);
|
||||||
typeName = "BOOL";
|
typeName = "BOOL";
|
||||||
value = 1;
|
value = 1;
|
||||||
};
|
};
|
||||||
class GVAR(simulationInterval) {
|
class GVAR(simulationInterval) {
|
||||||
|
category = CSTRING(DisplayName);
|
||||||
displayName = CSTRING(simulationInterval_DisplayName);
|
displayName = CSTRING(simulationInterval_DisplayName);
|
||||||
description = CSTRING(simulationInterval_Description);
|
description = CSTRING(simulationInterval_Description);
|
||||||
typeName = "SCALAR";
|
typeName = "SCALAR";
|
||||||
value = 0.0;
|
value = 0.0;
|
||||||
};
|
};
|
||||||
class GVAR(simulationRadius) {
|
class GVAR(simulationRadius) {
|
||||||
|
category = CSTRING(DisplayName);
|
||||||
displayName = CSTRING(simulationRadius_DisplayName);
|
displayName = CSTRING(simulationRadius_DisplayName);
|
||||||
description = CSTRING(simulationRadius_Description);
|
description = CSTRING(simulationRadius_Description);
|
||||||
typeName = "SCALAR";
|
typeName = "SCALAR";
|
||||||
|
@ -21,7 +21,6 @@ if (!GVAR(extensionAvailable)) exitWith {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
*/
|
*/
|
||||||
[] call FUNC(initializeTerrainExtension);
|
|
||||||
|
|
||||||
if (!hasInterface) exitWith {};
|
if (!hasInterface) exitWith {};
|
||||||
|
|
||||||
@ -29,10 +28,28 @@ if (!hasInterface) exitWith {};
|
|||||||
//If not enabled, dont't add PFEH
|
//If not enabled, dont't add PFEH
|
||||||
if (!GVAR(enabled)) exitWith {};
|
if (!GVAR(enabled)) exitWith {};
|
||||||
|
|
||||||
|
//Run the terrain processor
|
||||||
|
[] call FUNC(initializeTerrainExtension);
|
||||||
|
|
||||||
// Register fire event handler
|
// Register fire event handler
|
||||||
["firedPlayer", DFUNC(handleFired)] call EFUNC(common,addEventHandler);
|
["firedPlayer", DFUNC(handleFired)] call EFUNC(common,addEventHandler);
|
||||||
["firedPlayerNonLocal", DFUNC(handleFired)] call EFUNC(common,addEventHandler);
|
["firedPlayerNonLocal", DFUNC(handleFired)] call EFUNC(common,addEventHandler);
|
||||||
|
|
||||||
|
//Add warnings for missing compat PBOs (only if AB is on)
|
||||||
|
{
|
||||||
|
_x params ["_modPBO", "_compatPBO"];
|
||||||
|
if ((isClass (configFile >> "CfgPatches" >> _modPBO)) && {!isClass (configFile >> "CfgPatches" >> _compatPBO)}) then {
|
||||||
|
ACE_LOGWARNING_2("Weapon Mod [%1] missing ace compat pbo [%2] (from @ace\optionals)",_modPBO,_compatPBO);
|
||||||
|
};
|
||||||
|
} forEach [
|
||||||
|
["RH_acc","ace_compat_rh_acc"],
|
||||||
|
["RH_de_cfg","ace_compat_rh_de"],
|
||||||
|
["RH_m4_cfg","ace_compat_rh_m4"],
|
||||||
|
["RH_PDW","ace_compat_rh_pdw"],
|
||||||
|
["RKSL_PMII","ace_compat_rksl_pm_ii"],
|
||||||
|
["iansky_opt","ace_compat_sma3_iansky"],
|
||||||
|
["R3F_Armes","ace_compat_r3f"]
|
||||||
|
];
|
||||||
}] call EFUNC(common,addEventHandler);
|
}] call EFUNC(common,addEventHandler);
|
||||||
|
|
||||||
#ifdef DEBUG_MODE_FULL
|
#ifdef DEBUG_MODE_FULL
|
||||||
|
@ -47,7 +47,7 @@ GVAR(Protractor) = true;
|
|||||||
__ctrl1 ctrlSetTextColor [1, 1, 1, 1];
|
__ctrl1 ctrlSetTextColor [1, 1, 1, 1];
|
||||||
|
|
||||||
__ctrl2 ctrlSetScale 1;
|
__ctrl2 ctrlSetScale 1;
|
||||||
__ctrl2 ctrlSetPosition [SafeZoneX + 0.001, SafeZoneY + 0.001 - 0.0012 * (-58 max (asin((ACE_player weaponDirection currentWeapon ACE_player) select 2)) min 58), 0.2, 0.2 * 4/3];
|
__ctrl2 ctrlSetPosition [SafeZoneX + 0.001, SafeZoneY - 0.001 - 0.1074 * (-0.86 max ((ACE_player weaponDirection currentWeapon ACE_player) select 2) min 0.86), 0.2, 0.2 * 4/3];
|
||||||
__ctrl2 ctrlCommit 0;
|
__ctrl2 ctrlCommit 0;
|
||||||
__ctrl2 ctrlSetText QUOTE(PATHTOF(UI\protractor_marker.paa));
|
__ctrl2 ctrlSetText QUOTE(PATHTOF(UI\protractor_marker.paa));
|
||||||
__ctrl2 ctrlSetTextColor [1, 1, 1, 1];
|
__ctrl2 ctrlSetTextColor [1, 1, 1, 1];
|
||||||
|
@ -88,7 +88,7 @@ if (GVAR(ammoTemperatureEnabled) || GVAR(barrelLengthInfluenceEnabled)) then {
|
|||||||
|
|
||||||
_bulletTraceVisible = false;
|
_bulletTraceVisible = false;
|
||||||
if (GVAR(bulletTraceEnabled) && cameraView == "GUNNER") then {
|
if (GVAR(bulletTraceEnabled) && cameraView == "GUNNER") then {
|
||||||
if (currentWeapon ACE_player in ["ACE_Vector", "Binocular", "Rangefinder", "Laserdesignator"]) then {
|
if (currentWeapon ACE_player == binocular ACE_player) then {
|
||||||
_bulletTraceVisible = true;
|
_bulletTraceVisible = true;
|
||||||
} else {
|
} else {
|
||||||
if (currentWeapon ACE_player == primaryWeapon ACE_player && count primaryWeaponItems ACE_player > 2) then {
|
if (currentWeapon ACE_player == primaryWeapon ACE_player && count primaryWeaponItems ACE_player > 2) then {
|
||||||
|
@ -24,7 +24,7 @@ _mapSize = getNumber (configFile >> "CfgWorlds" >> worldName >> "MapSize");
|
|||||||
if (("ace_advanced_ballistics" callExtension format["init:%1:%2", worldName, _mapSize]) == "Terrain already initialized") exitWith {
|
if (("ace_advanced_ballistics" callExtension format["init:%1:%2", worldName, _mapSize]) == "Terrain already initialized") exitWith {
|
||||||
#ifdef DEBUG_MODE_FULL
|
#ifdef DEBUG_MODE_FULL
|
||||||
systemChat "AdvancedBallistics: Terrain already initialized";
|
systemChat "AdvancedBallistics: Terrain already initialized";
|
||||||
#endIf
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
_mapGrids = ceil(_mapSize / 50) + 1;
|
_mapGrids = ceil(_mapSize / 50) + 1;
|
||||||
|
@ -42,31 +42,14 @@
|
|||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
params [
|
||||||
private ["_scopeBaseAngle", "_bulletMass", "_boreHeight", "_airFriction", "_muzzleVelocity", "_temperature", "_barometricPressure", "_relativeHumidity", "_simSteps", "_windSpeed1", "_windSpeed2", "_windDirection", "_inclinationAngle", "_targetSpeed", "_targetRange", "_drag", "_bc", "_dragModel", "_atmosphereModel", "_storeRangeCardData", "_stabilityFactor", "_twistDirection", "_latitude", "_directionOfFire"];
|
"_scopeBaseAngle", "_bulletMass", "_boreHeight", "_airFriction", "_muzzleVelocity",
|
||||||
_scopeBaseAngle = _this select 0;
|
"_temperature", "_barometricPressure", "_relativeHumidity", "_simSteps", "_windSpeed",
|
||||||
_bulletMass = _this select 1;
|
"_windDirection", "_inclinationAngle", "_targetSpeed", "_targetRange", "_bc", "_dragModel",
|
||||||
_boreHeight = _this select 2;
|
"_atmosphereModel", "_storeRangeCardData", "_stabilityFactor", "_twistDirection", "_latitude",
|
||||||
_airFriction = _this select 3;
|
"_directionOfFire"
|
||||||
_muzzleVelocity = _this select 4;
|
];
|
||||||
_temperature = _this select 5;
|
_windSpeed params ["_windSpeed1", "_windSpeed2"];
|
||||||
_barometricPressure = _this select 6;
|
|
||||||
_relativeHumidity = _this select 7;
|
|
||||||
_simSteps = _this select 8;
|
|
||||||
_windSpeed1 = (_this select 9) select 0;
|
|
||||||
_windSpeed2 = (_this select 9) select 1;
|
|
||||||
_windDirection = _this select 10;
|
|
||||||
_inclinationAngle = _this select 11;
|
|
||||||
_targetSpeed = _this select 12;
|
|
||||||
_targetRange = _this select 13;
|
|
||||||
_bc = _this select 14;
|
|
||||||
_dragModel = _this select 15;
|
|
||||||
_atmosphereModel = _this select 16;
|
|
||||||
_storeRangeCardData = _this select 17;
|
|
||||||
_stabilityFactor = _this select 18;
|
|
||||||
_twistDirection = _this select 19;
|
|
||||||
_latitude = _this select 20;
|
|
||||||
_directionOfFire = _this select 21;
|
|
||||||
|
|
||||||
private ["_bulletPos", "_bulletVelocity", "_bulletAccel", "_bulletSpeed", "_gravity", "_deltaT"];
|
private ["_bulletPos", "_bulletVelocity", "_bulletAccel", "_bulletSpeed", "_gravity", "_deltaT"];
|
||||||
_bulletPos = [0, 0, 0];
|
_bulletPos = [0, 0, 0];
|
||||||
@ -142,7 +125,7 @@ while {_TOF < 15 && (_bulletPos select 1) < _targetRange} do {
|
|||||||
_trueSpeed = vectorMagnitude _trueVelocity;
|
_trueSpeed = vectorMagnitude _trueVelocity;
|
||||||
|
|
||||||
if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
|
if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
|
||||||
_drag = if (missionNamespace getVariable [QEGVAR(advanced_ballistics,extensionAvailable), false]) then {
|
private _drag = if (missionNamespace getVariable [QEGVAR(advanced_ballistics,extensionAvailable), false]) then {
|
||||||
parseNumber(("ace_advanced_ballistics" callExtension format["retard:%1:%2:%3", _dragModel, _bc, _trueSpeed]))
|
parseNumber(("ace_advanced_ballistics" callExtension format["retard:%1:%2:%3", _dragModel, _bc, _trueSpeed]))
|
||||||
} else {
|
} else {
|
||||||
([_dragModel, _bc, _trueSpeed] call EFUNC(advanced_ballistics,calculateRetardation))
|
([_dragModel, _bc, _trueSpeed] call EFUNC(advanced_ballistics,calculateRetardation))
|
||||||
|
@ -17,10 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_gunID", "_restoreMemory", "_updateDisplay"];
|
params ["_gunID", "_restoreMemory", "_updateDisplay"];
|
||||||
_gunID = _this select 0;
|
|
||||||
_restoreMemory = _this select 1;
|
|
||||||
_updateDisplay = _this select 2;
|
|
||||||
|
|
||||||
if (_gunID < 0 || _gunID > (count GVAR(gunList)) - 1) exitWith {};
|
if (_gunID < 0 || _gunID > (count GVAR(gunList)) - 1) exitWith {};
|
||||||
|
|
||||||
|
@ -21,6 +21,5 @@ GVAR(showGunList) = _this;
|
|||||||
|
|
||||||
if (_this) then {
|
if (_this) then {
|
||||||
ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 6002);
|
ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 6002);
|
||||||
|
|
||||||
lbSetCurSel [6000, GVAR(currentGun)];
|
lbSetCurSel [6000, GVAR(currentGun)];
|
||||||
};
|
};
|
||||||
|
@ -21,7 +21,6 @@ GVAR(showTargetRangeAssist) = _this;
|
|||||||
|
|
||||||
if (_this) then {
|
if (_this) then {
|
||||||
ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 7018);
|
ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 7018);
|
||||||
|
|
||||||
ctrlSetText [7012, Str(parseNumber(ctrlText 320))];
|
ctrlSetText [7012, Str(parseNumber(ctrlText 320))];
|
||||||
ctrlSetText [7013, Str(parseNumber(ctrlText 340))];
|
ctrlSetText [7013, Str(parseNumber(ctrlText 340))];
|
||||||
|
|
||||||
|
@ -17,10 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_slopeDistance", "_azimuth", "_inclination"];
|
params ["_slopeDistance", "_azimuth", "_inclination"];
|
||||||
_slopeDistance = _this select 0;
|
|
||||||
_azimuth = _this select 1;
|
|
||||||
_inclination = _this select 2;
|
|
||||||
|
|
||||||
GVAR(inclinationAngle) set [GVAR(currentTarget), round(_inclination)];
|
GVAR(inclinationAngle) set [GVAR(currentTarget), round(_inclination)];
|
||||||
GVAR(directionOfFire) set [GVAR(currentTarget), round(_azimuth)];
|
GVAR(directionOfFire) set [GVAR(currentTarget), round(_azimuth)];
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project name="ACE">
|
<Project name="ACE">
|
||||||
<Package name="ATragMX">
|
<Package name="ATragMX">
|
||||||
<Key ID="STR_ACE_ATragMX_Name">
|
<Key ID="STR_ACE_ATragMX_Name">
|
||||||
|
@ -285,6 +285,8 @@ class CfgWeapons {
|
|||||||
"30Rnd_556x45_Stanag_Tracer_Red",
|
"30Rnd_556x45_Stanag_Tracer_Red",
|
||||||
"30Rnd_556x45_Stanag_Tracer_Green",
|
"30Rnd_556x45_Stanag_Tracer_Green",
|
||||||
"30Rnd_556x45_Stanag_Tracer_Yellow",
|
"30Rnd_556x45_Stanag_Tracer_Yellow",
|
||||||
|
"30Rnd_556x45_Stanag_red",
|
||||||
|
"30Rnd_556x45_Stanag_green",
|
||||||
"ACE_30Rnd_556x45_Stanag_M995_AP_mag",
|
"ACE_30Rnd_556x45_Stanag_M995_AP_mag",
|
||||||
"ACE_30Rnd_556x45_Stanag_Mk262_mag",
|
"ACE_30Rnd_556x45_Stanag_Mk262_mag",
|
||||||
"ACE_30Rnd_556x45_Stanag_Mk318_mag",
|
"ACE_30Rnd_556x45_Stanag_Mk318_mag",
|
||||||
@ -305,6 +307,8 @@ class CfgWeapons {
|
|||||||
"30Rnd_556x45_Stanag_Tracer_Red",
|
"30Rnd_556x45_Stanag_Tracer_Red",
|
||||||
"30Rnd_556x45_Stanag_Tracer_Green",
|
"30Rnd_556x45_Stanag_Tracer_Green",
|
||||||
"30Rnd_556x45_Stanag_Tracer_Yellow",
|
"30Rnd_556x45_Stanag_Tracer_Yellow",
|
||||||
|
"30Rnd_556x45_Stanag_red",
|
||||||
|
"30Rnd_556x45_Stanag_green",
|
||||||
"ACE_30Rnd_556x45_Stanag_M995_AP_mag",
|
"ACE_30Rnd_556x45_Stanag_M995_AP_mag",
|
||||||
"ACE_30Rnd_556x45_Stanag_Mk262_mag",
|
"ACE_30Rnd_556x45_Stanag_Mk262_mag",
|
||||||
"ACE_30Rnd_556x45_Stanag_Mk318_mag",
|
"ACE_30Rnd_556x45_Stanag_Mk318_mag",
|
||||||
@ -320,6 +324,8 @@ class CfgWeapons {
|
|||||||
"30Rnd_556x45_Stanag_Tracer_Red",
|
"30Rnd_556x45_Stanag_Tracer_Red",
|
||||||
"30Rnd_556x45_Stanag_Tracer_Green",
|
"30Rnd_556x45_Stanag_Tracer_Green",
|
||||||
"30Rnd_556x45_Stanag_Tracer_Yellow",
|
"30Rnd_556x45_Stanag_Tracer_Yellow",
|
||||||
|
"30Rnd_556x45_Stanag_red",
|
||||||
|
"30Rnd_556x45_Stanag_green",
|
||||||
"ACE_30Rnd_556x45_Stanag_M995_AP_mag",
|
"ACE_30Rnd_556x45_Stanag_M995_AP_mag",
|
||||||
"ACE_30Rnd_556x45_Stanag_Mk262_mag",
|
"ACE_30Rnd_556x45_Stanag_Mk262_mag",
|
||||||
"ACE_30Rnd_556x45_Stanag_Mk318_mag",
|
"ACE_30Rnd_556x45_Stanag_Mk318_mag",
|
||||||
@ -335,6 +341,8 @@ class CfgWeapons {
|
|||||||
"30Rnd_556x45_Stanag_Tracer_Red",
|
"30Rnd_556x45_Stanag_Tracer_Red",
|
||||||
"30Rnd_556x45_Stanag_Tracer_Green",
|
"30Rnd_556x45_Stanag_Tracer_Green",
|
||||||
"30Rnd_556x45_Stanag_Tracer_Yellow",
|
"30Rnd_556x45_Stanag_Tracer_Yellow",
|
||||||
|
"30Rnd_556x45_Stanag_red",
|
||||||
|
"30Rnd_556x45_Stanag_green",
|
||||||
"ACE_30Rnd_556x45_Stanag_M995_AP_mag",
|
"ACE_30Rnd_556x45_Stanag_M995_AP_mag",
|
||||||
"ACE_30Rnd_556x45_Stanag_Mk262_mag",
|
"ACE_30Rnd_556x45_Stanag_Mk262_mag",
|
||||||
"ACE_30Rnd_556x45_Stanag_Mk318_mag",
|
"ACE_30Rnd_556x45_Stanag_Mk318_mag",
|
||||||
@ -356,6 +364,8 @@ class CfgWeapons {
|
|||||||
"30Rnd_556x45_Stanag_Tracer_Red",
|
"30Rnd_556x45_Stanag_Tracer_Red",
|
||||||
"30Rnd_556x45_Stanag_Tracer_Green",
|
"30Rnd_556x45_Stanag_Tracer_Green",
|
||||||
"30Rnd_556x45_Stanag_Tracer_Yellow",
|
"30Rnd_556x45_Stanag_Tracer_Yellow",
|
||||||
|
"30Rnd_556x45_Stanag_red",
|
||||||
|
"30Rnd_556x45_Stanag_green",
|
||||||
"ACE_30Rnd_556x45_Stanag_M995_AP_mag",
|
"ACE_30Rnd_556x45_Stanag_M995_AP_mag",
|
||||||
"ACE_30Rnd_556x45_Stanag_Mk262_mag",
|
"ACE_30Rnd_556x45_Stanag_Mk262_mag",
|
||||||
"ACE_30Rnd_556x45_Stanag_Mk318_mag",
|
"ACE_30Rnd_556x45_Stanag_Mk318_mag",
|
||||||
@ -371,6 +381,8 @@ class CfgWeapons {
|
|||||||
"30Rnd_556x45_Stanag_Tracer_Red",
|
"30Rnd_556x45_Stanag_Tracer_Red",
|
||||||
"30Rnd_556x45_Stanag_Tracer_Green",
|
"30Rnd_556x45_Stanag_Tracer_Green",
|
||||||
"30Rnd_556x45_Stanag_Tracer_Yellow",
|
"30Rnd_556x45_Stanag_Tracer_Yellow",
|
||||||
|
"30Rnd_556x45_Stanag_red",
|
||||||
|
"30Rnd_556x45_Stanag_green",
|
||||||
"ACE_30Rnd_556x45_Stanag_M995_AP_mag",
|
"ACE_30Rnd_556x45_Stanag_M995_AP_mag",
|
||||||
"ACE_30Rnd_556x45_Stanag_Mk262_mag",
|
"ACE_30Rnd_556x45_Stanag_Mk262_mag",
|
||||||
"ACE_30Rnd_556x45_Stanag_Mk318_mag",
|
"ACE_30Rnd_556x45_Stanag_Mk318_mag",
|
||||||
@ -386,6 +398,8 @@ class CfgWeapons {
|
|||||||
"30Rnd_556x45_Stanag_Tracer_Red",
|
"30Rnd_556x45_Stanag_Tracer_Red",
|
||||||
"30Rnd_556x45_Stanag_Tracer_Green",
|
"30Rnd_556x45_Stanag_Tracer_Green",
|
||||||
"30Rnd_556x45_Stanag_Tracer_Yellow",
|
"30Rnd_556x45_Stanag_Tracer_Yellow",
|
||||||
|
"30Rnd_556x45_Stanag_red",
|
||||||
|
"30Rnd_556x45_Stanag_green",
|
||||||
"ACE_30Rnd_556x45_Stanag_M995_AP_mag",
|
"ACE_30Rnd_556x45_Stanag_M995_AP_mag",
|
||||||
"ACE_30Rnd_556x45_Stanag_Mk262_mag",
|
"ACE_30Rnd_556x45_Stanag_Mk262_mag",
|
||||||
"ACE_30Rnd_556x45_Stanag_Mk318_mag",
|
"ACE_30Rnd_556x45_Stanag_Mk318_mag",
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project name="ACE">
|
<Project name="ACE">
|
||||||
<Package name="Ballistics">
|
<Package name="Ballistics">
|
||||||
<!-- MX -->
|
<!-- MX -->
|
||||||
|
@ -27,27 +27,7 @@ class Extended_Killed_EventHandlers {
|
|||||||
|
|
||||||
//Need initPost or we have problems with setVariable with 'ACE_Cargo'
|
//Need initPost or we have problems with setVariable with 'ACE_Cargo'
|
||||||
class Extended_InitPost_EventHandlers {
|
class Extended_InitPost_EventHandlers {
|
||||||
class StaticWeapon {
|
class ThingX {
|
||||||
class ADDON {
|
|
||||||
init = QUOTE(_this call DFUNC(initObject));
|
|
||||||
};
|
|
||||||
};
|
|
||||||
class ReammoBox_F {
|
|
||||||
class ADDON {
|
|
||||||
init = QUOTE(_this call DFUNC(initObject));
|
|
||||||
};
|
|
||||||
};
|
|
||||||
class Cargo_base_F {
|
|
||||||
class ADDON {
|
|
||||||
init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
|
|
||||||
};
|
|
||||||
};
|
|
||||||
class CargoNet_01_box_F {
|
|
||||||
class ADDON {
|
|
||||||
init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
|
|
||||||
};
|
|
||||||
};
|
|
||||||
class Land_CargoBox_V1_F {
|
|
||||||
class ADDON {
|
class ADDON {
|
||||||
init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
|
init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
|
||||||
};
|
};
|
||||||
@ -57,27 +37,17 @@ class Extended_InitPost_EventHandlers {
|
|||||||
init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
|
init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
class RoadCone_F {
|
class PlasticCase_01_base_F {
|
||||||
class ADDON {
|
class ADDON {
|
||||||
init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
|
init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
class Car {
|
class LandVehicle {
|
||||||
class ADDON {
|
class ADDON {
|
||||||
init = QUOTE(_this call DFUNC(initVehicle));
|
init = QUOTE(_this call DFUNC(initVehicle));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
class Tank {
|
class Air {
|
||||||
class ADDON {
|
|
||||||
init = QUOTE(_this call DFUNC(initVehicle));
|
|
||||||
};
|
|
||||||
};
|
|
||||||
class Helicopter {
|
|
||||||
class ADDON {
|
|
||||||
init = QUOTE(_this call DFUNC(initVehicle));
|
|
||||||
};
|
|
||||||
};
|
|
||||||
class Plane {
|
|
||||||
class ADDON {
|
class ADDON {
|
||||||
init = QUOTE(_this call DFUNC(initVehicle));
|
init = QUOTE(_this call DFUNC(initVehicle));
|
||||||
};
|
};
|
||||||
@ -87,16 +57,6 @@ class Extended_InitPost_EventHandlers {
|
|||||||
init = QUOTE(_this call DFUNC(initVehicle));
|
init = QUOTE(_this call DFUNC(initVehicle));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
class ACE_RepairItem_Base {
|
|
||||||
class ADDON {
|
|
||||||
init = QUOTE(_this call DFUNC(initObject));
|
|
||||||
};
|
|
||||||
};
|
|
||||||
class ACE_bodyBagObject {
|
|
||||||
class ADDON {
|
|
||||||
init = QUOTE(_this call DFUNC(initObject));
|
|
||||||
};
|
|
||||||
};
|
|
||||||
class ACE_ConcertinaWireCoil {
|
class ACE_ConcertinaWireCoil {
|
||||||
class ADDON {
|
class ADDON {
|
||||||
init = QUOTE(_this call DFUNC(initObject));
|
init = QUOTE(_this call DFUNC(initObject));
|
||||||
|
@ -194,12 +194,69 @@ class CfgVehicles {
|
|||||||
GVAR(hasCargo) = 1;
|
GVAR(hasCargo) = 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Heli_Transport_02_base_F;
|
class Helicopter_Base_H;
|
||||||
class I_Heli_Transport_02_F: Heli_Transport_02_base_F {
|
class Heli_Light_01_base_F: Helicopter_Base_H {
|
||||||
|
GVAR(space) = 0;
|
||||||
|
GVAR(hasCargo) = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
class Heli_Light_02_base_F: Helicopter_Base_H {
|
||||||
|
GVAR(space) = 4;
|
||||||
|
};
|
||||||
|
|
||||||
|
class Helicopter_Base_F;
|
||||||
|
class Heli_light_03_base_F: Helicopter_Base_F {
|
||||||
|
GVAR(space) = 4;
|
||||||
|
};
|
||||||
|
|
||||||
|
class Heli_Transport_01_base_F: Helicopter_Base_H {
|
||||||
|
GVAR(space) = 8;
|
||||||
|
};
|
||||||
|
|
||||||
|
class Heli_Transport_02_base_F: Helicopter_Base_H {
|
||||||
|
GVAR(space) = 20;
|
||||||
|
};
|
||||||
|
|
||||||
|
class Heli_Transport_03_base_F: Helicopter_Base_H {
|
||||||
|
GVAR(space) = 40;
|
||||||
|
};
|
||||||
|
|
||||||
|
class Heli_Transport_04_base_F: Helicopter_Base_H {
|
||||||
|
GVAR(space) = 0;
|
||||||
|
GVAR(hasCargo) = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
class O_Heli_Transport_04_box_F: Heli_Transport_04_base_F {
|
||||||
GVAR(space) = 20;
|
GVAR(space) = 20;
|
||||||
GVAR(hasCargo) = 1;
|
GVAR(hasCargo) = 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class O_Heli_Transport_04_repair_F: Heli_Transport_04_base_F {
|
||||||
|
GVAR(space) = 12;
|
||||||
|
GVAR(hasCargo) = 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
class O_Heli_Transport_04_ammo_F: Heli_Transport_04_base_F {
|
||||||
|
GVAR(space) = 8;
|
||||||
|
GVAR(hasCargo) = 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
class O_Heli_Transport_04_fuel_F: Heli_Transport_04_base_F {};
|
||||||
|
|
||||||
|
class O_Heli_Transport_04_medevac_F: Heli_Transport_04_base_F {
|
||||||
|
GVAR(space) = 8;
|
||||||
|
GVAR(hasCargo) = 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
class Heli_Attack_01_base_F: Helicopter_Base_F {
|
||||||
|
GVAR(space) = 0;
|
||||||
|
GVAR(hasCargo) = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
class Heli_Attack_02_base_F: Helicopter_Base_F {
|
||||||
|
GVAR(space) = 4;
|
||||||
|
};
|
||||||
|
|
||||||
// jets
|
// jets
|
||||||
class Plane: Air {
|
class Plane: Air {
|
||||||
GVAR(space) = 0;
|
GVAR(space) = 0;
|
||||||
@ -207,7 +264,6 @@ class CfgVehicles {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// autonomus
|
// autonomus
|
||||||
class Helicopter_Base_F;
|
|
||||||
class UAV_01_base_F: Helicopter_Base_F {
|
class UAV_01_base_F: Helicopter_Base_F {
|
||||||
GVAR(space) = 0;
|
GVAR(space) = 0;
|
||||||
GVAR(hasCargo) = 0;
|
GVAR(hasCargo) = 0;
|
||||||
@ -248,6 +304,25 @@ class CfgVehicles {
|
|||||||
GVAR(canLoad) = 1;
|
GVAR(canLoad) = 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Taru pods
|
||||||
|
class Pod_Heli_Transport_04_base_F;
|
||||||
|
class Land_Pod_Heli_Transport_04_ammo_F: Pod_Heli_Transport_04_base_F {
|
||||||
|
GVAR(space) = 8;
|
||||||
|
GVAR(hasCargo) = 1;
|
||||||
|
};
|
||||||
|
class Land_Pod_Heli_Transport_04_box_F: Pod_Heli_Transport_04_base_F {
|
||||||
|
GVAR(space) = 20;
|
||||||
|
GVAR(hasCargo) = 1;
|
||||||
|
};
|
||||||
|
class Land_Pod_Heli_Transport_04_medevac_F: Pod_Heli_Transport_04_base_F {
|
||||||
|
GVAR(space) = 8;
|
||||||
|
GVAR(hasCargo) = 1;
|
||||||
|
};
|
||||||
|
class Land_Pod_Heli_Transport_04_repair_F: Pod_Heli_Transport_04_base_F {
|
||||||
|
GVAR(space) = 12;
|
||||||
|
GVAR(hasCargo) = 1;
|
||||||
|
};
|
||||||
|
|
||||||
class StaticMortar;
|
class StaticMortar;
|
||||||
class Mortar_01_base_F: StaticMortar {
|
class Mortar_01_base_F: StaticMortar {
|
||||||
GVAR(size) = 2; // 1 = small, 2 = large
|
GVAR(size) = 2; // 1 = small, 2 = large
|
||||||
@ -256,6 +331,7 @@ class CfgVehicles {
|
|||||||
|
|
||||||
// Ammo boxes
|
// Ammo boxes
|
||||||
class ThingX;
|
class ThingX;
|
||||||
|
class Items_base_F;
|
||||||
class ReammoBox_F: ThingX {
|
class ReammoBox_F: ThingX {
|
||||||
GVAR(size) = 2; // 1 = small, 2 = large
|
GVAR(size) = 2; // 1 = small, 2 = large
|
||||||
GVAR(canLoad) = 1;
|
GVAR(canLoad) = 1;
|
||||||
@ -278,6 +354,23 @@ class CfgVehicles {
|
|||||||
class Slingload_01_Base_F: Slingload_base_F { //Huron 20ft containers
|
class Slingload_01_Base_F: Slingload_base_F { //Huron 20ft containers
|
||||||
GVAR(canLoad) = 0;
|
GVAR(canLoad) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//Plastic and metal case
|
||||||
|
class PlasticCase_01_base_F: Items_base_F {
|
||||||
|
GVAR(size) = 1; // 1 = small, 2 = large
|
||||||
|
GVAR(canLoad) = 1;
|
||||||
|
};
|
||||||
|
class Land_PlasticCase_01_large_F: PlasticCase_01_base_F {
|
||||||
|
GVAR(size) = 2; // 1 = small, 2 = large
|
||||||
|
};
|
||||||
|
class MetalCase_01_base_F: Items_base_F {
|
||||||
|
GVAR(size) = 1; // 1 = small, 2 = large
|
||||||
|
GVAR(canLoad) = 1;
|
||||||
|
};
|
||||||
|
class Land_MetalCase_01_large_F: MetalCase_01_base_F {
|
||||||
|
GVAR(size) = 2; // 1 = small, 2 = large
|
||||||
|
};
|
||||||
|
|
||||||
// objects
|
// objects
|
||||||
class RoadCone_F: ThingX {
|
class RoadCone_F: ThingX {
|
||||||
GVAR(size) = 1;
|
GVAR(size) = 1;
|
||||||
|
@ -20,6 +20,8 @@ TRACE_1("params", _vehicle);
|
|||||||
|
|
||||||
private _type = typeOf _vehicle;
|
private _type = typeOf _vehicle;
|
||||||
|
|
||||||
|
if (getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(hasCargo)) != 1) exitWith {};
|
||||||
|
|
||||||
if (isServer) then {
|
if (isServer) then {
|
||||||
{
|
{
|
||||||
if (isClass _x) then {
|
if (isClass _x) then {
|
||||||
@ -38,7 +40,6 @@ if (_type in GVAR(initializedVehicleClasses)) exitWith {};
|
|||||||
GVAR(initializedVehicleClasses) pushBack _type;
|
GVAR(initializedVehicleClasses) pushBack _type;
|
||||||
|
|
||||||
if (!hasInterface) exitWith {};
|
if (!hasInterface) exitWith {};
|
||||||
if (getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(hasCargo)) != 1) exitWith {};
|
|
||||||
|
|
||||||
TRACE_1("Adding unload cargo action to class", _type);
|
TRACE_1("Adding unload cargo action to class", _type);
|
||||||
|
|
||||||
|
@ -175,6 +175,7 @@
|
|||||||
<Italian>Rendi oggetto caricabile</Italian>
|
<Italian>Rendi oggetto caricabile</Italian>
|
||||||
<Spanish>Hacer objeto cargable</Spanish>
|
<Spanish>Hacer objeto cargable</Spanish>
|
||||||
<French>Rendre l'objet chargeable</French>
|
<French>Rendre l'objet chargeable</French>
|
||||||
|
<Czech>Vytvořit objekt nakladatelným</Czech>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Cargo_makeLoadable_description">
|
<Key ID="STR_ACE_Cargo_makeLoadable_description">
|
||||||
<English>Sets the synced object as loadable by the cargo system.</English>
|
<English>Sets the synced object as loadable by the cargo system.</English>
|
||||||
@ -183,6 +184,7 @@
|
|||||||
<Italian>Imposta l'oggetto sincronizzato come caricabile dal sistema cargo</Italian>
|
<Italian>Imposta l'oggetto sincronizzato come caricabile dal sistema cargo</Italian>
|
||||||
<Spanish>Sincronizar un objecto para hacerlo cargable.</Spanish>
|
<Spanish>Sincronizar un objecto para hacerlo cargable.</Spanish>
|
||||||
<French>Rend l'objet synchronisé comme chargeable par le système de cargaison.</French>
|
<French>Rend l'objet synchronisé comme chargeable par le système de cargaison.</French>
|
||||||
|
<Czech>Nastaví synchronizované objekty nakladatelnými za pomocí Nákladního systému.</Czech>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Cargo_makeLoadable_setSize_displayName">
|
<Key ID="STR_ACE_Cargo_makeLoadable_setSize_displayName">
|
||||||
<English>Object's Size</English>
|
<English>Object's Size</English>
|
||||||
@ -191,6 +193,7 @@
|
|||||||
<Italian>Dimensioni dell'oggetto</Italian>
|
<Italian>Dimensioni dell'oggetto</Italian>
|
||||||
<Spanish>Tamaño del objeto</Spanish>
|
<Spanish>Tamaño del objeto</Spanish>
|
||||||
<French>Taille de l'objet</French>
|
<French>Taille de l'objet</French>
|
||||||
|
<Czech>Velikost objektu</Czech>
|
||||||
</Key>
|
</Key>
|
||||||
</Package>
|
</Package>
|
||||||
</Project>
|
</Project>
|
@ -49,7 +49,7 @@ class ACE_Settings {
|
|||||||
description = CSTRING(SettingFeedbackIconsDesc);
|
description = CSTRING(SettingFeedbackIconsDesc);
|
||||||
values[] = {ECSTRING(optionsmenu,Hide), ECSTRING(optionsmenu,TopRightDown), ECSTRING(optionsmenu,TopRightLeft), ECSTRING(optionsmenu,TopLeftDown), ECSTRING(optionsmenu,TopLeftRight)};
|
values[] = {ECSTRING(optionsmenu,Hide), ECSTRING(optionsmenu,TopRightDown), ECSTRING(optionsmenu,TopRightLeft), ECSTRING(optionsmenu,TopLeftDown), ECSTRING(optionsmenu,TopLeftRight)};
|
||||||
};
|
};
|
||||||
class GVAR(SettingProgressBarLocation) {
|
class GVAR(settingProgressBarLocation) {
|
||||||
value = 0;
|
value = 0;
|
||||||
typeName = "SCALAR";
|
typeName = "SCALAR";
|
||||||
force = 0;
|
force = 0;
|
||||||
|
@ -33,7 +33,7 @@ class Extended_InitPost_EventHandlers {
|
|||||||
};
|
};
|
||||||
class CAManBase {
|
class CAManBase {
|
||||||
class GVAR(setName) {
|
class GVAR(setName) {
|
||||||
init = QUOTE(if (local (_this select 0)) then {_this call FUNC(setName)};);
|
init = QUOTE(if (local (_this select 0)) then {[ARR_2(FUNC(setName),_this)] call FUNC(execNextFrame)};);
|
||||||
};
|
};
|
||||||
class GVAR(muteUnit) {
|
class GVAR(muteUnit) {
|
||||||
init = QUOTE(_this call FUNC(muteUnitHandleInitPost));
|
init = QUOTE(_this call FUNC(muteUnitHandleInitPost));
|
||||||
@ -76,3 +76,9 @@ class Extended_FiredBIS_EventHandlers {
|
|||||||
ADDON = QUOTE(_this call FUNC(firedEH));
|
ADDON = QUOTE(_this call FUNC(firedEH));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class Extended_Engine_EventHandlers {
|
||||||
|
class All {
|
||||||
|
ADDON = QUOTE(_this call FUNC(handleEngine));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
@ -87,6 +87,7 @@ PREP(getWindDirection);
|
|||||||
PREP(getZoom);
|
PREP(getZoom);
|
||||||
PREP(goKneeling);
|
PREP(goKneeling);
|
||||||
PREP(hadamardProduct);
|
PREP(hadamardProduct);
|
||||||
|
PREP(handleEngine);
|
||||||
PREP(handleModifierKey);
|
PREP(handleModifierKey);
|
||||||
PREP(handleModifierKeyUp);
|
PREP(handleModifierKeyUp);
|
||||||
PREP(handleScrollWheel);
|
PREP(handleScrollWheel);
|
||||||
|
@ -64,6 +64,7 @@
|
|||||||
["blockSprint", false, []] call FUNC(statusEffect_addType);
|
["blockSprint", false, []] call FUNC(statusEffect_addType);
|
||||||
["setCaptive", true, [QEGVAR(captives,Handcuffed), QEGVAR(captives,Surrendered), QEGVAR(medical,unconscious)]] call FUNC(statusEffect_addType);
|
["setCaptive", true, [QEGVAR(captives,Handcuffed), QEGVAR(captives,Surrendered), QEGVAR(medical,unconscious)]] call FUNC(statusEffect_addType);
|
||||||
["blockDamage", false, ["fixCollision"]] call FUNC(statusEffect_addType);
|
["blockDamage", false, ["fixCollision"]] call FUNC(statusEffect_addType);
|
||||||
|
["blockEngine", false, ["ACE_Refuel"]] call FUNC(statusEffect_addType);
|
||||||
|
|
||||||
["forceWalk", {
|
["forceWalk", {
|
||||||
params ["_object", "_set"];
|
params ["_object", "_set"];
|
||||||
@ -90,6 +91,11 @@
|
|||||||
_object allowDamage (_set == 0);
|
_object allowDamage (_set == 0);
|
||||||
};
|
};
|
||||||
}] call FUNC(addEventHandler);
|
}] call FUNC(addEventHandler);
|
||||||
|
["blockEngine", {
|
||||||
|
params ["_vehicle", "_set"];
|
||||||
|
_vehicle setVariable [QGVAR(blockEngine), _set > 0, true];
|
||||||
|
_vehicle engineOn false;
|
||||||
|
}] call FUNC(addEventHandler);
|
||||||
|
|
||||||
//Add a fix for BIS's zeus remoteControl module not reseting variables on DC when RC a unit
|
//Add a fix for BIS's zeus remoteControl module not reseting variables on DC when RC a unit
|
||||||
//This variable is used for isPlayer checks
|
//This variable is used for isPlayer checks
|
||||||
@ -133,6 +139,7 @@ if (isServer) then {
|
|||||||
["fixFloating", FUNC(fixFloating)] call FUNC(addEventhandler);
|
["fixFloating", FUNC(fixFloating)] call FUNC(addEventhandler);
|
||||||
["fixPosition", FUNC(fixPosition)] call FUNC(addEventhandler);
|
["fixPosition", FUNC(fixPosition)] call FUNC(addEventhandler);
|
||||||
|
|
||||||
|
["loadPersonEvent", FUNC(loadPersonLocal)] call FUNC(addEventhandler);
|
||||||
["unloadPersonEvent", FUNC(unloadPersonLocal)] call FUNC(addEventhandler);
|
["unloadPersonEvent", FUNC(unloadPersonLocal)] call FUNC(addEventhandler);
|
||||||
|
|
||||||
["lockVehicle", {
|
["lockVehicle", {
|
||||||
@ -146,6 +153,7 @@ if (isServer) then {
|
|||||||
|
|
||||||
["setDir", {(_this select 0) setDir (_this select 1)}] call FUNC(addEventhandler);
|
["setDir", {(_this select 0) setDir (_this select 1)}] call FUNC(addEventhandler);
|
||||||
["setFuel", {(_this select 0) setFuel (_this select 1)}] call FUNC(addEventhandler);
|
["setFuel", {(_this select 0) setFuel (_this select 1)}] call FUNC(addEventhandler);
|
||||||
|
["engineOn", {(_this select 0) engineOn (_this select 1)}] call FUNC(addEventhandler);
|
||||||
["setSpeaker", {(_this select 0) setSpeaker (_this select 1)}] call FUNC(addEventhandler);
|
["setSpeaker", {(_this select 0) setSpeaker (_this select 1)}] call FUNC(addEventhandler);
|
||||||
["selectLeader", {(_this select 0) selectLeader (_this select 1)}] call FUNC(addEventHandler);
|
["selectLeader", {(_this select 0) selectLeader (_this select 1)}] call FUNC(addEventHandler);
|
||||||
["setVelocity", {(_this select 0) setVelocity (_this select 1)}] call FUNC(addEventHandler);
|
["setVelocity", {(_this select 0) setVelocity (_this select 1)}] call FUNC(addEventHandler);
|
||||||
@ -325,19 +333,14 @@ enableCamShake true;
|
|||||||
GVAR(OldPlayerVehicle) = vehicle objNull;
|
GVAR(OldPlayerVehicle) = vehicle objNull;
|
||||||
GVAR(OldPlayerTurret) = [objNull] call FUNC(getTurretIndex);
|
GVAR(OldPlayerTurret) = [objNull] call FUNC(getTurretIndex);
|
||||||
GVAR(OldPlayerWeapon) = currentWeapon objNull;
|
GVAR(OldPlayerWeapon) = currentWeapon objNull;
|
||||||
GVAR(OldPlayerInventory) = [objNull] call FUNC(getAllGear);
|
GVAR(OldPlayerInventory) = [];
|
||||||
|
GVAR(OldPlayerInventoryNoAmmo) = [];
|
||||||
GVAR(OldPlayerVisionMode) = currentVisionMode objNull;
|
GVAR(OldPlayerVisionMode) = currentVisionMode objNull;
|
||||||
GVAR(OldCameraView) = "";
|
GVAR(OldCameraView) = "";
|
||||||
GVAR(OldVisibleMap) = false;
|
GVAR(OldVisibleMap) = false;
|
||||||
GVAR(OldInventoryDisplayIsOpen) = nil; //@todo check this
|
GVAR(OldInventoryDisplayIsOpen) = nil; //@todo check this
|
||||||
GVAR(OldIsCamera) = false;
|
GVAR(OldIsCamera) = false;
|
||||||
|
|
||||||
// clean up playerChanged eventhandler from preinit and put it in the same PFH as the other events to reduce overhead and guarantee advantageous execution order
|
|
||||||
if (!isNil QGVAR(PreInit_playerChanged_PFHID)) then {
|
|
||||||
[GVAR(PreInit_playerChanged_PFHID)] call CBA_fnc_removePerFrameHandler;
|
|
||||||
GVAR(PreInit_playerChanged_PFHID) = nil;
|
|
||||||
};
|
|
||||||
|
|
||||||
// PFH to raise varios events
|
// PFH to raise varios events
|
||||||
[{
|
[{
|
||||||
BEGIN_COUNTER(stateChecker);
|
BEGIN_COUNTER(stateChecker);
|
||||||
@ -379,11 +382,36 @@ if (!isNil QGVAR(PreInit_playerChanged_PFHID)) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// "playerInventoryChanged" event
|
// "playerInventoryChanged" event
|
||||||
_data = [ACE_player] call FUNC(getAllGear);
|
_data = getUnitLoadout ACE_player;
|
||||||
if !(_data isEqualTo GVAR(OldPlayerInventory)) then {
|
if !(_data isEqualTo GVAR(OldPlayerInventory)) then {
|
||||||
// Raise ACE event locally
|
// Raise ACE event locally
|
||||||
GVAR(OldPlayerInventory) = _data;
|
GVAR(OldPlayerInventory) = _data;
|
||||||
["playerInventoryChanged", [ACE_player, _data]] call FUNC(localEvent);
|
|
||||||
|
// we don't want to trigger this just because your ammo counter decreased.
|
||||||
|
_data = + GVAR(OldPlayerInventory);
|
||||||
|
|
||||||
|
private _weaponInfo = _data param [0, []];
|
||||||
|
if !(_weaponInfo isEqualTo []) then {
|
||||||
|
_weaponInfo set [4, primaryWeaponMagazine ACE_player];
|
||||||
|
_weaponInfo deleteAt 5;
|
||||||
|
};
|
||||||
|
|
||||||
|
_weaponInfo = _data param [1, []];
|
||||||
|
if !(_weaponInfo isEqualTo []) then {
|
||||||
|
_weaponInfo set [4, secondaryWeaponMagazine ACE_player];
|
||||||
|
_weaponInfo deleteAt 5;
|
||||||
|
};
|
||||||
|
|
||||||
|
_weaponInfo = _data param [2, []];
|
||||||
|
if !(_weaponInfo isEqualTo []) then {
|
||||||
|
_weaponInfo set [4, handgunMagazine ACE_player];
|
||||||
|
_weaponInfo deleteAt 5;
|
||||||
|
};
|
||||||
|
|
||||||
|
if !(_data isEqualTo GVAR(OldPlayerInventoryNoAmmo)) then {
|
||||||
|
GVAR(OldPlayerInventoryNoAmmo) = _data;
|
||||||
|
["playerInventoryChanged", [ACE_player, [ACE_player, false] call FUNC(getAllGear)]] call FUNC(localEvent);
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
// "playerVisionModeChanged" event
|
// "playerVisionModeChanged" event
|
||||||
@ -444,6 +472,11 @@ if (!isNil QGVAR(PreInit_playerChanged_PFHID)) then {
|
|||||||
// Add various canInteractWith conditions
|
// Add various canInteractWith conditions
|
||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
|
["isNotDead", {
|
||||||
|
params ["_unit", "_target"];
|
||||||
|
alive _unit
|
||||||
|
}] call FUNC(addCanInteractWithCondition);
|
||||||
|
|
||||||
["notOnMap", {!visibleMap}] call FUNC(addCanInteractWithCondition);
|
["notOnMap", {!visibleMap}] call FUNC(addCanInteractWithCondition);
|
||||||
|
|
||||||
["isNotInside", {
|
["isNotInside", {
|
||||||
|
@ -46,30 +46,15 @@ if (isServer) then {
|
|||||||
GVAR(statusEffect_Names) = [];
|
GVAR(statusEffect_Names) = [];
|
||||||
GVAR(statusEffect_isGlobal) = [];
|
GVAR(statusEffect_isGlobal) = [];
|
||||||
|
|
||||||
|
GVAR(setHearingCapabilityMap) = [];
|
||||||
|
|
||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
// Set up PlayerChanged eventhandler for pre init
|
// Set up PlayerChanged eventhandler for pre init (EH is installed in postInit)
|
||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
ACE_player = objNull;
|
ACE_player = objNull;
|
||||||
uiNamespace setVariable ["ACE_player", objNull];
|
uiNamespace setVariable ["ACE_player", objNull];
|
||||||
|
|
||||||
// @todo check if this can be removed
|
|
||||||
if (hasInterface) then {
|
|
||||||
// PFH to update the ACE_player variable
|
|
||||||
GVAR(PreInit_playerChanged_PFHID) = [{
|
|
||||||
if !(ACE_player isEqualTo (call FUNC(player))) then {
|
|
||||||
private _oldPlayer = ACE_player;
|
|
||||||
|
|
||||||
ACE_player = call FUNC(player);
|
|
||||||
uiNamespace setVariable ["ACE_player", ACE_player];
|
|
||||||
|
|
||||||
// Raise ACE event
|
|
||||||
["playerChanged", [ACE_player, _oldPlayer]] call FUNC(localEvent);
|
|
||||||
};
|
|
||||||
}, 0, []] call CBA_fnc_addPerFrameHandler;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
// Time handling
|
// Time handling
|
||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
@ -23,7 +23,7 @@ if (isServer) then {
|
|||||||
params ["_eventName", "_client"];
|
params ["_eventName", "_client"];
|
||||||
|
|
||||||
if (!HASH_HASKEY(GVAR(syncedEvents),_eventName)) exitWith {
|
if (!HASH_HASKEY(GVAR(syncedEvents),_eventName)) exitWith {
|
||||||
ACE_LOGERROR("Request for synced event - key not found.");
|
ACE_LOGERROR_1("Request for synced event - key [%1] not found.", _eventName);
|
||||||
false
|
false
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
params ["_name", "_args", "_ttl"];
|
params ["_name", "_args", "_ttl"];
|
||||||
|
|
||||||
if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
|
if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
|
||||||
ACE_LOGERROR("Synced event key not found.");
|
ACE_LOGERROR_1("Synced event key [%1] not found (_handleSyncedEvent).", _name);
|
||||||
false
|
false
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -10,6 +10,9 @@
|
|||||||
* Return Value:
|
* Return Value:
|
||||||
* Boolean of success <BOOL>
|
* Boolean of success <BOOL>
|
||||||
*
|
*
|
||||||
|
* Example:
|
||||||
|
* ["myEvent", {_this call x}, 0] call ace_common_fnc_addSyncedEventHandler
|
||||||
|
*
|
||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
@ -17,7 +20,7 @@
|
|||||||
params ["_name", "_handler", ["_ttl", 0]];
|
params ["_name", "_handler", ["_ttl", 0]];
|
||||||
|
|
||||||
if (HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
|
if (HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
|
||||||
ACE_LOGERROR("Duplicate synced event creation.");
|
ACE_LOGERROR_1("Duplicate synced event [%1] creation.",_name);
|
||||||
false
|
false
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -29,39 +29,17 @@ GVAR(AssignedItemsShownItems) = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
["playerInventoryChanged", {
|
["playerInventoryChanged", {
|
||||||
params ["_unit", "_assignedItems"];
|
params ["_unit"];
|
||||||
|
|
||||||
_assignedItems = _assignedItems select 17;
|
private _assignedItems = getUnitLoadout _unit param [9, ["","","","","",""]]; // ["ItemMap","ItemGPS","ItemRadio","ItemCompass","ItemWatch","NVGoggles"]
|
||||||
|
|
||||||
GVAR(AssignedItemsShownItems) = [true, true, true, true, true];
|
GVAR(AssignedItemsShownItems) = [
|
||||||
|
!((_assignedItems select 0) isEqualTo "") && {getText (configFile >> "CfgWeapons" >> _assignedItems select 0 >> "ACE_hideItemType") != "map"},
|
||||||
{
|
!((_assignedItems select 3) isEqualTo "") && {getText (configFile >> "CfgWeapons" >> _assignedItems select 3 >> "ACE_hideItemType") != "compass"},
|
||||||
if !(_x in GVAR(AssignedItems)) then {
|
!((_assignedItems select 4) isEqualTo "") && {getText (configFile >> "CfgWeapons" >> _assignedItems select 4 >> "ACE_hideItemType") != "watch"},
|
||||||
GVAR(AssignedItems) pushBack _x;
|
!((_assignedItems select 2) isEqualTo "") && {getText (configFile >> "CfgWeapons" >> _assignedItems select 2 >> "ACE_hideItemType") != "radio"},
|
||||||
GVAR(AssignedItemsInfo) pushBack toLower getText (configFile >> "CfgWeapons" >> _x >> "ACE_hideItemType");
|
!((_assignedItems select 1) isEqualTo "") && {getText (configFile >> "CfgWeapons" >> _assignedItems select 1 >> "ACE_hideItemType") != "gps"}
|
||||||
};
|
];
|
||||||
|
|
||||||
switch (GVAR(AssignedItemsInfo) select (GVAR(AssignedItems) find _x)) do {
|
|
||||||
case ("map"): {
|
|
||||||
GVAR(AssignedItemsShownItems) set [0, false];
|
|
||||||
};
|
|
||||||
case ("compass"): {
|
|
||||||
GVAR(AssignedItemsShownItems) set [1, false];
|
|
||||||
};
|
|
||||||
case ("watch"): {
|
|
||||||
GVAR(AssignedItemsShownItems) set [2, false];
|
|
||||||
};
|
|
||||||
case ("radio"): {
|
|
||||||
GVAR(AssignedItemsShownItems) set [3, false];
|
|
||||||
};
|
|
||||||
case ("gps"): {
|
|
||||||
GVAR(AssignedItemsShownItems) set [4, false];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
false
|
|
||||||
} count _assignedItems;
|
|
||||||
|
|
||||||
//systemChat str GVAR(AssignedItemsShownItems);
|
|
||||||
|
|
||||||
GVAR(AssignedItemsShownItems) params ["_showMap", "_showCompass", "_showWatch", "_showRadio", "_showGPS"];
|
GVAR(AssignedItemsShownItems) params ["_showMap", "_showCompass", "_showWatch", "_showRadio", "_showGPS"];
|
||||||
|
|
||||||
|
@ -12,12 +12,11 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
params ["_function"];
|
params ["_code"];
|
||||||
|
if (_code isEqualType "") exitWith {_code};
|
||||||
|
|
||||||
if (_function isEqualType "") exitWith {_function};
|
_code = str(_code);
|
||||||
|
_code = _code select [1, count _code - 2];
|
||||||
|
|
||||||
_function = toArray str _function;
|
_code
|
||||||
_function deleteAt 0;
|
|
||||||
_function deleteAt (count _function - 1);
|
|
||||||
|
|
||||||
toString _function // return
|
|
||||||
|
@ -92,6 +92,15 @@ while {_rangeToCheck < _maxDistance} do {
|
|||||||
private _point1ASL = (AGLtoASL _roundAGL) vectorAdd [_radiusOfItem * cos _angle, _radiusOfItem * sin _angle, 0.1];
|
private _point1ASL = (AGLtoASL _roundAGL) vectorAdd [_radiusOfItem * cos _angle, _radiusOfItem * sin _angle, 0.1];
|
||||||
private _point2ASL = (AGLtoASL _roundAGL) vectorAdd [-_radiusOfItem * cos _angle, -_radiusOfItem * sin _angle, (_radiusOfItem + 0.5)];
|
private _point2ASL = (AGLtoASL _roundAGL) vectorAdd [-_radiusOfItem * cos _angle, -_radiusOfItem * sin _angle, (_radiusOfItem + 0.5)];
|
||||||
private _testIntersections = lineIntersectsSurfaces [_point1ASL, _point2ASL];
|
private _testIntersections = lineIntersectsSurfaces [_point1ASL, _point2ASL];
|
||||||
|
if (((count _testIntersections) == 1) && {isNull ((_testIntersections select 0) select 2)}) then {
|
||||||
|
private _hitGroundASL = (_testIntersections select 0) select 0;
|
||||||
|
private _hitHeightOffset = ((AGLtoASL _roundAGL) select 2) - (_hitGroundASL select 2);
|
||||||
|
private _hit2dOffset = _roundAGL distance2D _hitGroundASL;
|
||||||
|
private _slope = _hitHeightOffset atan2 _hit2dOffset;
|
||||||
|
if (_slope < 25) then { //Ignore ground hit if slope is reasonable
|
||||||
|
_testIntersections = [];
|
||||||
|
};
|
||||||
|
};
|
||||||
if (!(_testIntersections isEqualTo [])) exitWith {
|
if (!(_testIntersections isEqualTo [])) exitWith {
|
||||||
TRACE_2("collision low/high",_roundAGL,_testIntersections);
|
TRACE_2("collision low/high",_roundAGL,_testIntersections);
|
||||||
_roundPointIsValid = false;
|
_roundPointIsValid = false;
|
||||||
|
@ -33,7 +33,11 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
params ["_unit"];
|
params ["_unit", ["_showDeprecated", true]];
|
||||||
|
|
||||||
|
if (_showDeprecated) then {
|
||||||
|
ACE_DEPRECATED("ace_common_fnc_getAllGear","3.7.0","getUnitLoadout");
|
||||||
|
};
|
||||||
|
|
||||||
if (isNull _unit) exitWith {[
|
if (isNull _unit) exitWith {[
|
||||||
"",
|
"",
|
||||||
|
@ -22,27 +22,81 @@ private _long = getNumber (configFile >> "CfgWorlds" >> _map >> "longitude");
|
|||||||
private _lat = getNumber (configFile >> "CfgWorlds" >> _map >> "latitude");
|
private _lat = getNumber (configFile >> "CfgWorlds" >> _map >> "latitude");
|
||||||
private _altitude = getNumber (configFile >> "CfgWorlds" >> _map >> "elevationOffset");
|
private _altitude = getNumber (configFile >> "CfgWorlds" >> _map >> "elevationOffset");
|
||||||
|
|
||||||
if (_map in ["Chernarus", "Bootcamp_ACR", "Woodland_ACR", "utes"]) then { _lat = 50; _altitude = 0; };
|
_map = toLower _map;
|
||||||
if (_map in ["Altis", "Stratis"]) then { _lat = 40; _altitude = 0; };
|
if (_map in ["abbottabad"]) then { _lat = 34; _altitude = 1256; }; //Abbottabad elevation 1256m (Wikipedia)
|
||||||
if (_map in ["Takistan", "Zargabad", "Mountains_ACR"]) then { _lat = 35; _altitude = 2000; };
|
if (_map in ["abramia"]) then { _lat = 60; _altitude = 0; };
|
||||||
if (_map in ["Shapur_BAF", "ProvingGrounds_PMC"]) then { _lat = 35; _altitude = 100; };
|
if (_map in ["af_kandahar_province"]) then { _lat = 42; _altitude = 0; };
|
||||||
|
if (_map in ["altis"]) then { _lat = 40; _altitude = 0; };
|
||||||
|
if (_map in ["angel"]) then { _lat = 38; _altitude = 0; };
|
||||||
|
if (_map in ["anim_helvantis_v2"]) then { _lat = 50; _altitude = 0; };
|
||||||
|
if (_map in ["australia"]) then { _lat = -25; _altitude = 0; };
|
||||||
|
if (_map in ["bootcamp_acr"]) then { _lat = 50; _altitude = 0; };
|
||||||
|
if (_map in ["bornholm"]) then { _lat = 55; _altitude = 0; };
|
||||||
|
if (_map in ["bozcaada"]) then { _lat = 40; _altitude = 0; };
|
||||||
|
if (_map in ["caribou"]) then { _lat = 68; _altitude = 0; };
|
||||||
|
if (_map in ["catalina"]) then { _lat = 33; _altitude = 0; };
|
||||||
|
if (_map in ["chernarus", "chernarus_summer", "chernarus_winter"]) then { _lat = 50; _altitude = 0; };
|
||||||
|
if (_map in ["chernobylzone", "chernobylzonea2"]) then { _lat = 51; _altitude = 0; };
|
||||||
|
if (_map in ["clafghan"]) then { _lat = 34; _altitude = 640; };
|
||||||
|
if (_map in ["dakrong"]) then { _lat = 17; _altitude = 0; }; //Unsung Mod
|
||||||
|
if (_map in ["desert_e"]) then { _lat = 40; _altitude = 800; };
|
||||||
|
if (_map in ["dya"]) then { _lat = 34; _altitude = 110; }; //Diyala Iraq - default elevationOffset
|
||||||
|
if (_map in ["esseker"]) then { _lat = 43; _altitude = 2000; };
|
||||||
|
if (_map in ["evergreen"]) then { _lat = 41; _altitude = 0; }; //Burgazada, Turkey - default elevationOffset
|
||||||
if (_map in ["fallujah"]) then { _lat = 33; _altitude = 0; };
|
if (_map in ["fallujah"]) then { _lat = 33; _altitude = 0; };
|
||||||
if (_map in ["fata", "Abbottabad"]) then { _lat = 30; _altitude = 1000; };
|
if (_map in ["fata"]) then { _lat = 33; _altitude = 1347; };
|
||||||
if (_map in ["sfp_wamako"]) then { _lat = 14; _altitude = 0; };
|
if (_map in ["gorgona"]) then { _lat = 43; _altitude = 0; };
|
||||||
if (_map in ["sfp_sturko"]) then { _lat = 56; _altitude = 0; };
|
if (_map in ["hellskitchen", "hellskitchens"]) then { _lat = 32; _altitude = 900; }; //Sangin summer, Sangin winter - Sangin elevation 888m (Wikipedia)
|
||||||
if (_map in ["Bornholm"]) then { _lat = 55; _altitude = 0; };
|
if (_map in ["hindukush"]) then { _lat = 36; _altitude = 0; };
|
||||||
if (_map in ["Imrali"]) then { _lat = 40; _altitude = 0; };
|
if (_map in ["imrali", "imralispring"]) then { _lat = 40; _altitude = 0; };
|
||||||
if (_map in ["Caribou"]) then { _lat = 68; _altitude = 0; };
|
if (_map in ["intro"]) then { _lat = 40; _altitude = 0; };
|
||||||
if (_map in ["Namalsk"]) then { _lat = 65; _altitude = 0; };
|
if (_map in ["isladuala3"]) then { _lat = -19; _altitude = 0; };
|
||||||
if (_map in ["MCN_Aliabad"]) then { _lat = 36; _altitude = 0; };
|
if (_map in ["jacobi"]) then { _lat = 34; _altitude = 2000; }; //default elevationOffset
|
||||||
if (_map in ["Clafghan"]) then { _lat = 34; _altitude = 640; };
|
if (_map in ["kapaulio"]) then { _lat = 0; _altitude = 0; };
|
||||||
if (_map in ["Sangin", "hellskitchen"]) then { _lat = 32; _altitude = 0; };
|
if (_map in ["kerama"]) then { _lat = 26; _altitude = 0; }; //Kerama Islands, Japan - default elevationOffset
|
||||||
if (_map in ["Sara"]) then { _lat = 40; _altitude = 0; };
|
if (_map in ["kholm"]) then { _lat = 36; _altitude = 0; };
|
||||||
|
if (_map in ["koplic"]) then { _lat = 42; _altitude = 0; };
|
||||||
|
if (_map in ["kunduz"]) then { _lat = 37; _altitude = 0; };
|
||||||
|
if (_map in ["lingor", "lingor3"]) then { _lat = -4; _altitude = 0; };
|
||||||
|
if (_map in ["lost", "lostw"]) then { _lat = 60; _altitude = 0; };
|
||||||
|
if (_map in ["mcn_aliabad"]) then { _lat = 36; _altitude = 0; };
|
||||||
|
if (_map in ["malvinas"]) then { _lat = -52; _altitude = 0; };
|
||||||
|
if (_map in ["namalsk"]) then { _lat = 65; _altitude = 0; };
|
||||||
|
if (_map in ["mef_alaska"]) then { _lat = 60; _altitude = 5; };
|
||||||
|
if (_map in ["mountains_acr"]) then { _lat = 35; _altitude = 2000; };
|
||||||
|
if (_map in ["napf", "napfwinter"]) then { _lat = 47; _altitude = 0; };
|
||||||
|
if (_map in ["panthera3"]) then { _lat = 46; _altitude = 0; };
|
||||||
|
if (_map in ["pianosa_aut"]) then { _lat = 43; _altitude = 0; }; //Pianosa, Italy - default elevationOffset
|
||||||
|
if (_map in ["pja305"]) then { _lat = 0; _altitude = 0; }; //G.O.S N'Ziwasogo
|
||||||
|
if (_map in ["pja306"]) then { _lat = 35; _altitude = 0; }; //G.O.S Kalu Khan
|
||||||
|
if (_map in ["pja307"]) then { _lat = 17; _altitude = 0; }; //F.S.F Daryah
|
||||||
|
if (_map in ["pja308"]) then { _lat = 36; _altitude = 0; }; //G.O.S Gunkizli
|
||||||
|
if (_map in ["pja310"]) then { _lat = 36; _altitude = 0; }; //G.O.S Al Rayak
|
||||||
|
if (_map in ["pja312"]) then { _lat = 16; _altitude = 0; }; //G.O.S Song Bin Tanh
|
||||||
|
if (_map in ["porquerolles"]) then { _lat = 43; _altitude = 0; };
|
||||||
|
if (_map in ["porto"]) then { _lat = 40; _altitude = 0; };
|
||||||
|
if (_map in ["provinggrounds_pmc"]) then { _lat = 35; _altitude = 100; };
|
||||||
if (_map in ["reshmaan"]) then { _lat = 35; _altitude = 2000; };
|
if (_map in ["reshmaan"]) then { _lat = 35; _altitude = 2000; };
|
||||||
if (_map in ["Thirsk"]) then { _lat = 65; _altitude = 0; };
|
if (_map in ["sara", "sara_dbe1"]) then { _lat = 40; _altitude = 0; };
|
||||||
if (_map in ["lingor"]) then { _lat = -4; _altitude = 0; };
|
if (_map in ["saralite"]) then { _lat = 40; _altitude = 0; };
|
||||||
if (_map in ["Panthera3"]) then { _lat = 46; _altitude = 0; };
|
if (_map in ["sb3"]) then { _lat = 53; _altitude = 25; }; //TrpUebPl Einfelde Nord (Munster North Training Area, Germany) - default elevationOffset
|
||||||
if (_map in ["Kunduz"]) then { _lat = 37; _altitude = 400; };
|
if (_map in ["shapur_baf"]) then { _lat = 35; _altitude = 100; };
|
||||||
|
if (_map in ["sfp_sturko"]) then { _lat = 56; _altitude = 0; };
|
||||||
|
if (_map in ["sfp_wamako"]) then { _lat = 14; _altitude = 0; };
|
||||||
|
if (_map in ["stratis"]) then { _lat = 40; _altitude = 0; };
|
||||||
|
if (_map in ["sugarlake"]) then { _lat = 29; _altitude = 0; };
|
||||||
|
if (_map in ["takistan"]) then { _lat = 35; _altitude = 2000; };
|
||||||
|
if (_map in ["thirsk"]) then { _lat = 65; _altitude = 0; };
|
||||||
|
if (_map in ["tilos"]) then { _lat = 36; _altitude = 0; };
|
||||||
|
if (_map in ["utes"]) then { _lat = 50; _altitude = 0; };
|
||||||
|
if (_map in ["vt5"]) then { _lat = 61; _altitude = 100; }; //Vt5, Suomi Finland - default elevationOffset
|
||||||
|
if (_map in ["wake"]) then { _lat = 19; _altitude = 0; };
|
||||||
|
if (_map in ["waziristan"]) then { _lat = 33; _altitude = 0; };
|
||||||
|
if (_map in ["wintermap"]) then { _lat = 61; _altitude = 0; }; //Nordkvingo - default elevationOffset
|
||||||
|
if (_map in ["wintertown", "wintertowna3"]) then { _lat = 39; _altitude = 600; }; //U.S. state Kansas mean elevation 610m (Wikipedia)
|
||||||
|
if (_map in ["woodland_acr"]) then { _lat = 50; _altitude = 0; };
|
||||||
|
if (_map in ["xcam_prototype"]) then { _lat = 35; _altitude = 0; };
|
||||||
|
if (_map in ["zargabad"]) then { _lat = 35; _altitude = 2000; };
|
||||||
|
|
||||||
private _UTM = [_long,_lat] call BIS_fnc_posDegToUTM;
|
private _UTM = [_long,_lat] call BIS_fnc_posDegToUTM;
|
||||||
private _easting = _UTM select 0;
|
private _easting = _UTM select 0;
|
||||||
|
@ -14,19 +14,4 @@
|
|||||||
|
|
||||||
params [["_vehicle", objNull, [objNull]]];
|
params [["_vehicle", objNull, [objNull]]];
|
||||||
|
|
||||||
private _turrets = allTurrets [_vehicle, true];
|
fullCrew [_vehicle, "commander", true] apply {_x select 3} param [0, []] // return
|
||||||
|
|
||||||
private _turret = [];
|
|
||||||
|
|
||||||
{
|
|
||||||
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
|
||||||
|
|
||||||
_config = [_config, _x] call FUNC(getTurretConfigPath);
|
|
||||||
|
|
||||||
if (getNumber (_config >> "primaryObserver") == 1) exitWith {
|
|
||||||
_turret = _x;
|
|
||||||
};
|
|
||||||
false
|
|
||||||
} count _turrets;
|
|
||||||
|
|
||||||
_turret
|
|
||||||
|
@ -14,19 +14,6 @@
|
|||||||
|
|
||||||
params [["_vehicle", objNull, [objNull]]];
|
params [["_vehicle", objNull, [objNull]]];
|
||||||
|
|
||||||
private _turrets = allTurrets [_vehicle, true];
|
fullCrew [_vehicle, "turret", true] apply {_x select 3} select {
|
||||||
|
getNumber ([_vehicle, _x] call CBA_fnc_getTurret >> "isCopilot") == 1
|
||||||
private _turret = [];
|
} param [0, []] // return
|
||||||
|
|
||||||
{
|
|
||||||
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
|
||||||
|
|
||||||
_config = [_config, _x] call FUNC(getTurretConfigPath);
|
|
||||||
|
|
||||||
if (getNumber (_config >> "isCopilot") == 1 && {getNumber (_config >> "primaryGunner") != 1} && {getNumber (_config >> "primaryObserver") != 1}) exitWith {
|
|
||||||
_turret = _x;
|
|
||||||
};
|
|
||||||
false
|
|
||||||
} count _turrets;
|
|
||||||
|
|
||||||
_turret
|
|
||||||
|
@ -14,19 +14,4 @@
|
|||||||
|
|
||||||
params [["_vehicle", objNull, [objNull]]];
|
params [["_vehicle", objNull, [objNull]]];
|
||||||
|
|
||||||
private _turrets = allTurrets [_vehicle, true];
|
fullCrew [_vehicle, "gunner", true] apply {_x select 3} param [0, []] // return
|
||||||
|
|
||||||
private _turret = [];
|
|
||||||
|
|
||||||
{
|
|
||||||
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
|
||||||
|
|
||||||
_config = [_config, _x] call FUNC(getTurretConfigPath);
|
|
||||||
|
|
||||||
if (getNumber (_config >> "primaryGunner") == 1) exitWith {
|
|
||||||
_turret = _x;
|
|
||||||
};
|
|
||||||
false
|
|
||||||
} count _turrets;
|
|
||||||
|
|
||||||
_turret
|
|
||||||
|
@ -8,12 +8,14 @@
|
|||||||
* Return Value:
|
* Return Value:
|
||||||
* Turret Indecies <ARRAY>
|
* Turret Indecies <ARRAY>
|
||||||
*
|
*
|
||||||
* Public: Yes
|
* Public: No
|
||||||
*
|
*
|
||||||
* Note: It's advised to use allTurrets [_vehicle, true] instead whenever possible
|
* Note: It's advised to use allTurrets [_vehicle, true] instead whenever possible
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
ACE_DEPRECATED("ace_common_fnc_getTurrets","3.7.0","allTurrets [_vehicle, true]");
|
||||||
|
|
||||||
params ["_type"];
|
params ["_type"];
|
||||||
|
|
||||||
private _varName = format [QGVAR(CachedTurrets_%1), _type];
|
private _varName = format [QGVAR(CachedTurrets_%1), _type];
|
||||||
|
@ -14,19 +14,4 @@
|
|||||||
|
|
||||||
params [["_vehicle", objNull, [objNull]]];
|
params [["_vehicle", objNull, [objNull]]];
|
||||||
|
|
||||||
private _turrets = allTurrets [_vehicle, true];
|
fullCrew [_vehicle, "turret", true] select {_x select 4} apply {_x select 3} // return
|
||||||
|
|
||||||
private _turret = [];
|
|
||||||
|
|
||||||
{
|
|
||||||
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
|
||||||
|
|
||||||
_config = [_config, _x] call FUNC(getTurretConfigPath);
|
|
||||||
|
|
||||||
if (getNumber (_config >> "isPersonTurret") == 1) then {
|
|
||||||
_turret pushBack _x;
|
|
||||||
};
|
|
||||||
false
|
|
||||||
} count _turrets;
|
|
||||||
|
|
||||||
_turret
|
|
||||||
|
@ -14,24 +14,6 @@
|
|||||||
|
|
||||||
params [["_vehicle", objNull, [objNull]]];
|
params [["_vehicle", objNull, [objNull]]];
|
||||||
|
|
||||||
private _turrets = allTurrets [_vehicle, true];
|
fullCrew [_vehicle, "turret", true] select {!(_x select 4)} apply {_x select 3} select {
|
||||||
|
getNumber ([_vehicle, _x] call CBA_fnc_getTurret >> "isCopilot") != 1
|
||||||
private _turret = [];
|
} // return
|
||||||
|
|
||||||
{
|
|
||||||
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
|
||||||
|
|
||||||
_config = [_config, _x] call FUNC(getTurretConfigPath);
|
|
||||||
|
|
||||||
if (
|
|
||||||
getNumber (_config >> "isCopilot") != 1
|
|
||||||
&& {getNumber (_config >> "primaryGunner") != 1}
|
|
||||||
&& {getNumber (_config >> "primaryObserver") != 1}
|
|
||||||
&& {getNumber (_config >> "isPersonTurret") != 1}
|
|
||||||
) then {
|
|
||||||
_turret pushBack _x;
|
|
||||||
};
|
|
||||||
false
|
|
||||||
} count _turrets;
|
|
||||||
|
|
||||||
_turret
|
|
||||||
|
@ -18,7 +18,7 @@ private _muzzles = getArray (configFile >> "CfgWeapons" >> _weapon >> "muzzles")
|
|||||||
|
|
||||||
{
|
{
|
||||||
if (_x == "this") then {
|
if (_x == "this") then {
|
||||||
_muzzles set [_forEachIndex, _weapon];
|
_muzzles set [_forEachIndex, configName (configFile >> "CfgWeapons" >> _weapon)];
|
||||||
};
|
};
|
||||||
} forEach _muzzles;
|
} forEach _muzzles;
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: unit <OBJECT>
|
* 0: unit <OBJECT>
|
||||||
* 1: weapon <STRING>
|
* 1: weapon (optional, default: units current weapon) <STRING>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* 0: Attachements <ARRAY>
|
* 0: Attachements <ARRAY>
|
||||||
@ -16,21 +16,19 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
params ["_unit", "_weapon"];
|
params [["_unit", objNull, [objNull]], ["_weapon", nil, [""]]];
|
||||||
|
|
||||||
|
if (isNil "_weapon") then {
|
||||||
|
_weapon = currentWeapon _unit;
|
||||||
|
};
|
||||||
|
|
||||||
|
private _attachments = [_unit weaponAccessories _weapon] param [0, ["","","",""]];
|
||||||
|
|
||||||
private _muzzles = _weapon call FUNC(getWeaponMuzzles);
|
private _muzzles = _weapon call FUNC(getWeaponMuzzles);
|
||||||
|
|
||||||
private _weaponInfo = [["","","",""], primaryWeaponItems _unit, secondaryWeaponItems _unit, handgunItems _unit] select ((["", primaryWeapon _unit, secondaryWeapon _unit, handgunWeapon _unit] find _weapon) max 0);
|
|
||||||
|
|
||||||
// get loaded magazines and ammo
|
// get loaded magazines and ammo
|
||||||
private _magazines = [];
|
private _magazines = _muzzles apply {""};
|
||||||
private _ammo = [];
|
private _ammo = _muzzles apply {0};
|
||||||
|
|
||||||
{
|
|
||||||
_magazines pushBack "";
|
|
||||||
_ammo pushBack 0;
|
|
||||||
false
|
|
||||||
} count _muzzles;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
if (_x select 2) then {
|
if (_x select 2) then {
|
||||||
@ -44,6 +42,4 @@ private _ammo = [];
|
|||||||
false
|
false
|
||||||
} count magazinesAmmoFull _unit;
|
} count magazinesAmmoFull _unit;
|
||||||
|
|
||||||
_weaponInfo append [_muzzles, _magazines, _ammo];
|
[_attachments, _muzzles, _magazines, _ammo];
|
||||||
|
|
||||||
_weaponInfo
|
|
||||||
|
19
addons/common/functions/fnc_handleEngine.sqf
Normal file
19
addons/common/functions/fnc_handleEngine.sqf
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
/*
|
||||||
|
* Author: BaerMitUmlaut
|
||||||
|
* Blocks turning on the vehicles engine if set by the status effect handler.
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Vehicle <OBJECT>
|
||||||
|
* 1: Engine state <BOOL>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
#include "script_component.hpp"
|
||||||
|
params ["_vehicle", "_engineOn"];
|
||||||
|
|
||||||
|
if (local _vehicle && {_engineOn} && {_vehicle getVariable [QGVAR(blockEngine), false]}) then {
|
||||||
|
_vehicle engineOn false;
|
||||||
|
};
|
@ -21,33 +21,18 @@ private _vehicle = objNull;
|
|||||||
|
|
||||||
if (!([_caller, _unit, ["isNotDragging", "isNotCarrying"]] call FUNC(canInteractWith)) || {_caller == _unit}) exitWith {_vehicle};
|
if (!([_caller, _unit, ["isNotDragging", "isNotCarrying"]] call FUNC(canInteractWith)) || {_caller == _unit}) exitWith {_vehicle};
|
||||||
|
|
||||||
private _loadcar = nearestObject [_unit, "Car"];
|
private _nearVehicles = nearestObjects [_unit, ["Car", "Air", "Tank", "Ship_F"], 10];
|
||||||
|
|
||||||
if (_unit distance _loadcar <= 10) then {
|
{
|
||||||
_vehicle = _loadcar;
|
TRACE_1("",_x);
|
||||||
} else {
|
if ((_x emptyPositions "cargo" > 0) || {_x emptyPositions "gunner" > 0}) exitWith {
|
||||||
private _loadair = nearestObject [_unit, "Air"];
|
_vehicle = _x;
|
||||||
|
|
||||||
if (_unit distance _loadair <= 10) then {
|
|
||||||
_vehicle = _loadair;
|
|
||||||
} else {
|
|
||||||
private _loadtank = nearestObject [_unit, "Tank"];
|
|
||||||
|
|
||||||
if (_unit distance _loadtank <= 10) then {
|
|
||||||
_vehicle = _loadtank;
|
|
||||||
} else {
|
|
||||||
private _loadboat = nearestObject [_unit, "Ship_F"];
|
|
||||||
|
|
||||||
if (_unit distance _loadboat <= 10) then {
|
|
||||||
_vehicle = _loadboat;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
} forEach _nearVehicles;
|
||||||
|
|
||||||
if (!isNull _vehicle) then {
|
if (!isNull _vehicle) then {
|
||||||
[_unit, true, GROUP_SWITCH_ID, side group _caller] call FUNC(switchToGroupSide);
|
[_unit, true, GROUP_SWITCH_ID, side group _caller] call FUNC(switchToGroupSide);
|
||||||
[[_unit, _vehicle, _caller], QFUNC(loadPersonLocal), _unit, false] call FUNC(execRemoteFnc);
|
["loadPersonEvent", _unit, [_unit, _vehicle, _caller]] call FUNC(objectEvent);
|
||||||
};
|
};
|
||||||
|
|
||||||
_vehicle
|
_vehicle
|
||||||
|
@ -34,7 +34,7 @@ createDialog QGVAR(ProgressBar_Dialog);
|
|||||||
|
|
||||||
//Adjust position based on user setting:
|
//Adjust position based on user setting:
|
||||||
private _ctrlPos = ctrlPosition (uiNamespace getVariable QGVAR(ctrlProgressBarTitle));
|
private _ctrlPos = ctrlPosition (uiNamespace getVariable QGVAR(ctrlProgressBarTitle));
|
||||||
_ctrlPos set [1, ((0 + 29 * GVAR(SettingProgressBarLocation)) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2))];
|
_ctrlPos set [1, ((0 + 29 * GVAR(settingProgressBarLocation)) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2))];
|
||||||
|
|
||||||
(uiNamespace getVariable QGVAR(ctrlProgressBG)) ctrlSetPosition _ctrlPos;
|
(uiNamespace getVariable QGVAR(ctrlProgressBG)) ctrlSetPosition _ctrlPos;
|
||||||
(uiNamespace getVariable QGVAR(ctrlProgressBG)) ctrlCommit 0;
|
(uiNamespace getVariable QGVAR(ctrlProgressBG)) ctrlCommit 0;
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
params ["_name"];
|
params ["_name"];
|
||||||
|
|
||||||
if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
|
if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
|
||||||
ACE_LOGERROR("Synced event key not found.");
|
ACE_LOGERROR_1("Synced event key [%1] not found (removeSyncedEventHandler).", _name);
|
||||||
false
|
false
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
ACE_DEPRECATED("ace_common_fnc_setAllGear","3.7.0","setUnitLoadout");
|
||||||
|
|
||||||
params ["_unit", "_allGear", ["_clearAttachments", false], ["_clearBackpack", false]];
|
params ["_unit", "_allGear", ["_clearAttachments", false], ["_clearBackpack", false]];
|
||||||
|
|
||||||
if (!local _unit) exitWith {
|
if (!local _unit) exitWith {
|
||||||
|
@ -5,48 +5,44 @@
|
|||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: id <STRING>
|
* 0: id <STRING>
|
||||||
* 1: settings <NUMBER>
|
* 1: settings <NUMBER>
|
||||||
* 2: add (default: true) <BOOL>
|
* 2: add [true] OR remove [false] (default: true) <BOOL>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* None
|
* None
|
||||||
*
|
*
|
||||||
* Public: Yes
|
* Example:
|
||||||
|
* ["earwax", 0.5, true] call ace_common_fnc_setHearingCapability
|
||||||
*
|
*
|
||||||
* Note: uses player
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
params ["_id", "_settings", ["_add", true]];
|
params ["_id", "_setting", ["_add", true]];
|
||||||
|
|
||||||
private _map = missionNamespace getVariable [QGVAR(setHearingCapabilityMap),[]];
|
|
||||||
|
|
||||||
private _exists = false;
|
private _exists = false;
|
||||||
|
|
||||||
{
|
|
||||||
if (_id == _x select 0) exitWith {
|
|
||||||
_exists = true;
|
|
||||||
if (_add) then {
|
|
||||||
_x set [1, _settings];
|
|
||||||
} else {
|
|
||||||
_map set [_forEachIndex, 0];
|
|
||||||
_map = _map - [0];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
} forEach _map;
|
|
||||||
|
|
||||||
if (!_exists && _add) then {
|
|
||||||
_map pushBack [_id, _settings];
|
|
||||||
};
|
|
||||||
|
|
||||||
missionNamespace setVariable [QGVAR(setHearingCapabilityMap), _map];
|
|
||||||
|
|
||||||
// find lowest volume
|
|
||||||
private _lowestVolume = 1;
|
private _lowestVolume = 1;
|
||||||
|
|
||||||
{
|
GVAR(setHearingCapabilityMap) = GVAR(setHearingCapabilityMap) select {
|
||||||
_lowestVolume = (_x select 1) min _lowestVolume;
|
_x params ["_xID", "_xSetting"];
|
||||||
|
if (_id == _xID) then {
|
||||||
|
_exists = true;
|
||||||
|
if (_add) then {
|
||||||
|
_x set [1, _setting];
|
||||||
|
_lowestVolume = _lowestVolume min _setting;
|
||||||
|
true
|
||||||
|
} else {
|
||||||
false
|
false
|
||||||
} count _map;
|
};
|
||||||
|
} else {
|
||||||
|
_lowestVolume = _lowestVolume min _xSetting;
|
||||||
|
true
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
if (!_exists && _add) then {
|
||||||
|
_lowestVolume = _lowestVolume min _setting;
|
||||||
|
GVAR(setHearingCapabilityMap) pushBack [_id, _setting];
|
||||||
|
};
|
||||||
|
|
||||||
// in game sounds
|
// in game sounds
|
||||||
0 fadeSound _lowestVolume;
|
0 fadeSound _lowestVolume;
|
||||||
@ -54,5 +50,5 @@ private _lowestVolume = 1;
|
|||||||
0 fadeMusic _lowestVolume;
|
0 fadeMusic _lowestVolume;
|
||||||
|
|
||||||
// Set Radio mod variables.
|
// Set Radio mod variables.
|
||||||
player setVariable ["tf_globalVolume", _lowestVolume];
|
ACE_player setVariable ["tf_globalVolume", _lowestVolume];
|
||||||
if (!isNil "acre_api_fnc_setGlobalVolume") then { [_lowestVolume^0.33] call acre_api_fnc_setGlobalVolume; };
|
if (!isNil "acre_api_fnc_setGlobalVolume") then { [_lowestVolume^0.33] call acre_api_fnc_setGlobalVolume; };
|
||||||
|
@ -20,12 +20,6 @@ if (_unit isKindOf "CAManBase") then {
|
|||||||
private _sanitizedName = [name _unit, true] call FUNC(sanitizeString);
|
private _sanitizedName = [name _unit, true] call FUNC(sanitizeString);
|
||||||
private _rawName = [name _unit, false] call FUNC(sanitizeString);
|
private _rawName = [name _unit, false] call FUNC(sanitizeString);
|
||||||
|
|
||||||
//Debug Testing Code (with html tags):
|
|
||||||
// private _sanitizedName = ["<TAG>Name", true] call FUNC(sanitizeString);
|
|
||||||
// private _rawName = ["<TAG>Name", false] call FUNC(sanitizeString);
|
|
||||||
|
|
||||||
//if (_name != _unit getVariable ["ACE_Name", ""]) then {
|
|
||||||
_unit setVariable ["ACE_Name", _sanitizedName, true];
|
_unit setVariable ["ACE_Name", _sanitizedName, true];
|
||||||
_unit setVariable ["ACE_NameRaw", _rawName, true];
|
_unit setVariable ["ACE_NameRaw", _rawName, true];
|
||||||
//};
|
|
||||||
};
|
};
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
params ["_name", "_args", ["_ttl", 0]];
|
params ["_name", "_args", ["_ttl", 0]];
|
||||||
|
|
||||||
if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
|
if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
|
||||||
ACE_LOGERROR("Synced event key not found.");
|
ACE_LOGERROR_1("Synced event key [%1] not found (syncedEvent).", _name);
|
||||||
false
|
false
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -802,6 +802,7 @@
|
|||||||
<Italian>Non c'è spazio per scaricare</Italian>
|
<Italian>Non c'è spazio per scaricare</Italian>
|
||||||
<Spanish>No hay espacio para descargar.</Spanish>
|
<Spanish>No hay espacio para descargar.</Spanish>
|
||||||
<French>Pas de place pour décharger</French>
|
<French>Pas de place pour décharger</French>
|
||||||
|
<Czech>Nedostatek místa k vyložení</Czech>
|
||||||
</Key>
|
</Key>
|
||||||
</Package>
|
</Package>
|
||||||
</Project>
|
</Project>
|
@ -86,7 +86,7 @@ class CfgVehicles {
|
|||||||
selection = "";
|
selection = "";
|
||||||
displayName = "$STR_ACE_UNROLLWIRE";
|
displayName = "$STR_ACE_UNROLLWIRE";
|
||||||
distance = 5;
|
distance = 5;
|
||||||
condition = "true";
|
condition = "alive _target";
|
||||||
statement = QUOTE([ARR_2(_target,_player)] call FUNC(dismount));
|
statement = QUOTE([ARR_2(_target,_player)] call FUNC(dismount));
|
||||||
showDisabled = 0;
|
showDisabled = 0;
|
||||||
exceptions[] = {};
|
exceptions[] = {};
|
||||||
|
@ -14,13 +14,17 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
params ["_wire", "_killer"];
|
params ["_wire", "_killer"];
|
||||||
|
TRACE_2("params",_wire,_killer);
|
||||||
|
|
||||||
private ["_distance", "_vehicle"];
|
private ["_distance", "_vehicle"];
|
||||||
|
|
||||||
if (isNull _killer) then {
|
if (isNull _killer) then {
|
||||||
_killer = _wire getVariable ["ace_concertina_wire_lastDamager", objNull];
|
_killer = _wire getVariable ["ace_concertina_wire_lastDamager", objNull];
|
||||||
if (isNull _killer) then {
|
if (isNull _killer) then {
|
||||||
_killer = nearestObject [_wire, "car"];
|
private _midPoint = ((_wire selectionPosition "start") vectorAdd (_wire selectionPosition "deploy")) vectorMultiply 0.5;
|
||||||
|
{
|
||||||
|
if ((vectorMagnitude velocity _x) > 0) exitWith {_killer = _x};
|
||||||
|
} forEach (nearestObjects [(_wire modelToWorld _midPoint), ["Car"], 8]);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
if (isNull _killer || {_killer == _wire} || {_killer == gunner (vehicle _killer)}) exitWith {};
|
if (isNull _killer || {_killer == _wire} || {_killer == gunner (vehicle _killer)}) exitWith {};
|
||||||
|
@ -522,7 +522,7 @@ GVAR(menuRun) = true;
|
|||||||
(__dsp displayCtrl __mainText) ctrlSetText "Connecting...";
|
(__dsp displayCtrl __mainText) ctrlSetText "Connecting...";
|
||||||
};
|
};
|
||||||
if (ACE_time - GVAR(busyTimer) > 0.6) then {
|
if (ACE_time - GVAR(busyTimer) > 0.6) then {
|
||||||
if (ACE_player hasWeapon "ACE_Vector") then {
|
if (({_x isKindOf ["ACE_Vector", configFile >> "CfgWeapons"]} count (weapons ACE_player)) > 0) then {
|
||||||
GVAR(displaySelection) = "VECTOR";
|
GVAR(displaySelection) = "VECTOR";
|
||||||
(__dsp displayCtrl __mainText) ctrlSetText "Vector Connected";
|
(__dsp displayCtrl __mainText) ctrlSetText "Vector Connected";
|
||||||
GVAR(vectorConnected) = true;
|
GVAR(vectorConnected) = true;
|
||||||
|
@ -1 +0,0 @@
|
|||||||
z\ace\addons\difficulties
|
|
@ -1,33 +0,0 @@
|
|||||||
|
|
||||||
class CfgDifficulties {
|
|
||||||
class Mercenary {
|
|
||||||
class Flags {
|
|
||||||
armor[] = {0,0};
|
|
||||||
friendlyTag[] = {0,0};
|
|
||||||
enemyTag[] = {0,0};
|
|
||||||
mineTag[] = {0,0};
|
|
||||||
hud[] = {0,1};//{1,1};
|
|
||||||
hudPerm[] = {0,0};
|
|
||||||
hudWp[] = {0,0};
|
|
||||||
hudWpPerm[] = {0,0};
|
|
||||||
autoSpot[] = {0,1};
|
|
||||||
map[] = {0,0};
|
|
||||||
weaponCursor[] = {0,1};//{1,1};
|
|
||||||
autoGuideAT[] = {0,0};
|
|
||||||
clockIndicator[] = {0,0};
|
|
||||||
3rdPersonView[] = {0,0};
|
|
||||||
autoAim[] = {0,0};
|
|
||||||
unlimitedSaves[] = {0,0};
|
|
||||||
deathMessages[] = {0,1};//{1,1};
|
|
||||||
netStats[] = {0,1};//{1,1};
|
|
||||||
vonID[] = {0,1};
|
|
||||||
cameraShake[] = {1,0};
|
|
||||||
hudGroupInfo[] = {0,0};
|
|
||||||
extendetInfoType[] = {0,0};
|
|
||||||
roughLanding[] = {0,0};
|
|
||||||
windEnabled[] = {1,0};
|
|
||||||
autoTrimEnabled[] = {0,0};
|
|
||||||
stressDamageEnabled[] = {1,0};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
@ -1,15 +0,0 @@
|
|||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
class CfgPatches {
|
|
||||||
class ADDON {
|
|
||||||
units[] = {};
|
|
||||||
weapons[] = {};
|
|
||||||
requiredVersion = REQUIRED_VERSION;
|
|
||||||
requiredAddons[] = {"ace_common"};
|
|
||||||
author[] = {"commy2"};
|
|
||||||
authorUrl = "https://github.com/commy2/";
|
|
||||||
VERSION_CONFIG;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
#include "CfgDifficulties.hpp"
|
|
@ -1,17 +0,0 @@
|
|||||||
#define COMPONENT difficulties
|
|
||||||
#include "\z\ace\addons\main\script_mod.hpp"
|
|
||||||
|
|
||||||
// #define DEBUG_MODE_FULL
|
|
||||||
// #define DISABLE_COMPILE_CACHE
|
|
||||||
// #define CBA_DEBUG_SYNCHRONOUS
|
|
||||||
// #define ENABLE_PERFORMANCE_COUNTERS
|
|
||||||
|
|
||||||
#ifdef DEBUG_ENABLED_DIFFICULTIES
|
|
||||||
#define DEBUG_MODE_FULL
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef DEBUG_ENABLED_DIFFICULTIES
|
|
||||||
#define DEBUG_SETTINGS DEBUG_ENABLED_DIFFICULTIES
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "\z\ace\addons\main\script_macros.hpp"
|
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project name="ACE">
|
<Project name="ACE">
|
||||||
<Package name="Disarming">
|
<Package name="Disarming">
|
||||||
<Key ID="STR_ACE_Disarming_OpenInventory">
|
<Key ID="STR_ACE_Disarming_OpenInventory">
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project name="ACE">
|
<Project name="ACE">
|
||||||
<Package name="Disposable">
|
<Package name="Disposable">
|
||||||
<Key ID="STR_ACE_Disposable_UsedTube">
|
<Key ID="STR_ACE_Disposable_UsedTube">
|
||||||
|
@ -38,6 +38,7 @@ class CfgVehicles {
|
|||||||
|
|
||||||
// ammo boxes
|
// ammo boxes
|
||||||
class ThingX;
|
class ThingX;
|
||||||
|
class Items_base_F;
|
||||||
class ReammoBox_F: ThingX {
|
class ReammoBox_F: ThingX {
|
||||||
GVAR(canCarry) = 0;
|
GVAR(canCarry) = 0;
|
||||||
GVAR(carryPosition)[] = {0,1,1};
|
GVAR(carryPosition)[] = {0,1,1};
|
||||||
@ -90,6 +91,32 @@ class CfgVehicles {
|
|||||||
GVAR(canDrag) = 0;
|
GVAR(canDrag) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//Plastic and metal case
|
||||||
|
class PlasticCase_01_base_F: Items_base_F {
|
||||||
|
class EventHandlers {
|
||||||
|
class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
|
||||||
|
};
|
||||||
|
GVAR(canCarry) = 1;
|
||||||
|
GVAR(carryPosition[]) = {0,1,1};
|
||||||
|
GVAR(carryDirection) = 270;
|
||||||
|
|
||||||
|
GVAR(canDrag) = 1;
|
||||||
|
GVAR(dragPosition[]) = {0,1.2,0};
|
||||||
|
GVAR(dragDirection) = 0;
|
||||||
|
};
|
||||||
|
class MetalCase_01_base_F: Items_base_F {
|
||||||
|
class EventHandlers {
|
||||||
|
class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
|
||||||
|
};
|
||||||
|
GVAR(canCarry) = 1;
|
||||||
|
GVAR(carryPosition[]) = {0,1,1};
|
||||||
|
GVAR(carryDirection) = 270;
|
||||||
|
|
||||||
|
GVAR(canDrag) = 1;
|
||||||
|
GVAR(dragPosition[]) = {0,1.2,0};
|
||||||
|
GVAR(dragDirection) = 0;
|
||||||
|
};
|
||||||
|
|
||||||
// Barrier
|
// Barrier
|
||||||
class RoadCone_F: ThingX {
|
class RoadCone_F: ThingX {
|
||||||
class EventHandlers {
|
class EventHandlers {
|
||||||
|
BIN
addons/dragging/UI/icons/box_carry.paa
Normal file
BIN
addons/dragging/UI/icons/box_carry.paa
Normal file
Binary file not shown.
BIN
addons/dragging/UI/icons/box_drag.paa
Normal file
BIN
addons/dragging/UI/icons/box_drag.paa
Normal file
Binary file not shown.
BIN
addons/dragging/UI/icons/person_carry.paa
Normal file
BIN
addons/dragging/UI/icons/person_carry.paa
Normal file
Binary file not shown.
BIN
addons/dragging/UI/icons/person_drag.paa
Normal file
BIN
addons/dragging/UI/icons/person_drag.paa
Normal file
Binary file not shown.
@ -43,7 +43,9 @@ if (_type in _initializedClasses) exitWith {};
|
|||||||
_initializedClasses pushBack _type;
|
_initializedClasses pushBack _type;
|
||||||
GVAR(initializedClasses_carry) = _initializedClasses;
|
GVAR(initializedClasses_carry) = _initializedClasses;
|
||||||
|
|
||||||
private _carryAction = [QGVAR(carry), localize LSTRING(Carry), "", {[_player, _target] call FUNC(startCarry)}, {[_player, _target] call FUNC(canCarry)}] call EFUNC(interact_menu,createAction);
|
private _icon = [QUOTE(PATHTOF(UI\icons\box_carry.paa)), QUOTE(PATHTOF(UI\icons\person_carry.paa))] select (_object isKindOf "Man");
|
||||||
|
|
||||||
|
private _carryAction = [QGVAR(carry), localize LSTRING(Carry), _icon, {[_player, _target] call FUNC(startCarry)}, {[_player, _target] call FUNC(canCarry)}] call EFUNC(interact_menu,createAction);
|
||||||
private _dropAction = [QGVAR(drop_carry), localize LSTRING(Drop), "", {[_player, _target] call FUNC(dropObject_carry)}, {[_player, _target] call FUNC(canDrop_carry)}] call EFUNC(interact_menu,createAction);
|
private _dropAction = [QGVAR(drop_carry), localize LSTRING(Drop), "", {[_player, _target] call FUNC(dropObject_carry)}, {[_player, _target] call FUNC(canDrop_carry)}] call EFUNC(interact_menu,createAction);
|
||||||
|
|
||||||
[_type, 0, ["ACE_MainActions"], _carryAction] call EFUNC(interact_menu,addActionToClass);
|
[_type, 0, ["ACE_MainActions"], _carryAction] call EFUNC(interact_menu,addActionToClass);
|
||||||
|
@ -44,7 +44,9 @@ if (_type in _initializedClasses) exitWith {};
|
|||||||
_initializedClasses pushBack _type;
|
_initializedClasses pushBack _type;
|
||||||
GVAR(initializedClasses) = _initializedClasses;
|
GVAR(initializedClasses) = _initializedClasses;
|
||||||
|
|
||||||
private _dragAction = [QGVAR(drag), localize LSTRING(Drag), "", {[_player, _target] call FUNC(startDrag)}, {[_player, _target] call FUNC(canDrag)}] call EFUNC(interact_menu,createAction);
|
private _icon = [QUOTE(PATHTOF(UI\icons\box_drag.paa)), QUOTE(PATHTOF(UI\icons\person_drag.paa))] select (_object isKindOf "Man");
|
||||||
|
|
||||||
|
private _dragAction = [QGVAR(drag), localize LSTRING(Drag), _icon, {[_player, _target] call FUNC(startDrag)}, {[_player, _target] call FUNC(canDrag)}] call EFUNC(interact_menu,createAction);
|
||||||
private _dropAction = [QGVAR(drop), localize LSTRING(Drop), "", {[_player, _target] call FUNC(dropObject)}, {[_player, _target] call FUNC(canDrop)}] call EFUNC(interact_menu,createAction);
|
private _dropAction = [QGVAR(drop), localize LSTRING(Drop), "", {[_player, _target] call FUNC(dropObject)}, {[_player, _target] call FUNC(canDrop)}] call EFUNC(interact_menu,createAction);
|
||||||
|
|
||||||
[_type, 0, ["ACE_MainActions"], _dragAction] call EFUNC(interact_menu,addActionToClass);
|
[_type, 0, ["ACE_MainActions"], _dragAction] call EFUNC(interact_menu,addActionToClass);
|
||||||
|
@ -1,13 +1,17 @@
|
|||||||
class ACE_Settings {
|
class ACE_Settings {
|
||||||
class GVAR(RequireSpecialist) {
|
class GVAR(requireSpecialist) {
|
||||||
|
displayName = CSTRING(RequireSpecialist_DisplayName);
|
||||||
|
description = CSTRING(RequireSpecialist_Description);
|
||||||
value = 0;
|
value = 0;
|
||||||
typeName = "BOOL";
|
typeName = "BOOL";
|
||||||
};
|
};
|
||||||
class GVAR(PunishNonSpecialists) {
|
class GVAR(punishNonSpecialists) {
|
||||||
|
displayName = CSTRING(PunishNonSpecialists_DisplayName);
|
||||||
|
description = CSTRING(PunishNonSpecialists_Description);
|
||||||
value = 1;
|
value = 1;
|
||||||
typeName = "BOOL";
|
typeName = "BOOL";
|
||||||
};
|
};
|
||||||
class GVAR(ExplodeOnDefuse) {
|
class GVAR(explodeOnDefuse) {
|
||||||
displayName = CSTRING(ExplodeOnDefuse_DisplayName);
|
displayName = CSTRING(ExplodeOnDefuse_DisplayName);
|
||||||
description = CSTRING(ExplodeOnDefuse_Description);
|
description = CSTRING(ExplodeOnDefuse_Description);
|
||||||
value = 1;
|
value = 1;
|
||||||
|
@ -50,8 +50,7 @@ class CfgVehicles {
|
|||||||
mapSize = 0.2;
|
mapSize = 0.2;
|
||||||
icon = "iconObject_1x2";
|
icon = "iconObject_1x2";
|
||||||
model = "\A3\Weapons_f\dummyweapon.p3d";
|
model = "\A3\Weapons_f\dummyweapon.p3d";
|
||||||
scope = 2;
|
scope = 1;
|
||||||
scopeCurator = 1;
|
|
||||||
vehicleClass = "Cargo";
|
vehicleClass = "Cargo";
|
||||||
class ACE_Actions {
|
class ACE_Actions {
|
||||||
class ACE_MainActions {
|
class ACE_MainActions {
|
||||||
@ -81,8 +80,7 @@ class CfgVehicles {
|
|||||||
mapSize = 0.2;
|
mapSize = 0.2;
|
||||||
icon = "iconObject_1x2";
|
icon = "iconObject_1x2";
|
||||||
model = "\A3\Structures_F\Items\Tools\MultiMeter_F.p3d";
|
model = "\A3\Structures_F\Items\Tools\MultiMeter_F.p3d";
|
||||||
scope = 2;
|
scope = 1;
|
||||||
scopeCurator = 1;
|
|
||||||
vehicleClass = "Cargo";
|
vehicleClass = "Cargo";
|
||||||
class ACE_Actions {
|
class ACE_Actions {
|
||||||
class ACE_MainActions {
|
class ACE_MainActions {
|
||||||
|
@ -27,18 +27,7 @@ if (isServer) then {
|
|||||||
TRACE_1("Knocked Out, Doing Deadman", _unit);
|
TRACE_1("Knocked Out, Doing Deadman", _unit);
|
||||||
[_unit] call FUNC(onIncapacitated);
|
[_unit] call FUNC(onIncapacitated);
|
||||||
}] call EFUNC(common,addEventHandler);
|
}] call EFUNC(common,addEventHandler);
|
||||||
};
|
|
||||||
|
|
||||||
if (!hasInterface) exitWith {};
|
|
||||||
|
|
||||||
GVAR(PlacedCount) = 0;
|
|
||||||
GVAR(Setup) = objNull;
|
|
||||||
GVAR(pfeh_running) = false;
|
|
||||||
GVAR(CurrentSpeedDial) = 0;
|
|
||||||
|
|
||||||
// In case we are a JIP client, ask the server for orientation of any previously
|
|
||||||
// placed mine.
|
|
||||||
if (isServer) then {
|
|
||||||
["clientRequestsOrientations", {
|
["clientRequestsOrientations", {
|
||||||
params ["_logic"];
|
params ["_logic"];
|
||||||
TRACE_1("clientRequestsOrientations received:",_logic);
|
TRACE_1("clientRequestsOrientations received:",_logic);
|
||||||
@ -50,7 +39,18 @@ if (isServer) then {
|
|||||||
TRACE_1("serverSendsOrientations sent:",GVAR(explosivesOrientations));
|
TRACE_1("serverSendsOrientations sent:",GVAR(explosivesOrientations));
|
||||||
["serverSendsOrientations", _logic, [GVAR(explosivesOrientations)]] call EFUNC(common,targetEvent);
|
["serverSendsOrientations", _logic, [GVAR(explosivesOrientations)]] call EFUNC(common,targetEvent);
|
||||||
}] call EFUNC(common,addEventHandler);
|
}] call EFUNC(common,addEventHandler);
|
||||||
} else {
|
};
|
||||||
|
|
||||||
|
if (!hasInterface) exitWith {};
|
||||||
|
|
||||||
|
GVAR(PlacedCount) = 0;
|
||||||
|
GVAR(Setup) = objNull;
|
||||||
|
GVAR(pfeh_running) = false;
|
||||||
|
GVAR(CurrentSpeedDial) = 0;
|
||||||
|
|
||||||
|
// In case we are a JIP client, ask the server for orientation of any previously
|
||||||
|
// placed mine.
|
||||||
|
if (didJIP) then {
|
||||||
["serverSendsOrientations", {
|
["serverSendsOrientations", {
|
||||||
params ["_explosivesOrientations"];
|
params ["_explosivesOrientations"];
|
||||||
TRACE_1("serverSendsOrientations received:",_explosivesOrientations);
|
TRACE_1("serverSendsOrientations received:",_explosivesOrientations);
|
||||||
@ -59,14 +59,12 @@ if (isServer) then {
|
|||||||
TRACE_3("orientation set:",_explosive,_direction,_pitch);
|
TRACE_3("orientation set:",_explosive,_direction,_pitch);
|
||||||
[_explosive, _direction, _pitch] call FUNC(setPosition);
|
[_explosive, _direction, _pitch] call FUNC(setPosition);
|
||||||
} forEach _explosivesOrientations;
|
} forEach _explosivesOrientations;
|
||||||
private _group = group GVAR(localLogic);
|
|
||||||
deleteVehicle GVAR(localLogic);
|
deleteVehicle GVAR(localLogic);
|
||||||
GVAR(localLogic) = nil;
|
GVAR(localLogic) = nil;
|
||||||
deleteGroup _group;
|
|
||||||
}] call EFUNC(common,addEventHandler);
|
}] call EFUNC(common,addEventHandler);
|
||||||
|
|
||||||
// Create a logic to get the client ID
|
// Create a logic to get the client ID
|
||||||
GVAR(localLogic) = (createGroup sideLogic) createUnit ["Logic", [0,0,0], [], 0, "NONE"];
|
GVAR(localLogic) = ([sideLogic] call CBA_fnc_getSharedGroup) createUnit ["Logic", [0,0,0], [], 0, "NONE"];
|
||||||
TRACE_1("clientRequestsOrientations sent:",GVAR(localLogic));
|
TRACE_1("clientRequestsOrientations sent:",GVAR(localLogic));
|
||||||
["clientRequestsOrientations", [GVAR(localLogic)]] call EFUNC(common,serverEvent);
|
["clientRequestsOrientations", [GVAR(localLogic)]] call EFUNC(common,serverEvent);
|
||||||
};
|
};
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* detonate editor-placed explosives.
|
* detonate editor-placed explosives.
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Explosives objects to detonate <ARRAY>
|
* 0: Explosives objects to detonate <OBJECT or ARRAY>
|
||||||
* 1: Fuze delay (for each explosive; use negative number for random time up to value) <NUMBER> <OPTIONAL>
|
* 1: Fuze delay (for each explosive; use negative number for random time up to value) <NUMBER> <OPTIONAL>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
@ -18,10 +18,13 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
params ["_explosiveArr",["_fuzeTime",0]];
|
params [["_explosiveArr", [], [[], objNull]], ["_fuzeTime", 0, [0]]];
|
||||||
|
|
||||||
|
if (_explosiveArr isEqualType objNull) then {
|
||||||
|
_explosiveArr = [_explosiveArr];
|
||||||
|
};
|
||||||
|
|
||||||
private _detTime;
|
|
||||||
{
|
{
|
||||||
_detTime = if (_fuzeTime < 0) then {random abs _fuzeTime} else {_fuzeTime};
|
private _detTime = if (_fuzeTime < 0) then {random abs _fuzeTime} else {_fuzeTime};
|
||||||
[objNull, -1, [_x, _detTime]] call FUNC(detonateExplosive);
|
[objNull, -1, [_x, _detTime]] call FUNC(detonateExplosive);
|
||||||
} forEach _explosiveArr;
|
} forEach _explosiveArr;
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_speedDial", "_amount"];
|
private ["_speedDial", "_amount"];
|
||||||
|
|
||||||
_speedDial = ace_player getVariable [QGVAR(SpeedDial), []];
|
_speedDial = ace_player getVariable [QGVAR(SpeedDial), []];
|
||||||
|
@ -647,6 +647,8 @@
|
|||||||
<Polish>Mina M6 SLAM (atak od dołu)</Polish>
|
<Polish>Mina M6 SLAM (atak od dołu)</Polish>
|
||||||
<Spanish>Mina M6 SLAM (Ataque Inferior)</Spanish>
|
<Spanish>Mina M6 SLAM (Ataque Inferior)</Spanish>
|
||||||
<French>Mine M6 SLAM (par le bas)</French>
|
<French>Mine M6 SLAM (par le bas)</French>
|
||||||
|
<Italian>Mina M6 SLAM (base)</Italian>
|
||||||
|
<Czech>M6 SLAM (Útok zespoda)</Czech>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Explosives_Module_SLAMSideAttack_DisplayName">
|
<Key ID="STR_ACE_Explosives_Module_SLAMSideAttack_DisplayName">
|
||||||
<English>M6 SLAM Mine (Side Attack)</English>
|
<English>M6 SLAM Mine (Side Attack)</English>
|
||||||
@ -661,6 +663,8 @@
|
|||||||
<Polish>Mina M6 SLAM (atak od boku)</Polish>
|
<Polish>Mina M6 SLAM (atak od boku)</Polish>
|
||||||
<Spanish>Mina M6 SLAM (Ataque Lateral)</Spanish>
|
<Spanish>Mina M6 SLAM (Ataque Lateral)</Spanish>
|
||||||
<French>Mine M6 SLAM (de flanc)</French>
|
<French>Mine M6 SLAM (de flanc)</French>
|
||||||
|
<Italian> STR_ACE_Explosives_Module_SLAMBottomAttack_DisplayName M6 SLAM Mine (Bottom Attack) Mine M6 SLAM (par le bas) M6-SLAM-Mine (Bodenangriff) Mina M6 SLAM (base) Mina M6 SLAM (atak od dołu) Mina M6 SLAM (Laterale)</Italian>
|
||||||
|
<Czech>M6 SLAM (Útok do strany)</Czech>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Explosives_Module_IEDUrbanBig_Range_DisplayName">
|
<Key ID="STR_ACE_Explosives_Module_IEDUrbanBig_Range_DisplayName">
|
||||||
<English>Large IED (Urban, Pressure Plate)</English>
|
<English>Large IED (Urban, Pressure Plate)</English>
|
||||||
@ -675,6 +679,8 @@
|
|||||||
<Polish>Duży IED (miejski, płyta naciskowa)</Polish>
|
<Polish>Duży IED (miejski, płyta naciskowa)</Polish>
|
||||||
<Spanish>IED Grande (Urbano, Placa de presión)</Spanish>
|
<Spanish>IED Grande (Urbano, Placa de presión)</Spanish>
|
||||||
<French>Grand EEI (Urbain, plaque de pression)</French>
|
<French>Grand EEI (Urbain, plaque de pression)</French>
|
||||||
|
<Italian>IED grande (urbano, a pressione)</Italian>
|
||||||
|
<Czech>IED, Velké (Městské, Nášlapné)</Czech>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Explosives_Module_IEDLandBig_Range_DisplayName">
|
<Key ID="STR_ACE_Explosives_Module_IEDLandBig_Range_DisplayName">
|
||||||
<English>Large IED (Dug-in, Pressure Plate)</English>
|
<English>Large IED (Dug-in, Pressure Plate)</English>
|
||||||
@ -689,6 +695,8 @@
|
|||||||
<Polish>Duży IED (zakopany, płyta naciskowa)</Polish>
|
<Polish>Duży IED (zakopany, płyta naciskowa)</Polish>
|
||||||
<Spanish>IED Grande (Enterrado, Placa de presión)</Spanish>
|
<Spanish>IED Grande (Enterrado, Placa de presión)</Spanish>
|
||||||
<French>Grand EEI (Enterré, plaque de pression)</French>
|
<French>Grand EEI (Enterré, plaque de pression)</French>
|
||||||
|
<Italian>IED grande (interrato, a pressione)</Italian>
|
||||||
|
<Czech>IED, Velké (Zakopané, Nášlapné)</Czech>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Explosives_Module_IEDUrbanSmall_Range_DisplayName">
|
<Key ID="STR_ACE_Explosives_Module_IEDUrbanSmall_Range_DisplayName">
|
||||||
<English>Small IED (Urban, Pressure Plate)</English>
|
<English>Small IED (Urban, Pressure Plate)</English>
|
||||||
@ -703,6 +711,8 @@
|
|||||||
<Polish>Mały IED (miejski, płyta naciskowa)</Polish>
|
<Polish>Mały IED (miejski, płyta naciskowa)</Polish>
|
||||||
<Spanish>IED Pequeño (Urbano, Placa de presión)</Spanish>
|
<Spanish>IED Pequeño (Urbano, Placa de presión)</Spanish>
|
||||||
<French>Petit EEI (Urbain, plaque de pression)</French>
|
<French>Petit EEI (Urbain, plaque de pression)</French>
|
||||||
|
<Italian>IED piccolo (urbano, a pressione)</Italian>
|
||||||
|
<Czech>IED, Malé (Městské, Nášlapné)</Czech>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Explosives_Module_IEDLandSmall_Range_DisplayName">
|
<Key ID="STR_ACE_Explosives_Module_IEDLandSmall_Range_DisplayName">
|
||||||
<English>Small IED (Dug-in, Pressure Plate)</English>
|
<English>Small IED (Dug-in, Pressure Plate)</English>
|
||||||
@ -717,6 +727,8 @@
|
|||||||
<Polish>Mały IED (zakopany, płyta naciskowa)</Polish>
|
<Polish>Mały IED (zakopany, płyta naciskowa)</Polish>
|
||||||
<Spanish>IED Pequeño (Enterrado, Placa de presión)</Spanish>
|
<Spanish>IED Pequeño (Enterrado, Placa de presión)</Spanish>
|
||||||
<French>Petit EEI (Enterré, plaque de pression)</French>
|
<French>Petit EEI (Enterré, plaque de pression)</French>
|
||||||
|
<Italian>IED piccolo (interrato, a pressione)</Italian>
|
||||||
|
<Czech>IED, Malé (Zakopané, Nášlapné)</Czech>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Explosives_connectInventoryExplosiveToDeadman">
|
<Key ID="STR_ACE_Explosives_connectInventoryExplosiveToDeadman">
|
||||||
<English>Connect to %1</English>
|
<English>Connect to %1</English>
|
||||||
|
12
addons/fastroping/CfgSounds.hpp
Normal file
12
addons/fastroping/CfgSounds.hpp
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
class CfgSounds {
|
||||||
|
class GVAR(Rope) {
|
||||||
|
name = "ACE_Fastroping_Rope";
|
||||||
|
sound[] = {QUOTE(PATHTOF(data\sounds\fastroping_rope.ogg)), 10, 1.0};
|
||||||
|
titles[] = {};
|
||||||
|
};
|
||||||
|
class GVAR(Thud) {
|
||||||
|
name = "ACE_Fastroping_Thud";
|
||||||
|
sound[] = {QUOTE(PATHTOF(data\sounds\fastroping_thud.ogg)), 10, 1.0};
|
||||||
|
titles[] = {};
|
||||||
|
};
|
||||||
|
};
|
@ -35,8 +35,8 @@ class CfgVehicles {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
class Helicopter;
|
class Air;
|
||||||
class Helicopter_Base_F: Helicopter {
|
class Helicopter: Air {
|
||||||
class ACE_SelfActions {
|
class ACE_SelfActions {
|
||||||
class ACE_prepareFRIES {
|
class ACE_prepareFRIES {
|
||||||
displayName = CSTRING(Interaction_prepareFRIES);
|
displayName = CSTRING(Interaction_prepareFRIES);
|
||||||
@ -68,9 +68,15 @@ class CfgVehicles {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class Helicopter_Base_F;
|
||||||
class ACE_friesBase: Helicopter_Base_F {
|
class ACE_friesBase: Helicopter_Base_F {
|
||||||
destrType = "";
|
destrType = "";
|
||||||
class Turrets {};
|
class Turrets {};
|
||||||
|
class ACE_Actions {};
|
||||||
|
class ACE_SelfActions {};
|
||||||
|
EGVAR(cargo,hasCargo) = 0;
|
||||||
|
EGVAR(cargo,space) = 0;
|
||||||
};
|
};
|
||||||
class ACE_friesAnchorBar: ACE_friesBase {
|
class ACE_friesAnchorBar: ACE_friesBase {
|
||||||
author = "jokoho48";
|
author = "jokoho48";
|
||||||
@ -203,7 +209,7 @@ class CfgVehicles {
|
|||||||
GVAR(enabled) = 2;
|
GVAR(enabled) = 2;
|
||||||
GVAR(ropeOrigins)[] = {"ropeOriginRight", "ropeOriginLeft"};
|
GVAR(ropeOrigins)[] = {"ropeOriginRight", "ropeOriginLeft"};
|
||||||
GVAR(friesType) = "ACE_friesGantryReverse";
|
GVAR(friesType) = "ACE_friesGantryReverse";
|
||||||
GVAR(friesAttachmentPoint)[] = {1.04, 2.5, -0.34};
|
GVAR(friesAttachmentPoint)[] = {-1.04, 2.5, -0.34};
|
||||||
EQUIP_FRIES_ATTRIBUTE;
|
EQUIP_FRIES_ATTRIBUTE;
|
||||||
};
|
};
|
||||||
class Heli_light_03_unarmed_base_F: Heli_light_03_base_F {
|
class Heli_light_03_unarmed_base_F: Heli_light_03_base_F {
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
ace_difficulties
|
ace_fastroping
|
||||||
================
|
==========
|
||||||
|
|
||||||
Changes the elite difficulty setting to more closely resemble Arma 2.
|
|
||||||
|
|
||||||
|
Introducing the ability to fastrope out of heliocopters.
|
||||||
|
|
||||||
## Maintainers
|
## Maintainers
|
||||||
|
|
||||||
The people responsible for merging changes to this component or answering potential questions.
|
The people responsible for merging changes to this component or answering potential questions.
|
||||||
|
|
||||||
|
- [BaerMitUmlaut](https://github.com/BaerMitUmlaut)
|
||||||
- [KoffeinFlummi](https://github.com/KoffeinFlummi)
|
- [KoffeinFlummi](https://github.com/KoffeinFlummi)
|
||||||
- [commy2](https://github.com/commy2)
|
|
@ -14,5 +14,6 @@ class CfgPatches {
|
|||||||
|
|
||||||
#include "CfgEventHandlers.hpp"
|
#include "CfgEventHandlers.hpp"
|
||||||
#include "CfgMoves.hpp"
|
#include "CfgMoves.hpp"
|
||||||
|
#include "CfgSounds.hpp"
|
||||||
#include "CfgVehicles.hpp"
|
#include "CfgVehicles.hpp"
|
||||||
#include "CfgWaypoints.hpp"
|
#include "CfgWaypoints.hpp"
|
||||||
|
6
addons/fastroping/data/sounds/LICENSE.md
Normal file
6
addons/fastroping/data/sounds/LICENSE.md
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
Source sounds are adapted and changed.
|
||||||
|
|
||||||
|
**Fastroping_Rope (fastroping_rope.ogg):**
|
||||||
|
"[Rub.aif](http://freesound.org/people/le_abbaye_Noirlac/sounds/129471/)" by [Tessa Elieff](http://freesound.org/people/le_abbaye_Noirlac/) is [CreativeCommons Attributions 3.0](http://creativecommons.org/licenses/by/3.0/)
|
||||||
|
|
||||||
|
All other sounds from helenacm and Adam_N, both under Creative Commons 0 (no attribution required).
|
BIN
addons/fastroping/data/sounds/fastroping_rope.ogg
Normal file
BIN
addons/fastroping/data/sounds/fastroping_rope.ogg
Normal file
Binary file not shown.
BIN
addons/fastroping/data/sounds/fastroping_thud.ogg
Normal file
BIN
addons/fastroping/data/sounds/fastroping_thud.ogg
Normal file
Binary file not shown.
@ -32,10 +32,11 @@ _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []];
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
detach _dummy;
|
//Destroy rope
|
||||||
deleteVehicle _ropeTop;
|
//Only delete the hook first so the rope falls down.
|
||||||
|
//Note: ropeDetach was used here before, but the command seems a bit broken.
|
||||||
deleteVehicle _hook;
|
deleteVehicle _hook;
|
||||||
[{{deleteVehicle _x} count _this}, [_ropeBottom, _dummy], 60] call EFUNC(common,waitAndExecute);
|
[{{deleteVehicle _x} count _this}, [_ropeTop, _ropeBottom, _dummy], 60] call EFUNC(common,waitAndExecute);
|
||||||
} count _deployedRopes;
|
} count _deployedRopes;
|
||||||
|
|
||||||
_vehicle setVariable [QGVAR(deployedRopes), [], true];
|
_vehicle setVariable [QGVAR(deployedRopes), [], true];
|
||||||
|
@ -35,14 +35,13 @@ _hookAttachment = _vehicle getVariable [QGVAR(FRIES), _vehicle];
|
|||||||
|
|
||||||
_origin = getPosATL _hook;
|
_origin = getPosATL _hook;
|
||||||
|
|
||||||
_dummy = createVehicle [QGVAR(helper), _origin, [], 0, "CAN_COLLIDE"];
|
_dummy = createVehicle [QGVAR(helper), _origin vectorAdd [0, 0, -1], [], 0, "CAN_COLLIDE"];
|
||||||
_dummy allowDamage false;
|
_dummy allowDamage false;
|
||||||
_dummy disableCollisionWith _vehicle;
|
_dummy disableCollisionWith _vehicle;
|
||||||
_dummy attachTo [_hook, [0, 0, 0]];
|
|
||||||
|
|
||||||
_ropeTop = ropeCreate [_dummy, [0, 0, 0], _hook, [0, 0, 0], 0.5];
|
_ropeTop = ropeCreate [_dummy, [0, 0, 0], _hook, [0, 0, 0], 0.5];
|
||||||
_ropeBottom = ropeCreate [_dummy, [0, 0, 0], 1];
|
_ropeBottom = ropeCreate [_dummy, [0, 0, 0], 1];
|
||||||
ropeUnwind [_ropeBottom, 30, 35, false];
|
ropeUnwind [_ropeBottom, 30, 34.5, false];
|
||||||
|
|
||||||
_ropeTop addEventHandler ["RopeBreak", {[_this, "top"] call FUNC(onRopeBreak)}];
|
_ropeTop addEventHandler ["RopeBreak", {[_this, "top"] call FUNC(onRopeBreak)}];
|
||||||
_ropeBottom addEventHandler ["RopeBreak", {[_this, "bottom"] call FUNC(onRopeBreak)}];
|
_ropeBottom addEventHandler ["RopeBreak", {[_this, "bottom"] call FUNC(onRopeBreak)}];
|
||||||
|
@ -35,6 +35,6 @@ _deployedRopes set [_usableRopeIndex, _usableRope];
|
|||||||
_vehicle setVariable [QGVAR(deployedRopes), _deployedRopes, true];
|
_vehicle setVariable [QGVAR(deployedRopes), _deployedRopes, true];
|
||||||
|
|
||||||
//Start server PFH asap
|
//Start server PFH asap
|
||||||
[QGVAR(startFastRope), [_unit, _vehicle, _usableRope, _usableRopeIndex]] call EFUNC(common,serverEvent);
|
[QGVAR(startFastRope), [_unit, _vehicle, _usableRope, _usableRopeIndex, false]] call EFUNC(common,serverEvent);
|
||||||
moveOut _unit;
|
moveOut _unit;
|
||||||
[FUNC(fastRopeLocalPFH), 0, [_unit, _vehicle, _usableRope, _usableRopeIndex]] call CBA_fnc_addPerFrameHandler;
|
[FUNC(fastRopeLocalPFH), 0, [_unit, _vehicle, _usableRope, _usableRopeIndex, ACE_diagTime]] call CBA_fnc_addPerFrameHandler;
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
params ["_arguments", "_pfhHandle"];
|
params ["_arguments", "_pfhHandle"];
|
||||||
_arguments params ["_unit", "_vehicle", "_rope", "_ropeIndex"];
|
_arguments params ["_unit", "_vehicle", "_rope", "_ropeIndex", "_timeToPlayRopeSound"];
|
||||||
_rope params ["_attachmentPoint", "_ropeTop", "_ropeBottom", "_dummy", "_hook", "_occupied"];
|
_rope params ["_attachmentPoint", "_ropeTop", "_ropeBottom", "_dummy", "_hook", "_occupied"];
|
||||||
private ["_vectorUp", "_vectorDir", "_origin"];
|
private ["_vectorUp", "_vectorDir", "_origin"];
|
||||||
|
|
||||||
@ -26,16 +26,24 @@ if (vehicle _unit != _unit) exitWith {};
|
|||||||
|
|
||||||
//Start fast roping
|
//Start fast roping
|
||||||
if (animationState _unit != "ACE_FastRoping") exitWith {
|
if (animationState _unit != "ACE_FastRoping") exitWith {
|
||||||
detach _dummy;
|
|
||||||
_unit disableCollisionWith _dummy;
|
_unit disableCollisionWith _dummy;
|
||||||
_unit attachTo [_dummy, [0, 0, -1.45]];
|
_unit attachTo [_dummy, [0, 0, -1.45]];
|
||||||
[_unit, "ACE_FastRoping", 2] call EFUNC(common,doAnimation);
|
[_unit, "ACE_FastRoping", 2] call EFUNC(common,doAnimation);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//End of fast rope
|
//End of fast rope
|
||||||
if (isNull attachedTo _unit) exitWith {
|
if (isNull attachedTo _unit) exitWith {
|
||||||
|
TRACE_1("exit pfeh",_unit);
|
||||||
[_unit, "", 2] call EFUNC(common,doAnimation);
|
[_unit, "", 2] call EFUNC(common,doAnimation);
|
||||||
_unit setVectorUp [0, 0, 1];
|
_unit setVectorUp [0, 0, 1];
|
||||||
|
|
||||||
|
playSound QGVAR(Thud);
|
||||||
|
|
||||||
[_pfhHandle] call CBA_fnc_removePerFrameHandler;
|
[_pfhHandle] call CBA_fnc_removePerFrameHandler;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (ACE_diagTime > _timeToPlayRopeSound) then {
|
||||||
|
_arguments set [4, (_timeToPlayRopeSound + 1)];
|
||||||
|
playSound QGVAR(Rope);
|
||||||
|
};
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
params ["_arguments", "_pfhHandle"];
|
params ["_arguments", "_pfhHandle"];
|
||||||
_arguments params ["_unit", "_vehicle", "_rope", "_ropeIndex"];
|
_arguments params ["_unit", "_vehicle", "_rope", "_ropeIndex", "_hasBeenAttached"];
|
||||||
_rope params ["_attachmentPoint", "_ropeTop", "_ropeBottom", "_dummy", "_hook", "_occupied"];
|
_rope params ["_attachmentPoint", "_ropeTop", "_ropeBottom", "_dummy", "_hook", "_occupied"];
|
||||||
private ["_vectorUp", "_vectorDir", "_origin"];
|
private ["_vectorUp", "_vectorDir", "_origin"];
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ private ["_vectorUp", "_vectorDir", "_origin"];
|
|||||||
if (vehicle _unit != _unit) exitWith {};
|
if (vehicle _unit != _unit) exitWith {};
|
||||||
|
|
||||||
//Start fast roping
|
//Start fast roping
|
||||||
if (animationState _unit != "ACE_FastRoping") exitWith {
|
if (getMass _dummy != 80) exitWith {
|
||||||
//Fix for twitchyness
|
//Fix for twitchyness
|
||||||
_dummy setMass 80;
|
_dummy setMass 80;
|
||||||
_dummy setCenterOfMass [0, 0, -2];
|
_dummy setCenterOfMass [0, 0, -2];
|
||||||
@ -37,8 +37,15 @@ if (animationState _unit != "ACE_FastRoping") exitWith {
|
|||||||
ropeUnwind [_ropeBottom, 6, 0.5];
|
ropeUnwind [_ropeBottom, 6, 0.5];
|
||||||
};
|
};
|
||||||
|
|
||||||
//Check if rope broke and unit is falling
|
//Check if the player has been attached to the rope yet
|
||||||
if (isNull attachedTo _unit) exitWith {
|
if (!_hasBeenAttached && {!(isNull attachedTo _unit)}) then {
|
||||||
|
_hasBeenAttached = true;
|
||||||
|
_arguments set [4, true];
|
||||||
|
};
|
||||||
|
|
||||||
|
//Exit when the unit has been detached and is falling (rope broke, heli flew too fast, etc.)
|
||||||
|
//Make sure this isn't executed before the unit is actually fastroping
|
||||||
|
if (_hasBeenAttached && {isNull attachedTo _unit}) exitWith {
|
||||||
[_pfhHandle] call CBA_fnc_removePerFrameHandler;
|
[_pfhHandle] call CBA_fnc_removePerFrameHandler;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -54,14 +61,14 @@ if (((getPos _unit select 2) < 0.2) || {ropeLength _ropeTop == 34.5} || {vectorM
|
|||||||
deleteVehicle _ropeBottom;
|
deleteVehicle _ropeBottom;
|
||||||
|
|
||||||
_origin = getPosASL _hook;
|
_origin = getPosASL _hook;
|
||||||
_dummy attachTo [_hook, [0, 0, 0]];
|
_dummy setPosASL (_origin vectorAdd [0, 0, -1]);
|
||||||
|
|
||||||
//Restore original mass and center of mass
|
//Restore original mass and center of mass
|
||||||
_dummy setMass 40;
|
_dummy setMass 40;
|
||||||
_dummy setCenterOfMass [0.000143227,0.00105986,-0.246147];
|
_dummy setCenterOfMass [0.000143227,0.00105986,-0.246147];
|
||||||
|
|
||||||
_ropeTop = ropeCreate [_dummy, [0, 0, 0], _hook, [0, 0, 0], 0.5];
|
_ropeTop = ropeCreate [_dummy, [0, 0, 0], _hook, [0, 0, 0], 0.5];
|
||||||
_ropeBottom = ropeCreate [_dummy, [0, 0, 0], 35];
|
_ropeBottom = ropeCreate [_dummy, [0, 0, 0], 34.5];
|
||||||
|
|
||||||
_ropeTop addEventHandler ["RopeBreak", {[_this, "top"] call FUNC(onRopeBreak)}];
|
_ropeTop addEventHandler ["RopeBreak", {[_this, "top"] call FUNC(onRopeBreak)}];
|
||||||
_ropeBottom addEventHandler ["RopeBreak", {[_this, "bottom"] call FUNC(onRopeBreak)}];
|
_ropeBottom addEventHandler ["RopeBreak", {[_this, "bottom"] call FUNC(onRopeBreak)}];
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
#define COMPONENT fastroping
|
#define COMPONENT fastroping
|
||||||
#include "\z\ace\addons\main\script_mod.hpp"
|
#include "\z\ace\addons\main\script_mod.hpp"
|
||||||
|
|
||||||
|
// #define DEBUG_MODE_FULL
|
||||||
|
// #define DISABLE_COMPILE_CACHE
|
||||||
|
// #define CBA_DEBUG_SYNCHRONOUS
|
||||||
|
// #define ENABLE_PERFORMANCE_COUNTERS
|
||||||
|
|
||||||
#ifdef DEBUG_ENABLED_FASTROPING
|
#ifdef DEBUG_ENABLED_FASTROPING
|
||||||
#define DEBUG_MODE_FULL
|
#define DEBUG_MODE_FULL
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project name="ACE">
|
<Project name="ACE">
|
||||||
<Package name="Fastroping">
|
<Package name="Fastroping">
|
||||||
<Key ID="STR_ACE_Fastroping_Module_FRIES_DisplayName">
|
<Key ID="STR_ACE_Fastroping_Module_FRIES_DisplayName">
|
||||||
@ -7,6 +7,8 @@
|
|||||||
<Polish>Wyposaż FRIES</Polish>
|
<Polish>Wyposaż FRIES</Polish>
|
||||||
<French>Equiper le FRIES</French>
|
<French>Equiper le FRIES</French>
|
||||||
<Spanish>Equipar FRIES</Spanish>
|
<Spanish>Equipar FRIES</Spanish>
|
||||||
|
<Italian>Equipaggia la FRIES</Italian>
|
||||||
|
<Czech>Vybavit FRIES</Czech>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Fastroping_Module_FRIES_Description">
|
<Key ID="STR_ACE_Fastroping_Module_FRIES_Description">
|
||||||
<English>Equips compatible helicopters with a Fast Rope Insertion Extraction System.</English>
|
<English>Equips compatible helicopters with a Fast Rope Insertion Extraction System.</English>
|
||||||
@ -14,6 +16,8 @@
|
|||||||
<Polish>Wyposaża kompatybilne helikoptery w zestaw Fast Rope Insertion Extraction System.</Polish>
|
<Polish>Wyposaża kompatybilne helikoptery w zestaw Fast Rope Insertion Extraction System.</Polish>
|
||||||
<French>Equipe les hélicoptères compatibles avec un Module Fast Rope Insertion Extraction System.</French>
|
<French>Equipe les hélicoptères compatibles avec un Module Fast Rope Insertion Extraction System.</French>
|
||||||
<Spanish>Equipar helicoptero compatible con un Sistema de Inserción Extracción Fast Rope.</Spanish>
|
<Spanish>Equipar helicoptero compatible con un Sistema de Inserción Extracción Fast Rope.</Spanish>
|
||||||
|
<Italian>Equipagga l'elicottero compatibile con il Fast Rope Insertion Exstraction System</Italian>
|
||||||
|
<Czech>Vybavit kompatibilní vrtulníky systémem Fast Rope Insertion Extraction (FRIES).</Czech>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Fastroping_Interaction_prepareFRIES">
|
<Key ID="STR_ACE_Fastroping_Interaction_prepareFRIES">
|
||||||
<English>Prepare fast roping system</English>
|
<English>Prepare fast roping system</English>
|
||||||
@ -21,6 +25,8 @@
|
|||||||
<Polish>Przygotuj system zjazdu na linach</Polish>
|
<Polish>Przygotuj system zjazdu na linach</Polish>
|
||||||
<French>Préparer le système de corde lisse</French>
|
<French>Préparer le système de corde lisse</French>
|
||||||
<Spanish>Preparar el sistema fast roping</Spanish>
|
<Spanish>Preparar el sistema fast roping</Spanish>
|
||||||
|
<Italian>Prepara le corde</Italian>
|
||||||
|
<Czech>Připravit systém slaňování</Czech>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Fastroping_Interaction_deployRopes">
|
<Key ID="STR_ACE_Fastroping_Interaction_deployRopes">
|
||||||
<English>Deploy ropes</English>
|
<English>Deploy ropes</English>
|
||||||
@ -28,6 +34,8 @@
|
|||||||
<Polish>Wypuść liny</Polish>
|
<Polish>Wypuść liny</Polish>
|
||||||
<French>Déployer les cordes</French>
|
<French>Déployer les cordes</French>
|
||||||
<Spanish>Desplegar cuerdas</Spanish>
|
<Spanish>Desplegar cuerdas</Spanish>
|
||||||
|
<Italian>Srotola le corde</Italian>
|
||||||
|
<Czech>Připravit lana</Czech>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Fastroping_Interaction_fastRope">
|
<Key ID="STR_ACE_Fastroping_Interaction_fastRope">
|
||||||
<English>Fast rope</English>
|
<English>Fast rope</English>
|
||||||
@ -35,6 +43,8 @@
|
|||||||
<Polish>Zjedź na linie</Polish>
|
<Polish>Zjedź na linie</Polish>
|
||||||
<French>Descendre à la corde</French>
|
<French>Descendre à la corde</French>
|
||||||
<Spanish>Descender por la cuerda</Spanish>
|
<Spanish>Descender por la cuerda</Spanish>
|
||||||
|
<Italian>Scendi sulla corda</Italian>
|
||||||
|
<Czech>SLANIT</Czech>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Fastroping_Interaction_cutRopes">
|
<Key ID="STR_ACE_Fastroping_Interaction_cutRopes">
|
||||||
<English>Cut ropes</English>
|
<English>Cut ropes</English>
|
||||||
@ -42,6 +52,8 @@
|
|||||||
<Polish>Odetnij liny</Polish>
|
<Polish>Odetnij liny</Polish>
|
||||||
<French>Détacher les cordes</French>
|
<French>Détacher les cordes</French>
|
||||||
<Spanish>Cortar cuerdas</Spanish>
|
<Spanish>Cortar cuerdas</Spanish>
|
||||||
|
<Italian>Taglia le corde</Italian>
|
||||||
|
<Czech>Odříznout lano</Czech>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Fastroping_Eden_equipFRIES">
|
<Key ID="STR_ACE_Fastroping_Eden_equipFRIES">
|
||||||
<English>Equip helicopter with FRIES</English>
|
<English>Equip helicopter with FRIES</English>
|
||||||
@ -49,6 +61,8 @@
|
|||||||
<Polish>Wyposaż helikopter w FRIES</Polish>
|
<Polish>Wyposaż helikopter w FRIES</Polish>
|
||||||
<French>Equiper l'hélicoptère avec le FRIED</French>
|
<French>Equiper l'hélicoptère avec le FRIED</French>
|
||||||
<Spanish>Equipar helicoptero con FRIES</Spanish>
|
<Spanish>Equipar helicoptero con FRIES</Spanish>
|
||||||
|
<Italian>Equipaggia l'elicottero con FRIES</Italian>
|
||||||
|
<Czech>Vybavit vrtulník pomocí FRIES</Czech>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Fastroping_Eden_equipFRIES_Tooltip">
|
<Key ID="STR_ACE_Fastroping_Eden_equipFRIES_Tooltip">
|
||||||
<English>Equips the selected helicopter with a Fast Rope Insertion Extraction System</English>
|
<English>Equips the selected helicopter with a Fast Rope Insertion Extraction System</English>
|
||||||
@ -56,10 +70,13 @@
|
|||||||
<Polish>Wyposaża wybrany helikopter w zestaw Fast Rope Insertion Extraction System</Polish>
|
<Polish>Wyposaża wybrany helikopter w zestaw Fast Rope Insertion Extraction System</Polish>
|
||||||
<French>Equipe l'hélicoptère sélectionné avec un Fast Rope Insertion Extraction System</French>
|
<French>Equipe l'hélicoptère sélectionné avec un Fast Rope Insertion Extraction System</French>
|
||||||
<Spanish>Equipa el helicoptero seleccionado con un Sistema de Inserción Extracción Fast Rope</Spanish>
|
<Spanish>Equipa el helicoptero seleccionado con un Sistema de Inserción Extracción Fast Rope</Spanish>
|
||||||
|
<Italian>Equipaggia l'elicottero selezionato con il Fast Rope Insertion Extraction System</Italian>
|
||||||
|
<Czech>Vybavit vybraný vrtulník systémem Fast Rope Insertion Extraction (FRIES)</Czech>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Fastroping_Waypoint_Fastrope">
|
<Key ID="STR_ACE_Fastroping_Waypoint_Fastrope">
|
||||||
<English>LET UNITS FAST ROPE</English>
|
<English>LET UNITS FAST ROPE</English>
|
||||||
<German>EINHEITEN ABSEILEN LASSEN</German>
|
<German>EINHEITEN ABSEILEN LASSEN</German>
|
||||||
|
<Italian>SCENDI DALLE CORDE</Italian>
|
||||||
</Key>
|
</Key>
|
||||||
</Package>
|
</Package>
|
||||||
</Project>
|
</Project>
|
@ -22,6 +22,7 @@ private _min = getNumber (_turretConfig >> QGVAR(MinDistance));
|
|||||||
private _max = getNumber (_turretConfig >> QGVAR(MaxDistance));
|
private _max = getNumber (_turretConfig >> QGVAR(MaxDistance));
|
||||||
|
|
||||||
private _distance = _vehicle getVariable [format ["%1_%2", QGVAR(Distance), _turret], _min];
|
private _distance = _vehicle getVariable [format ["%1_%2", QGVAR(Distance), _turret], _min];
|
||||||
|
TRACE_4("",_distance,_delta,_min,_max);
|
||||||
|
|
||||||
_distance = _distance + _delta;
|
_distance = _distance + _delta;
|
||||||
_distance = _distance min _max;
|
_distance = _distance min _max;
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
params ["_vehicle","_turret","_distance","_angleTarget"];
|
params ["_vehicle","_turret","_distance","_angleTarget"];
|
||||||
|
TRACE_4("params",_vehicle,_turret,_distance,_angleTarget);
|
||||||
|
|
||||||
private _FCSMagazines = [];
|
private _FCSMagazines = [];
|
||||||
private _FCSElevation = [];
|
private _FCSElevation = [];
|
||||||
|
@ -8,9 +8,13 @@
|
|||||||
* Return Value:
|
* Return Value:
|
||||||
* Boolean <BOOL>
|
* Boolean <BOOL>
|
||||||
*
|
*
|
||||||
|
* Example:
|
||||||
|
* [] call ace_fcs_fnc_canUseFCS
|
||||||
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
getNumber ([configFile >> "CfgVehicles" >> typeOf vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex)] call EFUNC(common,getTurretConfigPath) >> QGVAR(Enabled)) == 1
|
getNumber ([configFile >> "CfgVehicles" >> typeOf vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex)] call EFUNC(common,getTurretConfigPath) >> QGVAR(Enabled)) == 1
|
||||||
&& {cameraView == "GUNNER"} // return
|
&& {cameraView == "GUNNER"}
|
||||||
|
&& {!([ACE_player] call CBA_fnc_canUseWeapon)} //Not Turned Out
|
||||||
|
@ -16,10 +16,11 @@
|
|||||||
TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret);
|
TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret);
|
||||||
|
|
||||||
private _FCSMagazines = _vehicle getVariable [format ["%1_%2", QGVAR(Magazines), _turret], []];
|
private _FCSMagazines = _vehicle getVariable [format ["%1_%2", QGVAR(Magazines), _turret], []];
|
||||||
private _FCSElevation = _vehicle getVariable format ["%1_%2", QGVAR(Elevation), _turret];
|
|
||||||
|
|
||||||
if !(_magazine in _FCSMagazines) exitWith {};
|
if !(_magazine in _FCSMagazines) exitWith {};
|
||||||
|
|
||||||
|
private _FCSElevation = _vehicle getVariable format ["%1_%2", QGVAR(Elevation), _turret];
|
||||||
|
|
||||||
// GET ELEVATION OFFSET OF CURRENT MAGAZINE
|
// GET ELEVATION OFFSET OF CURRENT MAGAZINE
|
||||||
private _offset = 0;
|
private _offset = 0;
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
params ["_vehicle", "_turret", "_distance", ["_showHint", false], ["_playSound", true]];
|
params ["_vehicle", "_turret", "_distance", ["_showHint", false], ["_playSound", true]];
|
||||||
|
TRACE_5("params",_vehicle,_turret,_distance,_showHint,_playSound);
|
||||||
|
|
||||||
private _turretConfig = [configFile >> "CfgVehicles" >> typeOf _vehicle, _turret] call EFUNC(common,getTurretConfigPath);
|
private _turretConfig = [configFile >> "CfgVehicles" >> typeOf _vehicle, _turret] call EFUNC(common,getTurretConfigPath);
|
||||||
|
|
||||||
@ -23,6 +24,8 @@ if (isNil "_distance") then {
|
|||||||
getNumber (_turretConfig >> QGVAR(MaxDistance)),
|
getNumber (_turretConfig >> QGVAR(MaxDistance)),
|
||||||
getNumber (_turretConfig >> QGVAR(MinDistance))
|
getNumber (_turretConfig >> QGVAR(MinDistance))
|
||||||
] call FUNC(getRange);
|
] call FUNC(getRange);
|
||||||
|
} else {
|
||||||
|
((uiNamespace getVariable ["ACE_dlgRangefinder", displayNull]) displayCtrl 1713151) ctrlSetText ([_distance, 4, 0] call CBA_fnc_formatNumber);
|
||||||
};
|
};
|
||||||
|
|
||||||
// MOVING TARGETS
|
// MOVING TARGETS
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project name="ACE">
|
<Project name="ACE">
|
||||||
<Package name="FCS">
|
<Package name="FCS">
|
||||||
<Key ID="STR_ACE_FCS_LaseTarget">
|
<Key ID="STR_ACE_FCS_LaseTarget">
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project name="ACE">
|
<Project name="ACE">
|
||||||
<Package name="FlashSuppressors">
|
<Package name="FlashSuppressors">
|
||||||
<Key ID="STR_ACE_FlashSuppressors_muzzle_mzls_H">
|
<Key ID="STR_ACE_FlashSuppressors_muzzle_mzls_H">
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
class ACE_Settings {
|
class ACE_Settings {
|
||||||
class GVAR(Enabled) {
|
class GVAR(enabled) {
|
||||||
category = CSTRING(Module_DisplayName);
|
category = CSTRING(Module_DisplayName);
|
||||||
displayName = CSTRING(EnableFrag);
|
displayName = CSTRING(EnableFrag);
|
||||||
description = CSTRING(EnableFrag_Desc);
|
description = CSTRING(EnableFrag_Desc);
|
||||||
typeName = "BOOL";
|
typeName = "BOOL";
|
||||||
value = 1;
|
value = 1;
|
||||||
};
|
};
|
||||||
class GVAR(SpallEnabled) {
|
class GVAR(spallEnabled) {
|
||||||
category = CSTRING(Module_DisplayName);
|
category = CSTRING(Module_DisplayName);
|
||||||
displayName = CSTRING(EnableSpall);
|
displayName = CSTRING(EnableSpall);
|
||||||
description = CSTRING(EnableSpall_Desc);
|
description = CSTRING(EnableSpall_Desc);
|
||||||
typeName = "BOOL";
|
typeName = "BOOL";
|
||||||
value = 0;
|
value = 0;
|
||||||
};
|
};
|
||||||
class GVAR(ReflectionsEnabled) {
|
class GVAR(reflectionsEnabled) {
|
||||||
category = CSTRING(Module_DisplayName);
|
category = CSTRING(Module_DisplayName);
|
||||||
displayName = CSTRING(EnableReflections);
|
displayName = CSTRING(EnableReflections);
|
||||||
description = CSTRING(EnableReflections_Desc);
|
description = CSTRING(EnableReflections_Desc);
|
||||||
@ -27,7 +27,7 @@ class ACE_Settings {
|
|||||||
typeName = "SCALAR";
|
typeName = "SCALAR";
|
||||||
value = 500;
|
value = 500;
|
||||||
};
|
};
|
||||||
class GVAR(MaxTrackPerFrame) {
|
class GVAR(maxTrackPerFrame) {
|
||||||
category = CSTRING(Module_DisplayName);
|
category = CSTRING(Module_DisplayName);
|
||||||
displayName = CSTRING(MaxTrackPerFrame);
|
displayName = CSTRING(MaxTrackPerFrame);
|
||||||
description = CSTRING(MaxTrackPerFrame_Desc);
|
description = CSTRING(MaxTrackPerFrame_Desc);
|
||||||
@ -35,7 +35,7 @@ class ACE_Settings {
|
|||||||
value = 50;
|
value = 50;
|
||||||
};
|
};
|
||||||
|
|
||||||
class GVAR(EnableDebugTrace) {
|
class GVAR(enableDebugTrace) {
|
||||||
category = CSTRING(Module_DisplayName);
|
category = CSTRING(Module_DisplayName);
|
||||||
displayName = CSTRING(EnableDebugTrace);
|
displayName = CSTRING(EnableDebugTrace);
|
||||||
description = CSTRING(EnableDebugTrace_Desc);
|
description = CSTRING(EnableDebugTrace_Desc);
|
||||||
|
@ -85,6 +85,7 @@ class CfgAmmo {
|
|||||||
class G_40mm_HE: GrenadeBase {
|
class G_40mm_HE: GrenadeBase {
|
||||||
// Source: http://www.inetres.com/gp/military/infantry/grenade/40mm_ammo.html#M441
|
// Source: http://www.inetres.com/gp/military/infantry/grenade/40mm_ammo.html#M441
|
||||||
GVAR(enabled) = 1;
|
GVAR(enabled) = 1;
|
||||||
|
GVAR(force) = 1;
|
||||||
|
|
||||||
GVAR(classes)[] = {"ACE_frag_tiny_HD"};
|
GVAR(classes)[] = {"ACE_frag_tiny_HD"};
|
||||||
GVAR(metal) = 200;
|
GVAR(metal) = 200;
|
||||||
@ -109,6 +110,7 @@ class CfgAmmo {
|
|||||||
};
|
};
|
||||||
class ACE_G_40mm_Practice: ACE_G_40mm_HE {
|
class ACE_G_40mm_Practice: ACE_G_40mm_HE {
|
||||||
GVAR(skip) = 1;
|
GVAR(skip) = 1;
|
||||||
|
GVAR(force) = 0;
|
||||||
};
|
};
|
||||||
class ACE_G40mm_HE_VOG25P: G_40mm_HE {
|
class ACE_G40mm_HE_VOG25P: G_40mm_HE {
|
||||||
GVAR(skip) = 0;
|
GVAR(skip) = 0;
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
PREP(dev_debugAmmo);
|
||||||
|
|
||||||
PREP(doSpall);
|
PREP(doSpall);
|
||||||
PREP(fired);
|
PREP(fired);
|
||||||
|
62
addons/frag/functions/fnc_dev_debugAmmo.sqf
Normal file
62
addons/frag/functions/fnc_dev_debugAmmo.sqf
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
#define DEBUG_MODE_FULL
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
params [["_debugMissing", true, [false]], ["_debugForce", false, [false]], ["_debugNonFrag", false, [false]]];
|
||||||
|
|
||||||
|
diag_log text format ["~~~~~~~~~~~~~Start [%1]~~~~~~~~~~~~~", _this];
|
||||||
|
|
||||||
|
private _allMagsConfigs = configProperties [configFile >> "CfgMagazines", "isClass _x", true];
|
||||||
|
private _processedCfgAmmos = [];
|
||||||
|
|
||||||
|
{
|
||||||
|
private _ammo = toLower getText (_x >> "ammo");
|
||||||
|
if ((_ammo != "") && {!(_ammo in _processedCfgAmmos)}) then {
|
||||||
|
_processedCfgAmmos pushBack _ammo;
|
||||||
|
|
||||||
|
//Ignore mines/bombs
|
||||||
|
if (_ammo isKindOf "TimeBombCore") exitWith {};
|
||||||
|
|
||||||
|
_ammoConfig = configFile >> "CfgAmmo" >> _ammo;
|
||||||
|
|
||||||
|
//Read configs and test if it would actually cause a frag, using same logic as FUNC(pfhRound)
|
||||||
|
private _skip = getNumber (_ammoConfig >> QGVAR(skip));
|
||||||
|
private _explosive = getNumber (_ammoConfig >> "explosive");
|
||||||
|
private _indirectRange = getNumber (_ammoConfig >> "indirectHitRange");
|
||||||
|
private _force = getNumber (_ammoConfig >> QGVAR(force));
|
||||||
|
private _fragPower = getNumber(_ammoConfig >> "indirecthit")*(sqrt((getNumber (_ammoConfig >> "indirectHitRange"))));
|
||||||
|
|
||||||
|
private _shouldAdd = (_skip == 0) && {(_force == 1) || {_explosive > 0.5 && {_indirectRange >= 4.5} && {_fragPower >= 35}}};
|
||||||
|
|
||||||
|
if (_shouldAdd) then {
|
||||||
|
if (_debugForce && {((getNumber(_ammoConfig >> "hit")) < 5) || {_fragPower < 10}}) then {
|
||||||
|
diag_log text format ["Ammo [%1] from Mag [%2] - Weak but will still frag!",_ammo,configName _x];
|
||||||
|
diag_log text format [" - _force=%1,_fragPower=%2",_force,_fragPower];
|
||||||
|
};
|
||||||
|
|
||||||
|
_warn = false;
|
||||||
|
|
||||||
|
_fragTypes = getArray (_ammoConfig >> "ACE_frag_CLASSES");
|
||||||
|
if(_fragTypes isEqualTo []) then {_warn = true;};
|
||||||
|
_c = getNumber(_ammoConfig >> "ACE_frag_CHARGE");
|
||||||
|
if(_c == 0) then {_warn = true;};
|
||||||
|
_m = getNumber(_ammoConfig >> "ACE_frag_METAL");
|
||||||
|
if(_m == 0) then {_warn = true;};
|
||||||
|
_k = getNumber(_ammoConfig >> "ACE_frag_GURNEY_K");
|
||||||
|
if(_k == 0) then {_warn = true;};
|
||||||
|
_gC = getNumber(_ammoConfig >> "ACE_frag_GURNEY_C");
|
||||||
|
if(_gC == 0) then { _warn = true;};
|
||||||
|
|
||||||
|
if(_debugMissing && _warn) then {
|
||||||
|
diag_log text format ["Ammo [%1] from Mag [%2] MISSING frag configs:",_ammo,configName _x];
|
||||||
|
diag_log text format [" - _c=%1,_m=%2,_k=%3,_gC=%4,_fragTypes=%5",_c,_m,_k,_gC,_fragTypes];
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
if (_debugNonFrag && {isArray (_ammoConfig >> "ACE_frag_CLASSES")}) then {
|
||||||
|
diag_log text format ["Ammo [%1] from Mag [%2] has frag configs but will NOT frag:",_ammo,configName _x];
|
||||||
|
diag_log text format ["- skip=%1,explosive=%2,indirectHitRange=%3,force=%4,fragPower=%5",_skip,_explosive,_indirectRange,_force,_fragPower];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
} forEach _allMagsConfigs;
|
||||||
|
|
||||||
|
diag_log text format ["~~~~~~~~~~~~~End [%1-%2]~~~~~~~~~~~~~", count _allMagsConfigs, count _processedCfgAmmos];
|
@ -13,10 +13,6 @@ if(count _this > 2) then {
|
|||||||
if(_depth <= 2) then {
|
if(_depth <= 2) then {
|
||||||
_indirectHitRange = getNumber(configFile >> "CfgAmmo" >> _ammo >> "indirectHitRange");
|
_indirectHitRange = getNumber(configFile >> "CfgAmmo" >> _ammo >> "indirectHitRange");
|
||||||
_indirectHit = getNumber(configFile >> "CfgAmmo" >> _ammo >> "indirectHit");
|
_indirectHit = getNumber(configFile >> "CfgAmmo" >> _ammo >> "indirectHit");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
_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;
|
||||||
};
|
};
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user