Merge branch 'missileDynamics' of github.com:TheCandianVendingMachine/ACE3 into missileDynamics

This commit is contained in:
Brandon Danyluk
2022-01-01 19:11:39 -07:00
703 changed files with 7924 additions and 1974 deletions

View File

@ -15,7 +15,7 @@ jobs:
with:
toolsUrl: ${{ secrets.ARMA3_TOOLS_URL }}
- name: Install Mikero Tools
uses: arma-actions/mikero-tools@2021-04-10
uses: arma-actions/mikero-tools@2021-11-06
- name: Download game data
run: |
Invoke-WebRequest "$env:ARMA3_DATA_URL" -OutFile arma3.zip

View File

@ -151,7 +151,9 @@ Riccardo Petricca <petriccarcc@gmail.com>
Robert Boklahánics <bokirobi@gmail.com>
ruPaladin <happyworm24@rambler.ru>
Rutger "RedBery" Meijering <c.redbery@gmail.com>
sancron
Schwaggot <tom.ryan@posteo.de>
Seb <sebsmith90@gmail.com>
shukari
simon84 <badguy360th@gmail.com>
Skengman2

View File

@ -4,7 +4,7 @@
<p align="center">
<a href="https://github.com/acemod/ACE3/releases/latest">
<img src="https://img.shields.io/badge/Version-3.13.6-blue.svg?style=flat-square" alt="ACE3 Version">
<img src="https://img.shields.io/badge/Version-3.14.0-blue.svg?style=flat-square" alt="ACE3 Version">
</a>
<a href="https://github.com/acemod/ACE3/issues">
<img src="https://img.shields.io/github/issues-raw/acemod/ACE3.svg?style=flat-square&label=Issues" alt="ACE3 Issues">

View File

@ -4,7 +4,7 @@ class ACE_Settings {
};
class GVAR(muzzleVelocityVariationEnabled) {
movedToSQF = 1;
};
};
class GVAR(ammoTemperatureEnabled) {
movedToSQF = 1;
};

View File

@ -52,4 +52,4 @@ class RscTitles {
};
};
};
};
};

View File

@ -68,7 +68,7 @@ for "_i" from 0 to (count _cfgWeapons)-1 do {
private _barrelVelocityShift = [_barrelLength, _muzzleVelocityTable, _barrelLengthTable, _vanillaInitialSpeed] call FUNC(calculateBarrelLengthVelocityShift);
private _abInitialSpeed = _vanillaInitialSpeed + _barrelVelocityShift;
// --------------------------------------------------
if (_weapon find "_base" == -1 && _weapon find "_Base" == -1) then {
#ifdef DEBUG_INIT_SPEEDS
_data pushBack [-_forEachIndex, _abInitialSpeed, _magazine, _weapon];

View File

@ -31,12 +31,14 @@ if (_abort) then {
private _maxRange = uiNamespace getVariable format[QGVAR(maxRange_%1), _ammo];
if (isNil "_maxRange") then {
private _airFriction = getNumber(configFile >> "CfgAmmo" >> _ammo >> "airFriction");
private _maxRange = if (_airFriction < 0) then {
private _vanillaInitialSpeed = getNumber (configFile >> "CfgMagazines" >> _magazine >> "initSpeed");
_maxRange = if (_airFriction < 0) then {
private _maxTime = ((_vanillaInitialSpeed - BULLET_TRACE_MIN_VELOCITY) / (BULLET_TRACE_MIN_VELOCITY * -_airFriction * _vanillaInitialSpeed)) max getNumber(configFile >> "CfgAmmo" >> _ammo >> "tracerEndTime");
-ln(1 - _airFriction * _vanillaInitialSpeed * _maxTime) / _airFriction
} else {
_vanillaInitialSpeed * getNumber(configFile >> "CfgAmmo" >> _ammo >> "tracerEndTime")
};
_maxRange = _maxRange * 1.3; // Adding 30% more to range just to be safe
uiNamespace setVariable [format[QGVAR(maxRange_%1), _ammo], _maxRange];
};
if (ACE_player distance _unit > _maxRange && {ACE_player distance ((getPosASL _unit) vectorAdd ((vectorNormalized _bulletVelocity) vectorMultiply _maxRange)) > _maxRange}) exitWith {};

View File

@ -1 +1 @@
#include "\z\ace\addons\advanced_ballistics\script_component.hpp"
#include "\z\ace\addons\advanced_ballistics\script_component.hpp"

View File

@ -25,7 +25,7 @@ _posAndSize set [2, _stamina * GVAR(staminaBarWidth)];
_staminaBarContainer ctrlSetPosition _posAndSize;
// - Opacity ------------------------------------------------------------------
if (GVAR(fadeStaminaBar)) then {
if (GVAR(fadeStaminaBar)) then {
if (_stamina >= 0.8) then {
_staminaBarContainer ctrlSetFade (0.9 + 0.1 * (_stamina - 0.8) / 0.2);
} else {

View File

@ -33,7 +33,7 @@ private _unitMoveListUnits = (_unitMoveList apply {_x select 0});
_x setVariable [QGVAR(garrisonMove_unitPosMemory), nil, true];
} foreach _unitMoveListUnits;
// Avoid duplicate PFHs
// Avoid duplicate PFHs
if (isNil QGVAR(garrison_moveUnitPFH)) then {
missionNameSpace setVariable [QGVAR(garrison_moveUnitPFH), true, true];
@ -114,7 +114,7 @@ if (isNil QGVAR(garrison_moveUnitPFH)) then {
(_unit getVariable [QGVAR(garrisonMove_unitPosMemory), [CBA_missionTime, [0,0,0]]]) params ["_unitPosTimer", "_unitOldPos"];
// AI may sometimes not be able to report unitReady, this is to avoid the PFH running forever
switch true do {
switch true do {
case ((_unitPos distance _pos) < 1.5) : {
call _fnc_attemptSuccessful;
};
@ -127,7 +127,7 @@ if (isNil QGVAR(garrison_moveUnitPFH)) then {
default {
_unit setVariable [QGVAR(garrisonMove_unitPosMemory), [CBA_missionTime, _unitPos]];
};
};
};
};
};

View File

@ -37,5 +37,8 @@
<Key ID="STR_ACE_AIM120_direct">
<English>Direct</English>
</Key>
<Key ID="STR_ACE_AIM120_loft">
<English>Loft</English>
</Key>
</Package>
</Project>

View File

@ -19,13 +19,13 @@ class CfgMagazines {
displayName = CSTRING(GatlingDescriptionAP);
displayNameShort = CSTRING(GatlingDescriptionShortAP);
};
class ACE_1000Rnd_Gatling_30mm_Plane_CAS_CM41: 1000Rnd_Gatling_30mm_Plane_CAS_01_F {
ammo = "ACE_Gatling_30mm_Sub_CM41";
displayName = CSTRING(GatlingDescriptionCM41);
displayNameShort = CSTRING(GatlingDescriptionShortCM41);
};
class ACE_1000Rnd_Gatling_30mm_Plane_CAS_CM51: 1000Rnd_Gatling_30mm_Plane_CAS_01_F {
ammo = "ACE_Gatling_30mm_Sub_CM51";
displayName = CSTRING(GatlingDescriptionCM51);

View File

@ -1,6 +1,6 @@
class RscControlsGroup;
class RscText;
class RangeText: RscText{};
class RangeText: RscText {};
class RscPicture;
class RscOpticsText;
class RscIGProgress;

View File

@ -42,12 +42,12 @@ if (_position >= 0 && _position <= 9) then {
private _cfgWeapons = configFile >> "CfgWeapons";
_items = _items select {
private _configItemInfo = _cfgWeapons >> _x >> "ItemInfo";
_x isKindOf ["CBA_MiscItem", _cfgWeapons] && {getNumber (_configItemInfo >> "type") in [TYPE_MUZZLE, TYPE_OPTICS, TYPE_FLASHLIGHT, TYPE_BIPOD]} ||
{getNumber (_configItemInfo >> "type") in [TYPE_FIRST_AID_KIT, TYPE_MEDIKIT, TYPE_TOOLKIT]} ||
{getText (_cfgWeapons >> _x >> "simulation") == "ItemMineDetector"}
};
_return = _position;
GVAR(customRightPanelButtons) set [_position, [_items apply {toLower _x}, _picture, _tooltip]];
};

View File

@ -25,10 +25,10 @@ if (GVAR(shiftState) && {is3DEN}) then {
{
if (
count _x == 2 &&
{_x select 0 isEqualType ""} &&
count _x == 2 &&
{_x select 0 isEqualType ""} &&
{_x select 0 != ""} &&
{_x select 1 isEqualType []} &&
{_x select 1 isEqualType []} &&
{count (_x select 1) == 10}
) then {
_x call FUNC(addDefaultLoadout);

View File

@ -38,7 +38,7 @@ if (GVAR(currentLoadoutsTab) != IDC_buttonSharedLoadouts) then {
{
_x params ["_loadoutName", "_loadoutData"];
private _loadoutCachedInfo = _contentPanelCtrl getVariable (_loadoutName + str GVAR(currentLoadoutsTab));
private _loadoutCachedInfo = _contentPanelCtrl getVariable (_loadoutName + str GVAR(currentLoadoutsTab));
if (isNil "_loadoutCachedInfo") then {
[_loadoutData] call FUNC(verifyLoadout)

View File

@ -191,7 +191,6 @@ if (!isNil "_itemCfg") then {
] find GVAR(currentLeftPanel), true] call _handleStatsFnc;
};
} else {
switch (GVAR(currentRightPanel)) do {
case IDC_buttonOptic: {
[0, false] call _handleStatsFnc;
@ -220,6 +219,11 @@ if (!isNil "_itemCfg") then {
case IDC_buttonMisc: {
[7, false] call _handleStatsFnc;
};
default {
if (GVAR(currentRightPanel) in [RIGHT_PANEL_CUSTOM_BUTTONS]) then {
[7, false] call _handleStatsFnc;
};
};
};
};
} else {

View File

@ -45,7 +45,7 @@ private _fnc_selectRight = {
if (GVAR(currentLeftPanel) in [IDC_buttonUniform, IDC_buttonVest, IDC_buttonBackpack]) then {
[
_item,
_item,
["CfgWeapons", "CfgMagazines"] select (GVAR(currentRightPanel) in [IDC_buttonMag, IDC_buttonMagALL, IDC_buttonThrow, IDC_buttonPut])
] call _fnc_selectRight;
};

View File

@ -8,7 +8,7 @@
* 1: item config path (CONFIG)
*
* Return Value:
* String to display
* String to display
*
* Public: No
*/

View File

@ -20,7 +20,7 @@ private _opticsModes = ("true" configClasses (_config >> "ItemInfo" >> "OpticsMo
private _visionMode = getArray (_x >> "visionMode");
[
getNumber (_x >> "useModelOptics") == 1, //is in optics
_visionMode isEqualTo [], //optional NVG
_visionMode isEqualTo [], //optional NVG
"NVG" in _visionMode, //Integrated NVG
"Ti" in _visionMode //Integrated Thermal
]

View File

@ -1 +1 @@
#include "\z\ace\addons\arsenal\script_component.hpp"
#include "\z\ace\addons\arsenal\script_component.hpp"

View File

@ -422,6 +422,7 @@
<Spanish>Ordenar por protección balística</Spanish>
<Russian>Сортировка по баллистической защите</Russian>
<Polish>Sortuj po ochronie balistycznej</Polish>
<German>Nach ballistischem Schutz sortieren</German>
</Key>
<Key ID="STR_ACE_Arsenal_sortByProtectionExplosive">
<English>Sort by explosive protection</English>
@ -430,6 +431,7 @@
<Spanish>Ordenar por protección de explosivos</Spanish>
<Russian>Сортировка по защите от взрывов</Russian>
<Polish>Sortuj po ochronie przeciw wybuchom</Polish>
<German>Nach Explosionsschutz sortieren</German>
</Key>
<Key ID="STR_ACE_Arsenal_buttonShareTooltip">
<English>Share or stop sharing the selected loadout</English>
@ -1386,6 +1388,7 @@
<Polish>Opoźnienie zapalnika</Polish>
<Japanese>信管設定時間</Japanese>
<Spanish>Tiempo de espoleta</Spanish>
<German>Detonationsverzögerung</German>
</Key>
<Key ID="STR_ACE_Arsenal_DetonatesOnImpact">
<English>Detonates on impact</English>

View File

@ -1 +1 @@
#include "\z\ace\addons\arsenal\script_component.hpp"
#include "\z\ace\addons\arsenal\script_component.hpp"

View File

@ -42,7 +42,7 @@ class GVAR(rangeTableDialog) {
colorSelectBackground[] = {0, 0, 0, 0.025};
colorSelectBackground2[] = {0, 0, 0, 0.025};
colorScrollbar[] = {0.95,0,0.95,1};
class ListScrollBar: ScrollBar{
class ListScrollBar: ScrollBar {
color[] = {0,0,0,0.6};
};
};

View File

@ -1,5 +1,3 @@
// CBA Settings [ADDON: ace_artillerytables]:
private _categoryName = [format ["ACE %1", localize "str_a3_cfgmarkers_nato_art"], LLSTRING(rangetable_displayName)];
[

View File

@ -1 +1 @@
#include "\z\ace\addons\atragmx\script_component.hpp"
#include "\z\ace\addons\atragmx\script_component.hpp"

View File

@ -1,7 +1,7 @@
#include "script_component.hpp"
/*
* Author: PabstMirror
* Handles when vehicle or man is killed.
* Handles when vehicle or man is killed.
* Note: Runs where unit is local.
*
* Arguments:

View File

@ -1 +1 @@
#include "\z\ace\addons\attach\script_component.hpp"
#include "\z\ace\addons\attach\script_component.hpp"

View File

@ -1 +1 @@
#include "\z\ace\addons\backpacks\script_component.hpp"
#include "\z\ace\addons\backpacks\script_component.hpp"

View File

@ -280,7 +280,7 @@ class CfgAmmo {
class B_762x51_Ball: BulletBase {
airFriction=-0.00103711;
tracerScale = 1.2; //0.6;
tracerStartTime=0.073; // Based on the British L5A1 which burns out to 1000m
tracerStartTime=0.073; // Based on the British L5A1 which burns out to 1000m
tracerEndTime=2.15957; // Time in seconds calculated with ballistics calculator
ACE_caliber=7.823;
ACE_bulletLength=28.956;
@ -365,20 +365,30 @@ class CfgAmmo {
ACE_barrelLengths[]={330.2, 406.4, 508.0};
};
class ACE_762x51_Ball_Subsonic: B_762x51_Ball {
airFriction=-0.00060194;
caliber=1;
hit=6;
typicalSpeed=320;
ACE_caliber=7.823;
ACE_bulletLength=34.036;
ACE_bulletMass=12.96;
ACE_ammoTempMuzzleVelocityShifts[]={-2.655, -2.547, -2.285, -2.012, -1.698, -1.280, -0.764, -0.153, 0.596, 1.517, 2.619};
ACE_ballisticCoefficients[]={0.235};
ACE_velocityBoundaries[]={};
ACE_standardAtmosphere="ICAO";
ACE_dragModel=7;
ACE_muzzleVelocities[]={305, 325, 335, 340};
ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4};
airFriction = -0.00060194;
caliber = 1;
hit = 6;
typicalSpeed = 320;
visibleFire = 1; // B_762x51_Ball: 3
audibleFire = 5; // B_762x51_Ball: 45
dangerRadiusBulletClose = 4; // B_762x51_Ball: 8
suppressionRadiusBulletClose = 2; // B_762x51_Ball: 6
ACE_caliber = 7.823;
ACE_bulletLength = 34.036;
ACE_bulletMass = 12.96;
ACE_ammoTempMuzzleVelocityShifts[] = {-2.655, -2.547, -2.285, -2.012, -1.698, -1.280, -0.764, -0.153, 0.596, 1.517, 2.619};
ACE_ballisticCoefficients[] = {0.235};
ACE_velocityBoundaries[] = {};
ACE_standardAtmosphere = "ICAO";
ACE_dragModel = 7;
ACE_muzzleVelocities[] = {305, 325, 335, 340};
ACE_barrelLengths[] = {406.4, 508.0, 609.6, 660.4};
class CamShakeExplode {
power = 2.2360699; // B_762x51_Ball: 2.8284299
duration = 0.4; // B_762x51_Ball: 0.6
frequency = 20; // B_762x51_Ball: 20
distance = 6.7082; // B_762x51_Ball: 8.48528
};
};
class ACE_762x67_Ball_Mk248_Mod_0: B_762x51_Ball {
airFriction=-0.00072468;

View File

@ -1 +1 @@
#include "\z\ace\addons\ballistics\script_component.hpp"
#include "\z\ace\addons\ballistics\script_component.hpp"

View File

@ -2761,15 +2761,31 @@
</Key>
<Key ID="STR_ACE_Ballistics_30Rnd_65x47_Scenar_mag_Name">
<English>6.5x47 mm 30Rnd Sand Mag (HPBT Scenar)</English>
<Japanese>6.5x47 mm 30発入り サンド 弾倉 (HPBT Scenar)</Japanese>
<French>Ch. 6,5x47 mm 30Cps Sable (HPBT Scenar)</French>
<German>6.5x47 mm 30-Patronen-Magazin Sandfarben (HPBT Scenar)</German>
<Polish>Magazynek 6.5x47 mm 30rd Piaskowy (HPBT Scenar)</Polish>
</Key>
<Key ID="STR_ACE_Ballistics_30Rnd_65x47_Scenar_msbs_mag_Name">
<English>6.5x47 mm 30Rnd Promet Mag (HPBT Scenar)</English>
<Japanese>6.5x47 mm 30発入り プロメット 弾倉 (HPBT Scenar)</Japanese>
<French>Ch. 6,5x47 mm 30Cps Promet (HPBT Scenar)</French>
<German>6.5x47 mm 30-Patronen-Magazin für Promet (HPBT Scenar)</German>
<Polish>Magazynek 6.5x47 mm 30rd Promet (HPBT Scenar)</Polish>
</Key>
<Key ID="STR_ACE_Ballistics_30Rnd_65x47_Scenar_black_mag_Name">
<English>6.5x47 mm 30Rnd Black Mag (HPBT Scenar)</English>
<Japanese>6.5x47 mm 30発入り ブラック 弾倉 (HPBT Scenar)</Japanese>
<French>Ch. 6,5x47 mm 30Cps Noir (HPBT Scenar)</French>
<German>6.5x47 mm 30-Patronen-Magazin Schwarz (HPBT Scenar)</German>
<Polish>Magazynek 6.5x47 mm 30rd Czarny (HPBT Scenar)</Polish>
</Key>
<Key ID="STR_ACE_Ballistics_30Rnd_65x47_Scenar_khaki_mag_Name">
<English>6.5x47 mm 30Rnd Khaki Mag (HPBT Scenar)</English>
<Japanese>6.5x47 mm 30発入り カーキ 弾倉 (HPBT Scenar)</Japanese>
<French>Ch. 6,5x47 mm 30Cps Kaki (HPBT Scenar)</French>
<German>6.5x47 mm 30-Patronen-Magazin Khaki (HPBT Scenar)</German>
<Polish>Magazynek 6.5x47 mm 30rd Khaki (HPBT Scenar)</Polish>
</Key>
<Key ID="STR_ACE_Ballistics_30Rnd_65x47_Scenar_mag_NameShort">
<English>6.5 mm Lapua</English>
@ -2824,15 +2840,31 @@
</Key>
<Key ID="STR_ACE_Ballistics_30Rnd_65_Creedmor_mag_Name">
<English>6.5 mm Creedmor 30Rnd Sand Mag</English>
<Japanese>6.5 mm クリードモア 30発入り サンド 弾倉</Japanese>
<French>Ch. 6,5 mm Creedmor 30Cps Sable</French>
<German>6.5 mm Creedmor 30-Patronen-Magazin Sandfarben</German>
<Polish>Magazynek 6.5 mm Creedmor 30Rnd Piaskowy</Polish>
</Key>
<Key ID="STR_ACE_Ballistics_30Rnd_65_Creedmor_msbs_mag_Name">
<English>6.5 mm Creedmor 30Rnd Promet Mag</English>
<Japanese>6.5 mm クリードモア 30発入り プロメット 弾倉</Japanese>
<French>Ch. 6,5 mm Creedmor 30Cps Promet</French>
<German>6.5 mm Creedmor 30-Patronen-Magazin für Promet</German>
<Polish>Magazynek 6.5 mm Creedmor 30Rnd Promet</Polish>
</Key>
<Key ID="STR_ACE_Ballistics_30Rnd_65_Creedmor_black_mag_Name">
<English>6.5 mm Creedmor 30Rnd Black Mag</English>
<Japanese>6.5 mm クリードモア 30発入り ブラック 弾倉</Japanese>
<French>Ch. 6,5 mm Creedmor 30Cps Noir</French>
<German>6.5 mm Creedmor 30-Patronen-Magazin Schwarz</German>
<Polish>Magazynek 6.5 mm Creedmor 30Rnd Czarny</Polish>
</Key>
<Key ID="STR_ACE_Ballistics_30Rnd_65_Creedmor_khaki_mag_Name">
<English>6.5 mm Creedmor 30Rnd Khaki Mag</English>
<Japanese>6.5 mm クリードモア 30発入り カーキ 弾倉</Japanese>
<French>Ch. 6,5 mm Creedmor 30Cps Kaki</French>
<German>6.5 mm Creedmor 30-Patronen-Magazin Khaki</German>
<Polish>Magazynek 6.5 mm Creedmor 30Rnd Khaki</Polish>
</Key>
<Key ID="STR_ACE_Ballistics_30Rnd_65_Creedmor_mag_NameShort">
<English>6.5 mm CM</English>
@ -3277,21 +3309,21 @@
<Turkish>12.7 mm</Turkish>
</Key>
<Key ID="STR_ACE_Ballistics_127x99_API_Mag_NameShort">
<English>12.7mm API</English>
<French>12,7mm API</French>
<Spanish>12.7mm API</Spanish>
<Polish>12,7mm API</Polish>
<Italian>12.7mm API</Italian>
<English>12.7 mm API</English>
<French>12,7 mm API</French>
<Spanish>12.7 mm API</Spanish>
<Polish>12,7 mm API</Polish>
<Italian>12.7 mm API</Italian>
<Russian>12.7 мм бронебойно-зажигательные</Russian>
<German>12,7mm API</German>
<Czech>12.7mm API</Czech>
<Portuguese>12.7mm API</Portuguese>
<Hungarian>12,7mm páncéltörő-gyújtó</Hungarian>
<Japanese>12.7mm 焼夷徹甲弾</Japanese>
<Korean>12.7mm 철갑소이탄</Korean>
<German>12,7 mm API</German>
<Czech>12.7 mm API</Czech>
<Portuguese>12.7 mm API</Portuguese>
<Hungarian>12,7 mm páncéltörő-gyújtó</Hungarian>
<Japanese>12.7 mm 焼夷徹甲弾</Japanese>
<Korean>12.7 mm 철갑소이탄</Korean>
<Chinese>12.7毫米 穿甲燃燒彈</Chinese>
<Chinesesimp>12.7mm 穿甲燃烧弹</Chinesesimp>
<Turkish>12.7mm API</Turkish>
<Chinesesimp>12.7 mm 穿甲燃烧弹</Chinesesimp>
<Turkish>12.7 mm API</Turkish>
</Key>
<Key ID="STR_ACE_Ballistics_AmmoSupplyCrate_DisplayName">
<English>[ACE] Ammo Supply Crate</English>

View File

@ -1 +1 @@
#include "\z\ace\addons\captives\script_component.hpp"
#include "\z\ace\addons\captives\script_component.hpp"

View File

@ -426,12 +426,20 @@ class CfgVehicles {
class Land_CanisterFuel_F: Items_base_F {
GVAR(size) = 1;
GVAR(canLoad) = 1;
EGVAR(cargo,noRename) = 1;
};
// Flexible Fuel tanks, 300L
class FlexibleTank_base_F: ThingX {
GVAR(size) = 3;
GVAR(canLoad) = 1;
};
// objects
class RoadCone_F: ThingX {
GVAR(size) = 1;
GVAR(canLoad) = 1;
EGVAR(cargo,noRename) = 1;
};
class RoadBarrier_F: RoadCone_F {
GVAR(size) = 2;
@ -441,15 +449,18 @@ class CfgVehicles {
class Land_PortableLight_single_F: Lamps_base_F {
GVAR(size) = 2;
GVAR(canLoad) = 1;
EGVAR(cargo,noRename) = 1;
};
class FloatingStructure_F;
class Land_Camping_Light_F: FloatingStructure_F {
GVAR(size) = 0.2;
GVAR(canLoad) = 1;
EGVAR(cargo,noRename) = 1;
};
class Land_Camping_Light_off_F: ThingX {
GVAR(size) = 0.2;
GVAR(canLoad) = 1;
EGVAR(cargo,noRename) = 1;
};

View File

@ -90,6 +90,7 @@ GVAR(vehicleAction) = [
GVAR(objectActions) = [
[QGVAR(renameObject), LELSTRING(common,rename), "", //TODO: add icon, maybe a pencil couldn't find it before.
{
//IGNORE_PRIVATE_WARNING ["_target", "_player"];
GVAR(interactionVehicle) = _target;
createDialog QGVAR(renameMenu);
},
@ -100,8 +101,7 @@ GVAR(objectActions) = [
{(_target getVariable [QGVAR(canLoad), getNumber (configOf _target >> QGVAR(canLoad))]) in [true, 1]} &&
{alive _target} &&
{[_player, _target, ["isNotSwimming"]] call EFUNC(common,canInteractWith)} &&
{!((typeOf _target) in ["ACE_Wheel", "ACE_Track"])} && // Exclude Wheel and Track
{!(_target iskindOf "Land_CanisterFuel_F")} // Exclude Fuel Canisters
{(getNumber ((configOf _target) >> QGVAR(noRename))) == 0}
}
] call EFUNC(interact_menu,createAction),
[QGVAR(load), localize LSTRING(loadObject), "a3\ui_f\data\IGUI\Cfg\Actions\loadVehicle_ca.paa",
@ -152,3 +152,10 @@ private _objectClassesAddClassEH = call (uiNamespace getVariable [QGVAR(objectCl
{
[_x, "initPost", DFUNC(initObject), nil, nil, true] call CBA_fnc_addClassEventHandler;
} forEach _objectClassesAddClassEH;
if (isServer) then {
["ace_placedInBodyBag", {
params ["_target", "_bodyBag"];
_bodyBag setVariable [QGVAR(customName), [_target, false, true] call EFUNC(common,getName), true];
}] call CBA_fnc_addEventHandler;
};

View File

@ -98,7 +98,7 @@ if (_showHint) then {
[
[
LSTRING(UnloadedItem),
[_itemObject, true] call FUNC(getNameItem),
[_object, true] call FUNC(getNameItem),
getText (configOf _vehicle >> "displayName")
],
3

View File

@ -56,7 +56,7 @@ if (_object isEqualType objNull) then {
} else {
_object = createVehicle [_item, _emptyPosAGL, [], 0, "NONE"];
_object setPosASL (AGLtoASL _emptyPosAGL);
[QEGVAR(common,fixCollision), _object] call CBA_fnc_localEvent;
[QEGVAR(common,fixPosition), _object] call CBA_fnc_localEvent;
};

View File

@ -6,7 +6,7 @@ class GVAR(menu) {
onLoad = QUOTE([_this select 0] call FUNC(onMenuOpen));
onUnload = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(menuDisplay)),nil)];);
class controlsBackground {
class HeaderBackground: ACE_gui_backgroundBase{
class HeaderBackground: ACE_gui_backgroundBase {
idc = -1;
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
x = "13 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";

View File

@ -6,7 +6,7 @@ class GVAR(renameMenu) {
onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(menuDisplay)),_this select 0)];);
onUnload = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(menuDisplay)),nil)];);
class controlsBackground {
class HeaderBackground: ACE_gui_backgroundBase{
class HeaderBackground: ACE_gui_backgroundBase {
idc = -1;
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
x = "13 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";

View File

@ -35,18 +35,43 @@
</Key>
<Key ID="STR_ACE_Cargo_renamedObject">
<English>Renamed to:&lt;br/&gt;%1</English>
<Japanese>名前を次に変更:&lt;br/&gt;%1</Japanese>
<French>Renommé en :&lt;br/&gt;%1</French>
<Russian>Переименовано в:</Russian>
<German>Neu Bewaffnet: &lt;br/&gt;%1</German>
<Polish>Nazwa zmieniona na:&lt;br/&gt;%1</Polish>
</Key>
<Key ID="STR_ACE_Cargo_clearedCustomName">
<English>Custom name has been cleared.</English>
<Japanese>カスタム名が削除されました。</Japanese>
<French>Le nom personnalisé a été supprimé.</French>
<Russian>Пользовательское название удалено.</Russian>
<German>Eigener Name wurde gelöscht.</German>
<Polish>Własna nazwa została usunięta</Polish>
</Key>
<Key ID="STR_ACE_Cargo_renameObjectUI">
<English>Set New Name:</English>
<Japanese>新しい名前:</Japanese>
<French>Définir un nouveau nom :</French>
<Russian>Задать новое название:</Russian>
<German>Neuen Namen setzen:</German>
<Polish>Ustaw nową nazwę:</Polish>
</Key>
<Key ID="STR_ACE_Cargo_ModuleSettings_enableRename">
<English>Enable Rename Action</English>
<Japanese>名前変更を有効化</Japanese>
<French>Possibilité de renommage</French>
<Russian>Включить возможность переименования</Russian>
<German>Aktiviere Umbenennungs-Aktion</German>
<Polish>Włącz możliwość zmiany nazwy</Polish>
</Key>
<Key ID="STR_ACE_Cargo_ModuleSettings_enableRename_Description">
<English>Enables the rename action for renamable objects.</English>
<Japanese>名前変更が可能なオブジェクトに対して、名前変更動作を有効化します。</Japanese>
<French>Active la possibilité de donner un nom personnalisé aux objets transportables (si renommables).</French>
<Russian>Включает переименование для объектов, допускающих переименование.</Russian>
<German>Aktiviert die Umbenennungs-Aktion für neu benennbare Objekte.</German>
<Polish>Włącza akcję zmiany nazwy dla obiektów z możliwością zmiany nazwy.</Polish>
</Key>
<Key ID="STR_ACE_Cargo_openMenu">
<English>Cargo</English>
@ -256,9 +281,18 @@
</Key>
<Key ID="STR_ACE_Cargo_customName_edenName">
<English>Custom Name</English>
<Japanese>カスタム名</Japanese>
<French>Nom personnalisé</French>
<German>Eigener Name</German>
<Polish>Własna nazwa</Polish>
</Key>
<Key ID="STR_ACE_Cargo_customName_edenDesc">
<English>Set a custom cargo name used in the cargo interface.</English>
<Japanese>カーゴ欄で使われるカスタム名を設定します。</Japanese>
<French>Définit un nom de fret personnalisé qui sera visible dans le menu de cargaison.</French>
<Russian>Установить пользовательское имя груза, используемое в интерфейсе погрузки.</Russian>
<German>Definiere eigenen Frachtnamen, welcher im Frachtraum genutzt wird.</German>
<Polish>Ustaw własną nazwę ładunku, używaną w menu ładunku.</Polish>
</Key>
<Key ID="STR_ACE_Cargo_space_edenName">
<English>Cargo Space</English>
@ -411,10 +445,20 @@
<Key ID="STR_ACE_Cargo_openAfterUnload">
<English>Reopen Cargo Menu</English>
<Turkish>Kargo Menüsünü Tekrar Aç</Turkish>
<Japanese>カーゴ メニューを再度開く</Japanese>
<French>Rouvrir le menu de cargaison</French>
<Russian>Переоткрыть меню погрузки</Russian>
<German>Frachtmenü erneut öffnen</German>
<Polish>Ponownie otwórz menu załadunku</Polish>
</Key>
<Key ID="STR_ACE_Cargo_openAfterUnload_description">
<English>Reopen the Cargo Menu after successful unload.</English>
<Turkish>Başarılı bir yük indirmeden sonra Kargo Menüsünü tekrar göster.</Turkish>
<Japanese>カーゴを降ろした後に再びカーゴ メニューを開きます。</Japanese>
<French>Réouvre le menu de cargaison après un déchargement réussi.</French>
<Russian>Переоткрыть меню погрузки после успешной выгрузки.</Russian>
<German>Frachtmenü erneut öffnen, nach erfolgreichen Entladen.</German>
<Polish>Ponownie otwórz menu załadunku po udanym wyładowaniu.</Polish>
</Key>
</Package>
</Project>

View File

@ -2,57 +2,57 @@
class CfgAmmo {
class Chemlight_base;
class Chemlight_Blue: Chemlight_base {
timeToLive = 28800; // 8h as per cyalume website
};
class Chemlight_Red: Chemlight_base {
timeToLive = 43200; // 12h as per cyalume website
};
class Chemlight_Green: Chemlight_base {
timeToLive = 43200;
};
class Chemlight_Yellow: Chemlight_base {
timeToLive = 43200;
};
class ACE_G_Chemlight_Orange: Chemlight_base {
timeToLive = 43200;
effectsSmoke = "ACE_ChemlightEffect_Orange";
model = "\A3\Weapons_f\chemlight\chemlight_yellow_lit";
};
class ACE_G_Chemlight_Orange_Infinite: ACE_G_Chemlight_Orange {
timeToLive = 1e10;
};
class ACE_G_Chemlight_White: Chemlight_base {
timeToLive = 28800;
effectsSmoke = "ACE_ChemlightEffect_White";
model = "\A3\Weapons_f\chemlight\chemlight_yellow_lit";
};
class ACE_G_Chemlight_White_Infinite: ACE_G_Chemlight_White {
timeToLive = 1e10;
};
class ACE_G_Chemlight_HiRed: Chemlight_Red {
class ACE_G_Chemlight_HiRed: Chemlight_Red {
effectsSmoke = "ACE_ChemlightEffect_HiRed";
timeToLive = 1800;
};
class ACE_G_Chemlight_HiRed_Infinite: ACE_G_Chemlight_HiRed {
timeToLive = 1e10;
};
class ACE_G_Chemlight_HiYellow: Chemlight_Yellow {
effectsSmoke = "ACE_ChemlightEffect_HiYellow";
timeToLive = 1800;
};
class ACE_G_Chemlight_HiYellow_Infinite: ACE_G_Chemlight_HiYellow {
timeToLive = 1e10;
};
@ -88,7 +88,7 @@ class CfgAmmo {
effectsSmoke = "ACE_ChemlightEffect_UltraHiOrange";
timeToLive = 300;
};
class ACE_G_Chemlight_UltraHiOrange_Infinite: ACE_G_Chemlight_UltraHiOrange {
timeToLive = 1e10;
};

View File

@ -99,7 +99,7 @@ class CfgLights {
class ACE_ChemlightLight_UltraHiOrange: ACE_ChemlightLight_Orange {
intensity = 12000;
ULTRA_HI_ATTENUATION
};

View File

@ -40,7 +40,7 @@ if ((_namespace getVariable [_uid, [-99999]]) select 0 < diag_tickTime) then {
INFO_1("Clear cached variables on event: %1",_eventName);
#endif
// Get the list of caches to clear
//IGNORE_PRIVATE_WARNING ["_eventName"];
//IGNORE_PRIVATE_WARNING ["_eventName"];
// _eventName is defined on the function that calls the event
private _varName = format [QGVAR(clearCache_%1), _eventName];
private _cacheList = missionNamespace getVariable [_varName, []];

View File

@ -20,7 +20,7 @@ params [["_unit", objNull, [objNull]]];
private _vehicle = vehicle _unit;
if (_unit == _vehicle) exitWith {[]};
scopeName "main";
scopeName "main";
{
if (_unit == (_vehicle turretUnit _x)) then {_x breakOut "main"};

View File

@ -47,7 +47,7 @@ TRACE_1("Reading missionConfigFile params",_paramsArray);
case (_settingType == "CHECKBOX"): {
_settingValue = _settingValue > 0;
_validValue = [_settingName, _settingValue] call CBA_settings_fnc_check;
};
};
// Will not Handle ARRAY,COLOR,STRING??? (bool/scalar covers most important settings)
};

View File

@ -1,4 +1,5 @@
private _category = localize LSTRING(ACEKeybindCategoryCommon);
private _category = LLSTRING(ACEKeybindCategoryCommon);
private _categoryColors = [_category, format ["| %1 |", LELSTRING(common,subcategory_colors)]];
[
QGVAR(checkPBOsAction),
@ -49,7 +50,7 @@ private _category = localize LSTRING(ACEKeybindCategoryCommon);
QGVAR(displayTextColor),
"COLOR",
[LSTRING(SettingDisplayTextColorName),LSTRING(SettingDisplayTextColorDesc)],
_category,
_categoryColors,
[0, 0, 0, 0.1],
0
] call CBA_fnc_addSetting;
@ -58,7 +59,7 @@ private _category = localize LSTRING(ACEKeybindCategoryCommon);
QGVAR(displayTextFontColor),
"COLOR",
[LSTRING(SettingDisplayTextFontColorName),LSTRING(SettingDisplayTextFontColorDesc)],
_category,
_categoryColors,
[1, 1, 1, 1],
0
] call CBA_fnc_addSetting;

View File

@ -1 +1 @@
#include "\z\ace\addons\common\script_component.hpp"
#include "\z\ace\addons\common\script_component.hpp"

View File

@ -498,6 +498,7 @@
<Japanese>プレイヤーが不正規の PBO を所持している場合の動作を決定します。</Japanese>
<Spanish>Define la accion a tomar si un jugador no tiene el PBO correcto</Spanish>
<Russian>Определяет, какое действие будет предпринято, если игрок не имеет корректные PBO.</Russian>
<German>Definiert, was passieren soll, wenn ein Spieler nicht die korrekten PBOs nutzt.</German>
</Key>
<Key ID="STR_ACE_Common_CheckPBOsCheckAll">
<English>Check PBO All</English>
@ -523,6 +524,7 @@
<Japanese>ACE のみならず、全てのアドオンを検査します。</Japanese>
<Spanish>Comprueba todos los complementos, no sólo los de ACE</Spanish>
<Russian>Проверять все аддоны, а не только ACE.</Russian>
<German>Überprüft alle Erweiterungen, nicht nur die von ACE.</German>
</Key>
<Key ID="STR_ACE_Common_CheckPBOsWhitelist">
<English>Check PBO Whitelist</English>
@ -548,6 +550,7 @@
<Japanese>許可するアドオンを定義します。</Japanese>
<Spanish>Comprueba la lista de PBOs permitidos</Spanish>
<Russian>Задать список непроверяемых аддонов.</Russian>
<German>Ermöglicht das Erstellen einer Liste von immer erlaubten Erweiterungen.</German>
</Key>
<Key ID="STR_ACE_Common_SettingFeedbackIconsName">
<English>Feedback icons</English>
@ -677,6 +680,18 @@
<Chinese>設定ACE提示文字的顏色。若提示字體並無指定其他顏色將會自動選用ACE系統的預設顏色</Chinese>
<Chinesesimp>设定ACE提示文字的颜色。若提示字体并无指定其他颜色将会自动选用ACE系统的预设颜色。</Chinesesimp>
</Key>
<Key ID="STR_ACE_Common_subcategory_colors">
<English>Colors</English>
<Czech>Barvy</Czech>
<French>Couleurs</French>
<German>Farben</German>
<Italian>Colori</Italian>
<Polish>Kolory</Polish>
<Portuguese>Cores</Portuguese>
<Russian>Цвета</Russian>
<Spanish>Colores</Spanish>
<Japanese></Japanese>
</Key>
<Key ID="STR_ACE_Common_SettingPersistentLaserName">
<English>Persistent weapon laserpointer/flashlight</English>
<Russian>Автоматический ЛЦУ/тактический фонарь</Russian>
@ -1281,6 +1296,9 @@
<Chinesesimp>ACE 载具按键</Chinesesimp>
<Turkish>ACE Araçlar</Turkish>
</Key>
<Key ID="STR_ACE_Common_categoryUncategorized">
<English>ACE Uncategorized</English>
</Key>
<Key ID="STR_ACE_Common_NoRoomToUnload">
<English>No Room to unload</English>
<German>Kein Platz zum Entladen</German>
@ -1384,12 +1402,14 @@
<German>Epilepsiefreundlicher Modus</German>
<Japanese>けいれん回避モード</Japanese>
<Polish>Tryb dla epileptyków</Polish>
<French>Mode adapté à l'épilepsie</French>
</Key>
<Key ID="STR_ACE_Common_EpilepsyFriendlyModeTooltip">
<English>Disables some flashing light effects to reduce seizure risk.</English>
<German>Deaktiviert einige Lichtflackereffekte um das Risiko von Epilepsieanfällen zu reduzieren.</German>
<Japanese>点滅する光エフェクトを無効化し、けいれんする恐れを低下させます。</Japanese>
<Polish>Wyłącz część migających efektów w celu zredukowania ryzyka napadu epilepsji</Polish>
<French>Désactive certains effets de lumière clignotante afin de réduire les risques de crise d'épilepsie.</French>
</Key>
<Key ID="STR_ACE_Common_FlagBlack">
<English>Flag (ACE - Black)</English>
@ -1438,6 +1458,10 @@
<Chinese>只限玩家</Chinese>
<Turkish>Sadece oyuncular</Turkish>
</Key>
<Key ID="STR_ACE_Common_aiOnly">
<English>AI only</English>
<Polish>Tylko dla AI</Polish>
</Key>
<Key ID="STR_ACE_Common_playersAndAI">
<English>Players and AI</English>
<Russian>Игроков и ботов</Russian>
@ -1467,22 +1491,48 @@
<Czech>Zobrazit akci v menu vlastních interakcí</Czech>
<Russian>Показывать действие в меню взаимодействия с собой.</Russian>
<Turkish>Kendi etkileşimim menüsünde animasyonları göster</Turkish>
<German>Zeigt die Aktion im Selbstinteraktionsmenü</German>
</Key>
<Key ID="STR_ACE_Common_both">
<English>Both</English>
<Turkish>İkisi de</Turkish>
<Japanese>両方</Japanese>
<French>Les deux</French>
<Russian>Оба</Russian>
<German>Beide</German>
<Polish>Oba</Polish>
</Key>
<Key ID="STR_ACE_Common_progressBarInfoName">
<English>Additional progress bar information</English>
<Japanese>プログレス バー詳細情報</Japanese>
<French>Infos supplémentaires de la barre de progression</French>
<Russian>Дополнительная информация прогресс-бара</Russian>
<German>Zusätzliche Informationen beim Fortschrittsbalken</German>
<Polish>Dodatkowe informacje na pasku postępu </Polish>
</Key>
<Key ID="STR_ACE_Common_progressBarInfoDesc">
<English>Controls extra information shown in progress bar.</English>
<Japanese>プログレス バーへ表示される情報量を決定します。</Japanese>
<French>Définit quelles informations supplémentaires sont affichées dans la barre de progression.</French>
<Russian>Устанавливает дополнительную информацию в прогресс-баре.</Russian>
<German>Kontrolliert zusätzliche Informationen beim Fortschrittsbalkens</German>
<Polish>Kontroluje dodatkowe informacje na pasku postępu.</Polish>
</Key>
<Key ID="STR_ACE_Common_progressBarInfoPercentage">
<English>Percentage</English>
<Japanese>パーセンテージ</Japanese>
<French>Pourcentage</French>
<Russian>Процент выполнения</Russian>
<German>Prozent</German>
<Polish>Procent</Polish>
</Key>
<Key ID="STR_ACE_Common_progressBarInfoTime">
<English>Time remaining</English>
<Japanese>残り時間</Japanese>
<French>Temps restant</French>
<Russian>Времени осталось</Russian>
<German>Zeit verbleibend</German>
<Polish>Pozostały czas</Polish>
</Key>
<Key ID="STR_ACE_Common_None">
<English>None</English>
@ -1518,6 +1568,11 @@
</Key>
<Key ID="STR_ACE_Common_TimeLeft">
<English>Time left: %1s</English>
<Japanese>残り時間: %1 秒</Japanese>
<French>Temps restant : %1 s</French>
<Russian>Оставшееся время: %1s</Russian>
<German>Zeit übrig %1s</German>
<Polish>Pozostały czas: %1s</Polish>
</Key>
<Key ID="STR_ACE_Common_LocationsBoostTraining_DisplayName">
<English>Locations Boost Training</English>

View File

@ -34,22 +34,22 @@ class CfgVehicles {
source = "user";
animPeriod = 1e-007;
};
class wire_3: wire_2{};
class wire_4: wire_2{};
class wire_5: wire_2{};
class wire_6: wire_2{};
class wire_7: wire_2{};
class wire_8: wire_2{};
class wire_9: wire_2{};
class wire_10: wire_2{};
class wire_11: wire_2{};
class wire_12: wire_2{};
class wire_13: wire_2{};
class wire_14: wire_2{};
class wire_15: wire_2{};
class wire_16: wire_2{};
class wire_17: wire_2{};
class wire_18: wire_2{};
class wire_3: wire_2 {};
class wire_4: wire_2 {};
class wire_5: wire_2 {};
class wire_6: wire_2 {};
class wire_7: wire_2 {};
class wire_8: wire_2 {};
class wire_9: wire_2 {};
class wire_10: wire_2 {};
class wire_11: wire_2 {};
class wire_12: wire_2 {};
class wire_13: wire_2 {};
class wire_14: wire_2 {};
class wire_15: wire_2 {};
class wire_16: wire_2 {};
class wire_17: wire_2 {};
class wire_18: wire_2 {};
class wire_2_1: wire_2 {
animPeriod = 8;

View File

@ -1 +1 @@
#include "\z\ace\addons\concertina_wire\script_component.hpp"
#include "\z\ace\addons\concertina_wire\script_component.hpp"

View File

@ -1,5 +1,5 @@
PREP(handleDamage);
PREP(handleDamageBox);
PREP(engineFire);
PREP(cookOff);
PREP(smoke);

View File

@ -13,7 +13,7 @@
[QGVAR(cleanupEffects), {
params ["_vehicle", ["_effects", []]];
_effects = _effects + (_vehicle getVariable [QGVAR(effects), []]);
if !(_effects isEqualTo []) then {
{ deleteVehicle _x } count _effects;
@ -25,7 +25,7 @@ GVAR(cacheTankDuplicates) = call CBA_fnc_createNamespace;
["ReammoBox_F", "init", {
(_this select 0) addEventHandler ["HandleDamage", {
if ((_this select 0) getVariable [QGVAR(enableAmmoCookoff), GVAR(enableAmmobox)]) then {
_this call FUNC(handleDamage);
_this call FUNC(handleDamageBox);
};
}];
}, nil, nil, true] call CBA_fnc_addClassEventHandler;

View File

@ -16,16 +16,23 @@
* Public: No
*/
params ["_vehicle", "_intensity", ["_instigator", objNull], ["_smokeDelayEnabled", true], ["_ammoDetonationChance", 0], ["_detonateAfterCookoff", false], ["_fireSource", ""], ["_canRing", true]];
params ["_vehicle", "_intensity", ["_instigator", objNull], ["_smokeDelayEnabled", true], ["_ammoDetonationChance", 0], ["_detonateAfterCookoff", false], ["_fireSource", ""], ["_canRing", true], ["_maxIntensity", MAX_COOKOFF_INTENSITY, [0]]];
if (GVAR(enable) == 0) exitWith {};
if !(GVAR(enableFire)) exitWith {};
if (_vehicle getVariable [QGVAR(enable), GVAR(enable)] in [0, false]) exitWith {};
// exit if cook-off enabled only for players and no players in vehicle crew found
if (_vehicle getVariable [QGVAR(enable), GVAR(enable)] isEqualTo 1 && {fullCrew [_vehicle, "", false] findIf {isPlayer (_x select 0)} == -1}) exitWith {};
TRACE_8("cooking off",_vehicle,_intensity,_instigator,_smokeDelayEnabled,_ammoDetonationChance,_detonateAfterCookoff,_fireSource,_canRing);
TRACE_9("cooking off",_vehicle,_intensity,_instigator,_smokeDelayEnabled,_ammoDetonationChance,_detonateAfterCookoff,_fireSource,_canRing,_maxIntensity);
if (_vehicle getVariable [QGVAR(isCookingOff), false]) exitWith {};
_vehicle setVariable [QGVAR(isCookingOff), true, true];
// limit maximum value of intensity to prevent very long cook-off times
_intensity = _intensity min _maxIntensity;
private _config = _vehicle call CBA_fnc_getObjectConfig;
private _positions = getArray (_config >> QGVAR(cookoffSelections)) select {!((_vehicle selectionPosition _x) isEqualTo [0,0,0])};
@ -36,7 +43,7 @@ if (_positions isEqualTo []) then {
if (_pos isEqualTo [0, 0, 0]) exitWith {};
_positions pushBack _x;
} forEach DEFAULT_COMMANDER_HATCHES;
if (_positions isEqualTo []) then {
_positions pushBack "#noselection";
};
@ -61,15 +68,15 @@ if (_smokeDelayEnabled) then {
[QGVAR(cleanupEffects), [_vehicle, _smokeEffects]] call CBA_fnc_globalEvent;
_vehicle setVariable [QGVAR(isCookingOff), false, true];
[_pfh] call CBA_fnc_removePerFrameHandler;
if (_detonateAfterCookoff) then {
_vehicle setDamage 1;
};
};
private _lastFlameTime = _vehicle getVariable [QGVAR(lastFlame), 0];
private _nextFlameTime = _vehicle getVariable [QGVAR(nextFlame), 0];
// Wait until we are ready for the next flame
// dt = Tcurrent - Tlast
// dt >= Tnext
@ -78,39 +85,39 @@ if (_smokeDelayEnabled) then {
if (!_ring && _intensity >= 2) then {
_ring = (0.7 > random 1);
};
if !(_canRing) then {
_ring = false;
};
private _time = linearConversion [0, 10, _intensity, 3, 20] + random COOKOFF_TIME;
if (_fireSource isEqualTo "") then {
_fireSource = selectRandom _positions;
};
[QGVAR(cookOffEffect), [_vehicle, true, _ring, _time, _fireSource]] call CBA_fnc_globalEvent;
_intensity = _intensity - (0.5 max random 1);
_vehicle setVariable [QGVAR(intensity), _intensity];
_vehicle setVariable [QGVAR(lastFlame), CBA_missionTime];
_vehicle setVariable [QGVAR(nextFlame), _time + (MIN_TIME_BETWEEN_FLAMES max random MAX_TIME_BETWEEN_FLAMES)];
{
[QEGVAR(fire,burn), [_x, _intensity * 1.5, _instigator]] call CBA_fnc_globalEvent;
} forEach crew _vehicle
};
if (_ammoDetonationChance > random 1) then {
private _lastExplosiveDetonationTime = _vehicle getVariable [QGVAR(lastExplosiveDetonation), 0];
private _nextExplosiveDetonation = _vehicle getVariable [QGVAR(nextExplosiveDetonation), 0];
if ((CBA_missionTime - _lastExplosiveDetonationTime) > _nextExplosiveDetonation) then {
if (_fireSource isEqualTo "") then {
_fireSource = selectRandom _positions;
};
createVehicle ["ACE_ammoExplosionLarge", (_vehicle modelToWorld (_vehicle selectionPosition _fireSource)), [], 0 , "CAN_COLLIDE"];
_vehicle setVariable [QGVAR(lastExplosiveDetonation), CBA_missionTime];
_vehicle setVariable [QGVAR(nextExplosiveDetonation), random 60];
};

View File

@ -33,7 +33,7 @@ if (isServer) then {
// I dont think there is an alternative that takes into effect distance and whatever, but if you find one please fix!
private _soundName = selectRandomWeighted [QGVAR(Sound_low), 0.1, QGVAR(Sound_mid), 0.25, QGVAR(Sound_high), 0.65];
_sound = createSoundSource [_soundName, position _obj, [], 0];
if (_ring) then {
private _intensity = 6;
private _radius = 1.5 * ((boundingBoxReal _obj) select 2);
@ -53,30 +53,30 @@ if (isServer) then {
};
private _factor = (1 + (_elapsedTime / 2) min 2);
private _flameSize = 1.5;
if (_elapsedTime > (_time * (3 / 4))) then {
_factor = _factor * linearConversion [_time * (3 / 4), _time, _elapsedTime, 1, 0.5];
};
_light setLightBrightness 5 * (_factor / 5);
if (_jet) then {
private _particlePosition = (_obj selectionPosition _fireSelection) vectorAdd [-0.1 + random 0.2, -0.1 + random 0.2, 0];
drop [
["\A3\data_f\ParticleEffects\Universal\Universal", 16, 2, 32],
"",
"Billboard",
1,
(0.1 + (random 0.2)) * _factor,
(0.1 + (random 0.2)) * _factor,
_particlePosition,
[0, 0, 15 * (_factor / 2)],
[0, 0, 15 * (_factor / 2)],
0,
10,
7.9,
0.075,
[1.25 * _factor, 2.5 * _factor],
[[1, 1, 1, -2], [1, 1, 1, -2], [1, 1, 1, -1], [1, 1, 1, -0]],
0.075,
[1.25 * _factor, 2.5 * _factor],
[[1, 1, 1, -2], [1, 1, 1, -2], [1, 1, 1, -1], [1, 1, 1, -0]],
[2 + random 1],
1,
0,
@ -84,102 +84,102 @@ if (isServer) then {
"",
_obj
];
// make flame push object into ground to make effect seem more "alive"
if (!isGamePaused && { local _obj }) then {
private _force = [0, 0, _factor * -(0.5 min random 1.5) * (0.3 min random 1)] vectorMultiply getMass _obj;
_obj addForce [_force, vectorUpVisual _obj];
};
};
if (_ring) then {
private _ringOrigin = (_obj selectionPosition _fireSelection) vectorAdd [-0.1 + random 0.2, -0.1 + random 0.2, -1];
drop [
["\A3\data_f\ParticleEffects\Universal\Universal",16,2,32],
"", "Billboard", 1, (0.1 + (random 0.2)) * _factor,
"", "Billboard", 1, (0.1 + (random 0.2)) * _factor,
_ringOrigin,
[0, 20 * (_factor / 2), 0],
0, 10, 7.9, 0.075,
[1.25 * _factor, _flameSize * _factor],
[[1, 1, 1, -2], [1, 1, 1, -2], [1, 1, 1, -1], [1, 1, 1, -0]],
[0, 20 * (_factor / 2), 0],
0, 10, 7.9, 0.075,
[1.25 * _factor, _flameSize * _factor],
[[1, 1, 1, -2], [1, 1, 1, -2], [1, 1, 1, -1], [1, 1, 1, -0]],
[2 + random 1], 1, 0, "", "", _obj
];
drop [
["\A3\data_f\ParticleEffects\Universal\Universal", 16, 2, 32],
"", "Billboard", 1, (0.1 + (random 0.2)) * _factor,
"", "Billboard", 1, (0.1 + (random 0.2)) * _factor,
_ringOrigin,
[0, -20 * (_factor / 2), 0],
0, 10, 7.9, 0.075,
[1.25 * _factor, _flameSize * _factor],
[[1, 1, 1, -2], [1, 1, 1, -2], [1, 1, 1, -1], [1, 1, 1, -0]],
[0, -20 * (_factor / 2), 0],
0, 10, 7.9, 0.075,
[1.25 * _factor, _flameSize * _factor],
[[1, 1, 1, -2], [1, 1, 1, -2], [1, 1, 1, -1], [1, 1, 1, -0]],
[2 + random 1], 1, 0, "", "", _obj
];
drop [
["\A3\data_f\ParticleEffects\Universal\Universal", 16, 2, 32],
"", "Billboard", 1, (0.1 + (random 0.2)) * _factor,
"", "Billboard", 1, (0.1 + (random 0.2)) * _factor,
_ringOrigin,
[20 * (_factor / 2), 0, 0],
0, 10, 7.9, 0.075,
[1.25 * _factor, _flameSize * _factor],
[[1, 1, 1, -2], [1, 1, 1, -2], [1, 1, 1, -1], [1, 1, 1, -0]],
[20 * (_factor / 2), 0, 0],
0, 10, 7.9, 0.075,
[1.25 * _factor, _flameSize * _factor],
[[1, 1, 1, -2], [1, 1, 1, -2], [1, 1, 1, -1], [1, 1, 1, -0]],
[2 + random 1], 1, 0, "", "", _obj
];
drop [
["\A3\data_f\ParticleEffects\Universal\Universal", 16, 2, 32],
"", "Billboard", 1, (0.1 + (random 0.2)) * _factor,
"", "Billboard", 1, (0.1 + (random 0.2)) * _factor,
[-0.1 + random 0.2, -0.1 + random 0.2, -1],
[-20 * (_factor / 2), 0, 0],
0, 10, 7.9, 0.075,
[1.25 * _factor, _flameSize * _factor],
[[1, 1, 1, -2], [1, 1, 1, -2], [1, 1, 1, -1], [1, 1, 1, -0]],
[-20 * (_factor / 2), 0, 0],
0, 10, 7.9, 0.075,
[1.25 * _factor, _flameSize * _factor],
[[1, 1, 1, -2], [1, 1, 1, -2], [1, 1, 1, -1], [1, 1, 1, -0]],
[2 + random 1], 1, 0, "", "", _obj
];
private _dir = 20 * (_factor / 2);
drop [
["\A3\data_f\ParticleEffects\Universal\Universal", 16, 2, 32],
"", "Billboard", 1, (0.1 + (random 0.2)) * _factor,
"", "Billboard", 1, (0.1 + (random 0.2)) * _factor,
_ringOrigin,
[_dir, _dir, 0],
0, 10, 7.9, 0.075,
[1.25 * _factor, _flameSize * _factor],
[[1, 1, 1, -2],[1, 1, 1, -2], [1, 1, 1, -1], [1, 1, 1, -0]],
[_dir, _dir, 0],
0, 10, 7.9, 0.075,
[1.25 * _factor, _flameSize * _factor],
[[1, 1, 1, -2],[1, 1, 1, -2], [1, 1, 1, -1], [1, 1, 1, -0]],
[2 + random 1], 1, 0, "", "", _obj
];
_dir = -20 * (_factor / 2);
drop [
["\A3\data_f\ParticleEffects\Universal\Universal", 16, 2, 32],
"", "Billboard", 1, (0.1 + (random 0.2)) * _factor,
"", "Billboard", 1, (0.1 + (random 0.2)) * _factor,
_ringOrigin,
[_dir, _dir, 0],
0, 10, 7.9, 0.075,
[1.25 * _factor, _flameSize * _factor],
[[1, 1, 1, -2],[1, 1, 1, -2], [1, 1, 1, -1], [1, 1, 1, -0]],
[_dir, _dir, 0],
0, 10, 7.9, 0.075,
[1.25 * _factor, _flameSize * _factor],
[[1, 1, 1, -2],[1, 1, 1, -2], [1, 1, 1, -1], [1, 1, 1, -0]],
[2 + random 1], 1, 0, "", "", _obj
];
_dir = 20 * (_factor / 2);
drop [
["\A3\data_f\ParticleEffects\Universal\Universal",16,2,32],
"", "Billboard", 1, (0.1 + (random 0.2)) * _factor,
"", "Billboard", 1, (0.1 + (random 0.2)) * _factor,
_ringOrigin,
[_dir, -_dir, 0],
0, 10, 7.9, 0.075,
[1.25 * _factor, _flameSize * _factor],
[[1, 1, 1, -2], [1, 1, 1, -2], [1, 1, 1, -1], [1, 1, 1, -0]],
[_dir, -_dir, 0],
0, 10, 7.9, 0.075,
[1.25 * _factor, _flameSize * _factor],
[[1, 1, 1, -2], [1, 1, 1, -2], [1, 1, 1, -1], [1, 1, 1, -0]],
[2 + random 1], 1, 0, "", "", _obj
];
_dir = 20 * (_factor / 2);
drop [
["\A3\data_f\ParticleEffects\Universal\Universal", 16, 2, 32],
"", "Billboard", 1, (0.1 + (random 0.2)) * _factor,
"", "Billboard", 1, (0.1 + (random 0.2)) * _factor,
_ringOrigin,
[-_dir, _dir, 0],
0, 10, 7.9, 0.075,
[1.25 * _factor, _flameSize * _factor],
[[1, 1, 1, -2], [1, 1, 1, -2], [1, 1, 1, -1], [1, 1, 1, -0]],
[-_dir, _dir, 0],
0, 10, 7.9, 0.075,
[1.25 * _factor, _flameSize * _factor],
[[1, 1, 1, -2], [1, 1, 1, -2], [1, 1, 1, -1], [1, 1, 1, -0]],
[2 + random 1], 1, 0, "", "", _obj
];
};

View File

@ -1,7 +1,7 @@
#include "script_component.hpp"
/*
* Author: KoffeinFlummi, commy2
* Handles all incoming damage for tanks (including wheeled APCs).
* Handles all incoming damage for boxi
*
* Arguments:
* HandleDamage EH <ARRAY>
@ -10,7 +10,7 @@
* Damage to be inflicted. <NUMBER>
*
* Example:
* _this call ace_cookoff_fnc_handleDamage
* _this call ace_cookoff_fnc_handleDamageBox
*
* Public: No
*/
@ -23,13 +23,6 @@ if (damage _vehicle >= 1) exitWith {};
// If cookoff is disabled exit
if (_vehicle getVariable [QGVAR(enable), GVAR(enable)] in [0, false]) exitWith {};
// Check for players and exit if none found and the enable for players only setting is true
if (
_vehicle getVariable [QGVAR(enable), GVAR(enable)] isEqualTo 1
&& {fullCrew [_vehicle, "", false] findIf {isPlayer (_x select 0)} == -1}
&& {_simulationType isNotEqualTo "box"}
) exitWith {};
// get hitpoint name
private _hitpoint = "#structural";

View File

@ -17,7 +17,7 @@
*/
params ["_vehicle", ["_positions", []]];
private _turretConfig = [_vehicle, [0]] call CBA_fnc_getTurret;
private _positionBarrelEnd = getText (_turretConfig >> "gunBeg");

View File

@ -1,5 +1,3 @@
// CBA Settings [ADDON: ace_cookoff]:
[
QGVAR(enable), "LIST",
[LSTRING(enable_hd_name), LSTRING(enable_hd_tooltip)],

View File

@ -27,6 +27,7 @@
#define MIN_TIME_BETWEEN_FLAMES 5
#define MAX_TIME_BETWEEN_FLAMES 15
#define MAX_TIME_BETWEEN_AMMO_DET 25
#define MAX_COOKOFF_INTENSITY 10
// Delay between flame effect for players in a cooking off vehicle
#define FLAME_EFFECT_DELAY 0.4

View File

@ -162,9 +162,19 @@
</Key>
<Key ID="STR_ACE_CookOff_enableFire_name">
<English>Enable Cook-Off Vehicle Fire</English>
<Japanese>誘爆火災を有効化</Japanese>
<French>Véhicules - Feu durant l'auto-inflammation</French>
<Russian>Включить возгорание поеприпасов</Russian>
<German>Aktiviert das in Brand setzen des Fahrzeugs während des Durchzündens der Munition</German>
<Polish>Włącz pożar pojazdu podczas samozapłonu</Polish>
</Key>
<Key ID="STR_ACE_CookOff_enableFire_tooltip">
<English>Whether or not vehicles will catch on fire during cook-off</English>
<Japanese>誘爆により車両が炎上するかどうかを設定します。</Japanese>
<French>Définit si les véhicules prennent feu durant l'auto-inflammation de leurs munitions.</French>
<Russian>Будет ли техника возгораться при подрыве боеприпасов</Russian>
<German>Ob Fahrzeuge in Brand gesetzt werden, während deren Munition durchzündet.</German>
<Polish>Określa, czy pojazdy zapalą się podczas samozapłonu ich amunicji.</Polish>
</Key>
</Package>
</Project>

View File

@ -9,7 +9,7 @@ class Cfg3DEN {
};
class Combo: Title {
class Controls: Controls {
class Title: Title{};
class Title: Title {};
class Value;
};
};

View File

@ -74,7 +74,7 @@ class GVAR(groups) {
ACE_1Rnd_82mm_Mo_HE_LaserGuided = 1;
8Rnd_82mm_Mo_LG = 1;
};
// A3 Titans (Spike) - just use handheld magazines
class Titan_AT {
1Rnd_GAT_missiles = 1;

View File

@ -53,7 +53,7 @@ class CfgMagazines {
mass = 50;
ACE_isBelt = 1;
};
class 40Rnd_20mm_G_belt;
class GVAR(20Rnd_20mm_G_belt): 40Rnd_20mm_G_belt {
author = ECSTRING(common,ACETeam);

View File

@ -1,5 +1,3 @@
// CBA Settings [ADDON: ace_csw]:
private _categoryArray = [format ["ACE %1", localize LSTRING(DisplayName)]];
[

View File

@ -410,6 +410,7 @@
<Polish>[CSW] Statyczny karabin maszynowy M2 z tarczą</Polish>
<Russian>[CSW] Станковый M2 со щитом</Russian>
<Japanese>[CSW] 設置型 防盾付き M2</Japanese>
<German>[CSW] Statisches M2 mit Schild</German>
</Key>
<Key ID="STR_ACE_CSW_StaticAutoHMGBag_displayName">
<English>[CSW] Static XM312 Gun (Autonomous)</English>

View File

@ -15,4 +15,4 @@ class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
};
};
};

View File

@ -1 +1 @@
#include "\z\ace\addons\dagr\script_component.hpp"
#include "\z\ace\addons\dagr\script_component.hpp"

View File

@ -1 +1 @@
#include "\z\ace\addons\disarming\script_component.hpp"
#include "\z\ace\addons\disarming\script_component.hpp"

View File

@ -7,5 +7,5 @@ PREP_RECOMPILE_START;
PREP_RECOMPILE_END;
GVAR(disabledFactions) = [] call CBA_fnc_createNamespace;
ADDON = true;

View File

@ -3,13 +3,13 @@ class CfgMovesBasic {
ACE_dragWithPistol = "ace_dragging";
ACE_dragWithRifle = "AmovPercMstpSlowWrflDnon_AcinPknlMwlkSlowWrflDb_2";
};
class Actions {
class MoveWithInjuredManDragger;
class MoveWithInjuredManDraggerRfl: MoveWithInjuredManDragger {
Up = "amovpercmstpsraswrfldnon";
};
class MoveWithInjuredManDraggerPst;
class ACE_MoveWithInjuredManDraggerPst: MoveWithInjuredManDraggerPst {
Default = "ace_dragging_static";

View File

@ -247,6 +247,15 @@ class CfgVehicles {
GVAR(dragPosition)[] = {0,0.7,0};
};
// Flexible Fuel tanks, 300L
class FlexibleTank_base_F: ThingX {
GVAR(canCarry) = 1;
GVAR(carryPosition)[] = {0,0.65,0};
GVAR(canDrag) = 1;
GVAR(dragPosition)[] = {0,1,0};
};
// some terrain objects
class Land_CampingTable_F: ThingX {

View File

@ -1 +1 @@
#include "\z\ace\addons\dragging\script_component.hpp"
#include "\z\ace\addons\dragging\script_component.hpp"

View File

@ -60,6 +60,7 @@
<Japanese>オブジェクトを運ぶ/離す</Japanese>
<Turkish>Objeyi Taşı/Bırak</Turkish>
<Spanish>Arrastrar/Soltar Objeto</Spanish>
<German>Objekt tragen/loslassen</German>
</Key>
<Key ID="STR_ACE_Dragging_UnableToDrag">
<English>Item too heavy</English>

View File

@ -34,7 +34,7 @@ class CfgAmmo {
cost = 500;
simulationStep = 0.005;
maxControlRange = 1500;
EGVAR(vehicle_damage,incendiary) = 1.0;
class ace_missileguidance {

View File

@ -1 +1 @@
#include "\z\ace\addons\dragon\script_component.hpp"
#include "\z\ace\addons\dragon\script_component.hpp"

View File

@ -56,7 +56,7 @@ class ACE_Triggers {
isAttachable = 1;
displayName = CSTRING(timerName);
picture = QPATHTOF(data\UI\Timer.paa);
onPlace = QUOTE([ARR_2(_this select 1, _this select 3 select 0)] call FUNC(startTimer); false);
onPlace = QUOTE([ARR_4(_this select 1, _this select 3 select 0, nil, _this select 0)] call FUNC(startTimer); false);
onSetup = QUOTE(_this call FUNC(openTimerUI));
};
class Tripwire {

View File

@ -86,13 +86,13 @@ class CfgMagazines {
GVAR(SetupObject) = "ACE_Explosives_Place_SLAM";
class ACE_Triggers {
SupportedTriggers[] = {"IRSensor", "PressurePlate", "Timer", "Command", "MK16_Transmitter"};
class PressurePlate{
class PressurePlate {
displayName = CSTRING(SLAME_Magnetic);
digDistance = 0;
ammo = "ACE_SLAMDirectionalMine_Magnetic_Ammo";
pitch = 90;
};
class IRSensor{
class IRSensor {
displayName = CSTRING(SLAME_IRSensor);
};
class Timer {

View File

@ -2,7 +2,7 @@ class CfgWeapons {
class Default;
class Put: Default {
muzzles[] += {QGVAR(muzzle)};
class PutMuzzle: Default{};
class PutMuzzle: Default {};
class GVAR(muzzle): PutMuzzle {
magazines[] = {"ACE_FlareTripMine_Mag"};
};

View File

@ -41,10 +41,10 @@ class CfgActions {
class ActivateMine: None {
show = 0;
};
class Deactivate:None {
class Deactivate: None {
show = 0;
};
class DeactivateMine:None {
class DeactivateMine: None {
show = 0;
};
class UseContainerMagazine: None {

View File

@ -38,6 +38,6 @@ if (_unit == ace_player) then {
playSound3D [QUOTE(PATHTO_R(Data\Audio\Cellphone_Ring.wss)),objNull, false, getPosASL (_this select 1),3.16228,1,75];
(_this select 0) setVariable [QGVAR(Dialing), false, true];
}, [_unit,_explosive select 0], 0.25 * (count _arr - 4)] call CBA_fnc_waitAndExecute;
[_explosive select 0,(0.25 * (count _arr - 1)) + (_explosive select 2), "ACE_Cellphone"] call FUNC(startTimer);
[_explosive select 0,(0.25 * (count _arr - 1)) + (_explosive select 2), "ACE_Cellphone", _unit] call FUNC(startTimer);
};
};

View File

@ -7,6 +7,7 @@
* 0: Explosive <OBJECT>
* 1: Time till detonate <NUMBER>
* 2: Trigger classname <STRING> (default: "#timer")
* 3: Unit <OBJECT>
*
* Return Value:
* None
@ -17,13 +18,13 @@
* Public: Yes
*/
params ["_explosive", "_delay", ["_trigger", "#timer", [""]]];
TRACE_3("Starting timer",_explosive,_delay,_trigger);
params ["_explosive", "_delay", ["_trigger", "#timer", [""]], ["_unit", objNull, [objNull]]];
TRACE_4("Starting timer",_explosive,_delay,_trigger,_unit);
[{
params ["_explosive", "_trigger"];
params ["_explosive", "_trigger", "_unit"];
TRACE_1("Explosive detonating from timer",_explosive);
if (!isNull _explosive) then {
[_explosive, -1, [_explosive, 0], _trigger] call FUNC(detonateExplosive);
[_unit, -1, [_explosive, 0], _trigger] call FUNC(detonateExplosive);
};
}, [_explosive, _trigger], _delay] call CBA_fnc_waitAndExecute;
}, [_explosive, _trigger, _unit], _delay] call CBA_fnc_waitAndExecute;

View File

@ -1089,6 +1089,7 @@
<Japanese>最短時間</Japanese>
<Spanish>Tiempo mínimo</Spanish>
<Polish>Minimalny czas</Polish>
<German>Minimale Zeit</German>
</Key>
<Key ID="STR_ACE_Explosives_TimerMax_DisplayName">
<English>Maximum Time</English>
@ -1097,6 +1098,7 @@
<Japanese>最長時間</Japanese>
<Spanish>Tiempo máximo</Spanish>
<Polish>Maksymalny czas</Polish>
<German>Maximale Zeit</German>
</Key>
<Key ID="STR_ACE_Explosives_TimerDefault_DisplayName">
<English>Default Time</English>
@ -1105,6 +1107,7 @@
<Japanese>標準時間</Japanese>
<Spanish>Tiempo por defecto</Spanish>
<Polish>Domyślny czas</Polish>
<German>Standardmäßige Zeit</German>
</Key>
<Key ID="STR_ACE_Explosives_TimerMin_Description">
<English>Minimum time value (in seconds) for the explosive timer.</English>
@ -1113,6 +1116,7 @@
<Japanese>起爆タイマーの最低時間 (秒) を設定します。</Japanese>
<Spanish>Tiempo mínimo (en segundos) para el temporizador del explosivo.</Spanish>
<Polish>Minimalna wartość czasomierza dla ładunku (w sekundach).</Polish>
<German>Minimale Zeit (in Sekunden) für den Zeitzünder.</German>
</Key>
<Key ID="STR_ACE_Explosives_TimerMax_Description">
<English>Maximum time value (in seconds) for the explosive timer.</English>
@ -1121,6 +1125,7 @@
<Japanese>起爆タイマーの最長時間 (秒) を設定します。</Japanese>
<Spanish>Tiempo máximo (en segundos) para el temporizador del explosivo.</Spanish>
<Polish>Maksymalna wartość czasomierza dla ładunku (w sekundach).</Polish>
<German>Maximale Zeit (in Sekunden) für den Zeitzünder.</German>
</Key>
<Key ID="STR_ACE_Explosives_TimerDefault_Description">
<English>Default time value (in seconds) for the explosive timer.</English>
@ -1129,6 +1134,7 @@
<Japanese>起爆タイマーの標準時間 (秒) を設定します。</Japanese>
<Spanish>Tiempo por defecto (en segundos) para el temporizador del explosivo.</Spanish>
<Polish>Domyślna wartość czasomierza dla ładunku (w sekundach).</Polish>
<German>Standardmäßige Zeit (in Sekunden) für den Zeitzünder.</German>
</Key>
</Package>
</Project>

View File

@ -9,4 +9,4 @@ class CfgSounds {
sound[] = {QUOTE(PATHTOF(data\sounds\fastroping_thud.ogg)), 10, 1.0};
titles[] = {};
};
};
};

View File

@ -1,6 +1,4 @@
// CBA Settings [ADDON: ace_fastroping]:
private _category = ["ACE Uncategorized", LLSTRING(setting_categoryMenu_displayName)];
private _category = [LELSTRING(common,categoryUncategorized), LLSTRING(setting_categoryMenu_displayName)];
[
QGVAR(requireRopeItems), "CHECKBOX",

View File

@ -167,6 +167,7 @@
<Czech>Připravit 3m lana</Czech>
<Turkish>3m halat sal</Turkish>
<Spanish>Desplegar cuerdas de 3m</Spanish>
<Japanese>3m ロープを展開</Japanese>
</Key>
<Key ID="STR_ACE_Fastroping_Interaction_deployRopes6">
<English>Deploy 6m ropes</English>
@ -179,6 +180,7 @@
<Czech>Připravit 6m lana</Czech>
<Turkish>6m halat sal</Turkish>
<Spanish>Desplegar cuerdas de 6m</Spanish>
<Japanese>6m ロープを展開</Japanese>
</Key>
<Key ID="STR_ACE_Fastroping_Interaction_deployRopes12">
<English>Deploy 12m ropes</English>
@ -274,6 +276,7 @@
<Turkish>Halatla Kayma</Turkish>
<Czech>Slaňování</Czech>
<Russian>Спуск по канату</Russian>
<German>Schnelles-Abseilen</German>
</Key>
<Key ID="STR_ACE_Fastroping_setting_requireRopeItems_displayName">
<English>Require rope item to deploy</English>

View File

@ -1 +1 @@
#include "\z\ace\addons\fcs\script_component.hpp"
#include "\z\ace\addons\fcs\script_component.hpp"

View File

@ -98,7 +98,7 @@ class CfgVehicles {
class Item_Base_F;
class ACE_WaterBottle_Item: Item_Base_F {
author = ACECSTRING(common,ACETeam);
author = ECSTRING(common,ACETeam);
scope = 2;
scopeCurator = 2;
displayName = CSTRING(WaterBottle_DisplayName);
@ -108,7 +108,7 @@ class CfgVehicles {
};
};
class ACE_WaterBottle_Half_Item: Item_Base_F {
author = ACECSTRING(common,ACETeam);
author = ECSTRING(common,ACETeam);
scope = 2;
scopeCurator = 2;
displayName = CSTRING(WaterBottleHalf_DisplayName);
@ -118,7 +118,7 @@ class CfgVehicles {
};
};
class ACE_WaterBottle_Empty_Item: Item_Base_F {
author = ACECSTRING(common,ACETeam);
author = ECSTRING(common,ACETeam);
scope = 2;
scopeCurator = 2;
displayName = CSTRING(WaterBottleEmpty_DisplayName);
@ -128,7 +128,7 @@ class CfgVehicles {
};
};
class ACE_Canteen_Item: Item_Base_F {
author = ACECSTRING(common,ACETeam);
author = ECSTRING(common,ACETeam);
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Canteen_DisplayName);
@ -138,7 +138,7 @@ class CfgVehicles {
};
};
class ACE_Canteen_Half_Item: Item_Base_F {
author = ACECSTRING(common,ACETeam);
author = ECSTRING(common,ACETeam);
scope = 2;
scopeCurator = 2;
displayName = CSTRING(CanteenHalf_DisplayName);
@ -148,7 +148,7 @@ class CfgVehicles {
};
};
class ACE_Canteen_Empty_Item: Item_Base_F {
author = ACECSTRING(common,ACETeam);
author = ECSTRING(common,ACETeam);
scope = 2;
scopeCurator = 2;
displayName = CSTRING(CanteenEmpty_DisplayName);
@ -158,7 +158,7 @@ class CfgVehicles {
};
};
class ACE_Can_Spirit_Item: Item_Base_F {
author = ACECSTRING(common,ACETeam);
author = ECSTRING(common,ACETeam);
scope = 2;
scopeCurator = 2;
displayName = "$STR_a3_cfgvehicles_land_can_v1_f0";
@ -168,7 +168,7 @@ class CfgVehicles {
};
};
class ACE_Can_Franta_Item: Item_Base_F {
author = ACECSTRING(common,ACETeam);
author = ECSTRING(common,ACETeam);
scope = 2;
scopeCurator = 2;
displayName = "$STR_a3_cfgvehicles_land_can_v2_f0";
@ -178,7 +178,7 @@ class CfgVehicles {
};
};
class ACE_Can_RedGull_Item: Item_Base_F {
author = ACECSTRING(common,ACETeam);
author = ECSTRING(common,ACETeam);
scope = 2;
scopeCurator = 2;
displayName = "$STR_a3_cfgvehicles_land_can_v3_f0";
@ -188,7 +188,7 @@ class CfgVehicles {
};
};
class ACE_MRE_LambCurry_Item: Item_Base_F {
author = ACECSTRING(common,ACETeam);
author = ECSTRING(common,ACETeam);
scope = 2;
scopeCurator = 2;
displayName = CSTRING(MRE_LambCurry_DisplayName);
@ -198,7 +198,7 @@ class CfgVehicles {
};
};
class ACE_MRE_BeefStew_Item: Item_Base_F {
author = ACECSTRING(common,ACETeam);
author = ECSTRING(common,ACETeam);
scope = 2;
scopeCurator = 2;
displayName = CSTRING(MRE_BeefStew_DisplayName);
@ -208,7 +208,7 @@ class CfgVehicles {
};
};
class ACE_MRE_CreamTomatoSoup_Item: Item_Base_F {
author = ACECSTRING(common,ACETeam);
author = ECSTRING(common,ACETeam);
scope = 2;
scopeCurator = 2;
displayName = CSTRING(MRE_CreamTomatoSoup_DisplayName);
@ -218,7 +218,7 @@ class CfgVehicles {
};
};
class ACE_MRE_CreamChickenSoup_Item: Item_Base_F {
author = ACECSTRING(common,ACETeam);
author = ECSTRING(common,ACETeam);
scope = 2;
scopeCurator = 2;
displayName = CSTRING(MRE_CreamChickenSoup_DisplayName);
@ -228,7 +228,7 @@ class CfgVehicles {
};
};
class ACE_MRE_ChickenTikkaMasala_Item: Item_Base_F {
author = ACECSTRING(common,ACETeam);
author = ECSTRING(common,ACETeam);
scope = 2;
scopeCurator = 2;
displayName = CSTRING(MRE_ChickenTikkaMasala_DisplayName);
@ -238,7 +238,7 @@ class CfgVehicles {
};
};
class ACE_MRE_SteakVegetables_Item: Item_Base_F {
author = ACECSTRING(common,ACETeam);
author = ECSTRING(common,ACETeam);
scope = 2;
scopeCurator = 2;
displayName = CSTRING(MRE_SteakVegetables_DisplayName);
@ -248,7 +248,7 @@ class CfgVehicles {
};
};
class ACE_MRE_MeatballsPasta_Item: Item_Base_F {
author = ACECSTRING(common,ACETeam);
author = ECSTRING(common,ACETeam);
scope = 2;
scopeCurator = 2;
displayName = CSTRING(MRE_MeatballsPasta_DisplayName);
@ -258,7 +258,7 @@ class CfgVehicles {
};
};
class ACE_MRE_ChickenHerbDumplings_Item: Item_Base_F {
author = ACECSTRING(common,ACETeam);
author = ECSTRING(common,ACETeam);
scope = 2;
scopeCurator = 2;
displayName = CSTRING(MRE_ChickenHerbDumplings_DisplayName);
@ -268,7 +268,7 @@ class CfgVehicles {
};
};
class ACE_Humanitarian_Ration_Item: Item_Base_F {
author = ACECSTRING(common,ACETeam);
author = ECSTRING(common,ACETeam);
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Humanitarian_Ration_DisplayName);

View File

@ -3,3 +3,11 @@ ace_field_rations
Provides a survival style, hunger and thirst system.
Adds consumable items such as MREs.
## ACEX Conversion - things still using acex prefix
- All settings
- CfgUIGrids Entry
- CfgWeapon Configs (e.g. `acex_field_rations_thirstQuenched`)
- CfgVehicles Configs (e.g. `acex_field_rations_waterSupply`)
- Events (`acex_rationConsumed`, `acex_rationRefilled`)
- Player setVars for thirst/hunger (e.g. `player getVariable "acex_field_rations_thirst"`)

View File

@ -12,15 +12,15 @@ class RscTitles {
class controls {
class Thirst: RscPicture {
idc = IDC_COLORED_HUD_THIRST;
x = profileNamespace getVariable [QUOTE(TRIPLES(IGUI,GVAR(grid),X)), safeZoneX + safeZoneW - 4.2 * GUI_GRID_W];
y = profileNamespace getVariable [QUOTE(TRIPLES(IGUI,GVAR(grid),Y)), safeZoneY + safeZoneH - 2.2 * GUI_GRID_H];
x = profileNamespace getVariable [QUOTE(TRIPLES(IGUI,XGVAR(grid),X)), safeZoneX + safeZoneW - 4.2 * GUI_GRID_W];
y = profileNamespace getVariable [QUOTE(TRIPLES(IGUI,XGVAR(grid),Y)), safeZoneY + safeZoneH - 2.2 * GUI_GRID_H];
w = 2 * GUI_GRID_W;
h = 2 * GUI_GRID_H;
text = QPATHTOF(ui\icon_hud_thirststatus.paa);
};
class Hunger: Thirst {
idc = IDC_COLORED_HUD_HUNGER;
x = 2 * GUI_GRID_W + (profileNamespace getVariable [QUOTE(TRIPLES(IGUI,GVAR(grid),X)), safeZoneX + safeZoneW - 4.2 * GUI_GRID_W]);
x = 2 * GUI_GRID_W + (profileNamespace getVariable [QUOTE(TRIPLES(IGUI,XGVAR(grid),X)), safeZoneX + safeZoneW - 4.2 * GUI_GRID_W]);
text = QPATHTOF(ui\icon_hud_hungerstatus.paa);
};
};
@ -35,23 +35,23 @@ class RscTitles {
class controlsBackground {
class Thirst: RscPicture {
idc = -1;
x = profileNamespace getVariable [QUOTE(TRIPLES(IGUI,GVAR(grid),X)), safeZoneX + safeZoneW - 4.2 * GUI_GRID_W];
y = profileNamespace getVariable [QUOTE(TRIPLES(IGUI,GVAR(grid),Y)), safeZoneY + safeZoneH - 2.2 * GUI_GRID_H];
x = profileNamespace getVariable [QUOTE(TRIPLES(IGUI,XGVAR(grid),X)), safeZoneX + safeZoneW - 4.2 * GUI_GRID_W];
y = profileNamespace getVariable [QUOTE(TRIPLES(IGUI,XGVAR(grid),Y)), safeZoneY + safeZoneH - 2.2 * GUI_GRID_H];
w = 2 * GUI_GRID_W;
h = 2 * GUI_GRID_H;
text = QPATHTOF(ui\icon_hud_thirststatus.paa);
colorText[] = {1, 1, 1, 0.2};
};
class Hunger: Thirst {
x = 2 * GUI_GRID_W + (profileNamespace getVariable [QUOTE(TRIPLES(IGUI,GVAR(grid),X)), safeZoneX + safeZoneW - 4.2 * GUI_GRID_W]);
x = 2 * GUI_GRID_W + (profileNamespace getVariable [QUOTE(TRIPLES(IGUI,XGVAR(grid),X)), safeZoneX + safeZoneW - 4.2 * GUI_GRID_W]);
text = QPATHTOF(ui\icon_hud_hungerstatus.paa);
};
};
class controls {
class ThirstGroup: RscControlsGroupNoScrollbars {
idc = IDC_DRAINING_HUD_THIRST_GROUP;
x = profileNamespace getVariable [QUOTE(TRIPLES(IGUI,GVAR(grid),X)), safeZoneX + safeZoneW - 4.2 * GUI_GRID_W];
y = profileNamespace getVariable [QUOTE(TRIPLES(IGUI,GVAR(grid),Y)), safeZoneY + safeZoneH - 2.2 * GUI_GRID_H];
x = profileNamespace getVariable [QUOTE(TRIPLES(IGUI,XGVAR(grid),X)), safeZoneX + safeZoneW - 4.2 * GUI_GRID_W];
y = profileNamespace getVariable [QUOTE(TRIPLES(IGUI,XGVAR(grid),Y)), safeZoneY + safeZoneH - 2.2 * GUI_GRID_H];
w = 2 * GUI_GRID_W;
h = 2 * GUI_GRID_H;
class controls {
@ -67,7 +67,7 @@ class RscTitles {
};
class HungerGroup: ThirstGroup {
idc = IDC_DRAINING_HUD_HUNGER_GROUP;
x = 2 * GUI_GRID_W + (profileNamespace getVariable [QUOTE(TRIPLES(IGUI,GVAR(grid),X)), safeZoneX + safeZoneW - 4.2 * GUI_GRID_W]);
x = 2 * GUI_GRID_W + (profileNamespace getVariable [QUOTE(TRIPLES(IGUI,XGVAR(grid),X)), safeZoneX + safeZoneW - 4.2 * GUI_GRID_W]);
class controls: controls {
class Icon: Icon {
idc = IDC_DRAINING_HUD_HUNGER_ICON;

View File

@ -21,7 +21,7 @@ if !(hasInterface) exitWith {};
QPATHTOF(ui\icon_water_tap.paa),
{true},
{
private _waterSource = _target getVariable [QXGVAR(waterSource), objNull];
private _waterSource = _target getVariable [QGVAR(waterSource), objNull];
alive _waterSource
&& {XGVAR(waterSourceActions) != 0}
@ -29,7 +29,7 @@ if !(hasInterface) exitWith {};
&& {[_player, _waterSource] call EFUNC(common,canInteractWith)}
},
{
private _waterSource = _target getVariable [QXGVAR(waterSource), objNull];
private _waterSource = _target getVariable [QGVAR(waterSource), objNull];
[_waterSource, _player] call FUNC(getRefillChildren);
},
[],
@ -44,11 +44,11 @@ if !(hasInterface) exitWith {};
LLSTRING(CheckWater),
QPATHTOF(ui\icon_water_tap.paa),
{
private _waterSource = _target getVariable [QXGVAR(waterSource), objNull];
private _waterSource = _target getVariable [QGVAR(waterSource), objNull];
[_player, _waterSource] call FUNC(checkWater);
},
{
private _waterSource = _target getVariable [QXGVAR(waterSource), objNull];
private _waterSource = _target getVariable [QGVAR(waterSource), objNull];
(_waterSource call FUNC(getRemainingWater)) != REFILL_WATER_INFINITE
}
] call EFUNC(interact_menu,createAction),
@ -57,11 +57,11 @@ if !(hasInterface) exitWith {};
LLSTRING(DrinkFromSource),
QPATHTOF(ui\icon_water_tap.paa),
{
private _waterSource = _target getVariable [QXGVAR(waterSource), objNull];
private _waterSource = _target getVariable [QGVAR(waterSource), objNull];
[_player, _waterSource] call FUNC(drinkFromSource);
},
{
private _waterSource = _target getVariable [QXGVAR(waterSource), objNull];
private _waterSource = _target getVariable [QGVAR(waterSource), objNull];
[_player, _waterSource] call FUNC(canDrinkFromSource);
}
] call EFUNC(interact_menu,createAction)
@ -70,7 +70,7 @@ if !(hasInterface) exitWith {};
// Add water source actions to helper
[QGVAR(helper), 0, [], _mainAction] call EFUNC(interact_menu,addActionToClass);
{
[QGVAR(helper), 0, [QXGVAR(waterSource)], _x] call EFUNC(interact_menu,addActionToClass);
[QGVAR(helper), 0, [QGVAR(waterSource)], _x] call EFUNC(interact_menu,addActionToClass);
} forEach _subActions;
// Add inventory context menu option to consume items

View File

@ -51,10 +51,7 @@ class CfgPatches {
VERSION_CONFIG;
};
class XADDON: ADDON {
units[] = {};
weapons[] = {};
};
BWC_CONFIG(XADDON);
};
#include "CfgEventHandlers.hpp"

View File

@ -50,7 +50,7 @@ TRACE_1("Starting interact PFH",_interactionType);
if (_waterRemaining != REFILL_WATER_DISABLED) then {
private _offset = [_x] call FUNC(getActionOffset);
private _helper = QGVAR(helper) createVehicleLocal [0, 0, 0];
_helper setVariable [QXGVAR(waterSource), _x];
_helper setVariable [QGVAR(waterSource), _x];
_helper attachTo [_x, _offset];
_addedHelpers pushBack _helper;

View File

@ -55,7 +55,7 @@ if (XGVAR(hudType) == 0) then {
];
} else {
// Reposition controls group and icon to create draining effect
private _defaultY = profileNamespace getVariable [QUOTE(TRIPLES(IGUI,GVAR(grid),Y)), safeZoneY + safeZoneH - 2.2 * GUI_GRID_H];
private _defaultY = profileNamespace getVariable [QUOTE(TRIPLES(IGUI,XGVAR(grid),Y)), safeZoneY + safeZoneH - 2.2 * GUI_GRID_H];
{
_x params ["_status", "_groupIDC", "_iconIDC"];

View File

@ -196,6 +196,7 @@
<Polish>Akcje przy źrodle wody</Polish>
<Turkish>Su Içme Animasyonu</Turkish>
<Japanese>水源動作</Japanese>
<German>Wasserquellen-Aktionen</German>
</Key>
<Key ID="STR_ACE_Field_Rations_WaterSourceActions_Description">
<English>Controls what actions are available on water sources.</English>
@ -203,6 +204,7 @@
<Polish>Kontroluje jakie akcje są dostępne przy źrodle wody.</Polish>
<Turkish>Su içerken hangi animasyonu yapacağını belirler</Turkish>
<Japanese>水源で可能な動作を設定します。</Japanese>
<German>Bestimmt, welche Aktionen an Wasserquellen verfügbar sind.</German>
</Key>
<Key ID="STR_ACE_Field_Rations_RefillOnly">
<English>Refill Only</English>
@ -210,6 +212,7 @@
<Polish>Tylko napełnij</Polish>
<Turkish>Sadece içeceği iç</Turkish>
<Japanese>汲むだけ</Japanese>
<German>Nur Befüllen</German>
</Key>
<Key ID="STR_ACE_Field_Rations_TerrainObjectActions_DisplayName">
<English>Terrain Object Actions</English>
@ -217,6 +220,7 @@
<Polish>Akcje Objektu terenu</Polish>
<Turkish>Varsayılan Nesne Animasyonu</Turkish>
<Japanese>マップ オブジェクト動作</Japanese>
<German>Geländeobjekt-Aktionen</German>
</Key>
<Key ID="STR_ACE_Field_Rations_TerrainObjectActions_Description">
<English>Enables water source actions for terrain objects.</English>
@ -224,6 +228,7 @@
<Polish>Umożliwia akcje przy źrodle wody na obiektach terenu.</Polish>
<Turkish>Varsayılan nesneler için animasyonu etkinleştir</Turkish>
<Japanese>マップに存在するオブジェクトを水源として動作するよう設定できます。</Japanese>
<German>Aktiviert Wasserquellen-Aktionen für Geländeobjekte.</German>
</Key>
<Key ID="STR_ACE_Field_Rations_AffectAdvancedFatigue_DisplayName">
<English>Affect Advanced Fatigue</English>
@ -502,6 +507,7 @@
<Polish>Picie z źródła </Polish>
<Turkish>Mataradan Içiliyor...</Turkish>
<Japanese>水源から飲んでいます・・・</Japanese>
<German>Trinke von Quelle...</German>
</Key>
<Key ID="STR_ACE_Field_Rations_WaterBottle_DisplayName">
<English>Water Bottle</English>

View File

@ -1 +1 @@
#include "\z\ace\addons\finger\script_component.hpp"
#include "\z\ace\addons\finger\script_component.hpp"

View File

@ -6,7 +6,7 @@ class GVAR(DOUBLES(scream,no)) { \
sound[] = {QUOTE(PATHTOF(CONCAT(sounds\scream,no).ogg)), db + 8, 1};\
titles[] = {}; \
}
class CfgSounds {
CREATE_SCREAM(1);
CREATE_SCREAM(2);

View File

@ -8,7 +8,7 @@ class RscTitles {
fadeout = 0.75;
name = QGVAR(onFire1);
onload = QUOTE(with uiNamespace do {GVAR(onFireIndicator1) = _this select 0});
class controls {
class GVAR(indicator): RscPicture {
idc = -1;
@ -26,12 +26,12 @@ class RscTitles {
};
};
};
class GVAR(onFire2): GVAR(onFire1) {
idd = -1;
name = QGVAR(onFire2);
onload = QUOTE(with uiNamespace do {GVAR(onFireIndicator2) = _this select 0});
class controls: controls {
class GVAR(indicator): GVAR(indicator) {
text = PATHTOF(data\overlay_burn_2.paa);

View File

@ -2,6 +2,7 @@ PREP(burn);
PREP(isBurning);
PREP(isPlant);
PREP(burnIndicator);
PREP(burnReaction);
PREP(fireManagerPFH);
PREP(medical_progress);

View File

@ -3,7 +3,10 @@
[QGVAR(burn), FUNC(burn)] call CBA_fnc_addEventHandler;
[QGVAR(playScream), {
params ["_scream", "_source"];
_source say3D _scream;
// only play sound if enabled in settings
if (GVAR(enableScreams)) then {
_source say3D _scream;
};
}] call CBA_fnc_addEventHandler;
["ace_settingsInitialized", {
@ -22,7 +25,7 @@
[GVAR(fireSources), _key, [_fireLogic, _radius, _intensity, _condition, _conditionArgs]] call CBA_fnc_hashSet;
}] call CBA_fnc_addEventHandler;
[QGVAR(removeFireSource), {
params ["_key"];
[GVAR(fireSources), _key] call CBA_fnc_hashRem;

View File

@ -37,13 +37,13 @@ if (_isBurning) exitWith {};
// looped function
(_this getVariable "params") params ["_unit", "", "_instigator"];
private _unitPos = getPosASL _unit;
_intensity = _unit getVariable [QGVAR(intensity), 0];
if (surfaceIsWater _unitPos && {(_unitPos#2) < 1}) then {
_intensity = 0;
};
_fireParticle setDropInterval (0.01 max linearConversion [MAX_INTENSITY, MIN_INTENSITY, _intensity, 0.03, 0.1, false]);
_fireParticle setParticleParams [
["\A3\data_f\ParticleEffects\Universal\Universal", 16, 10, 32], // sprite sheet values
@ -86,7 +86,7 @@ if (_isBurning) exitWith {};
0, // random direction period
0 // random direction intensity
];
_smokeParticle setParticleCircle [0, [0, 0, 0]];
_smokeParticle setParticleRandom [
0, // life time
@ -124,18 +124,18 @@ if (_isBurning) exitWith {};
_unit // particle source
];
_smokeParticle setDropInterval 0.15;
_fireLight setLightBrightness ((_intensity * 3) / 10);
_lightFlare setLightBrightness (_intensity / 30);
private _distanceToUnit = (_unit distance ace_player);
_fireLight setLightAttenuation [1, 10 max (5 min (10 - _intensity)), 0, 15];
_lightFlare setLightFlareSize (_intensity * (3 / 4)) * FLARE_SIZE_MODIFIER;
if (!GVAR(enableFlare)) then {
_lightFlare setLightFlareSize 0;
};
// always keep flare visible to perceiving unit as long as it isnt the player
if !(_unit isEqualTo ace_player) then {
private _relativeAttachPoint = [0, 0, 0.3];
@ -145,14 +145,14 @@ if (_isBurning) exitWith {};
};
_lightFlare attachTo [_unit, _relativeAttachPoint];
};
if (!isGamePaused) then {
// If the unit goes to spectator alive _unit == true and they will be on fire and still take damage
// Only workaround I could think of, kinda clunky
if (_isThisUnitAlive) then {
_isThisUnitAlive = (alive _unit) && { getNumber ((configOf _unit) >> "isPlayableLogic") != 1 };
};
// propagate fire
if ((CBA_missionTime - _lastPropogateUpdate) >= BURN_PROPOGATE_UPDATE) then {
_lastPropogateUpdate = CBA_missionTime;
@ -178,7 +178,7 @@ if (_isBurning) exitWith {};
};
};
};
// update intensity/fire reactions
if ((CBA_missionTime - _lastIntensityUpdate) >= INTENSITY_UPDATE) then {
_lastIntensityUpdate = CBA_missionTime;
@ -203,7 +203,7 @@ if (_isBurning) exitWith {};
} else {
private _group = (group _unit);
private _vehicle = vehicle _unit;
if (_vehicle != _unit) then {
TRACE_1("Ejecting", _unit);
_unit leaveVehicle _vehicle;
@ -227,16 +227,10 @@ if (_isBurning) exitWith {};
_intensity = _intensity - (1 / _intensity);
};
};
if ((_unit isEqualTo vehicle _unit) && { !(currentWeapon _unit isEqualTo "") }) then {
[_unit] call EFUNC(hitreactions,throwWeapon);
};
private _soundID = floor (1 + random 15);
private _sound = format [QGVAR(scream_%1), _soundID];
[QGVAR(playScream), [_sound, _unit]] call CBA_fnc_globalEvent;
[_unit] call FUNC(burnReaction);
};
// Common burn areas are the hands and face https://www.ncbi.nlm.nih.gov/pubmed/16899341/
private _woundSelection = ["Head", "Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg"] selectRandomWeighted [0.77, 0.5, 0.8, 0.8, 0.3, 0.3];
if (GET_PAIN_PERCEIVED(_unit) < (PAIN_UNCONSCIOUS + random 0.2)) then {
@ -249,7 +243,7 @@ if (_isBurning) exitWith {};
_unit setVariable [QGVAR(intensity), _intensity, true]; // globally sync intensity across all clients to make sure simulation is deterministic
};
};
private _burnIndicatorPFH = _unit getVariable [QGVAR(burnUIPFH), -1];
if (_unit isEqualTo ace_player && { _isThisUnitAlive } && { _burnIndicatorPFH < 0 }) then {
_burnIndicatorPFH = [FUNC(burnIndicator), 1, _unit] call CBA_fnc_addPerFrameHandler;
@ -261,30 +255,30 @@ if (_isBurning) exitWith {};
// init function
private _params = _this getVariable "params";
_params params ["_unit", "_startingIntensity"];
_intensity = _startingIntensity;
private _unitPos = getPos _unit;
_fireParticle = "#particlesource" createVehicleLocal _unitPos;
_fireParticle attachTo [_unit, [0, 0, 0]];
_fireParticle setDropInterval 0.03;
_smokeParticle = "#particlesource" createVehicleLocal _unitPos;
_fireLight = "#lightpoint" createVehicleLocal _unitPos;
_fireLight setLightIntensity 0;
_fireLight setLightAmbient [0.8, 0.6, 0.2];
_fireLight setLightColor [1, 0.5, 0.4];
_fireLight attachTo [_unit, [0, 0, 0]];
_fireLight setLightDayLight false;
_lightFlare = "#lightpoint" createVehicleLocal _unitPos;
_lightFlare setLightIntensity 0;
_lightFlare setLightColor [1, 0.8, 0.8];
_lightFlare setLightUseFlare true;
_lightFlare setLightFlareMaxDistance 100;
_lightFlare setLightFlareSize 0;
if !(_unit isEqualTo ace_player) then {
private _relativeAttachPoint = (vectorNormalized (_unit worldToModelVisual (getPos ace_player))) vectorMultiply 1;
_relativeAttachPoint set [2, 0.5];
@ -292,30 +286,28 @@ if (_isBurning) exitWith {};
} else {
_lightFlare attachTo [_unit, [0, 0, 0.3]];
};
if (isServer) then {
_fireSound = createSoundSource ["Sound_Fire", _unitPos, [], 0];
_fireSound attachTo [_unit, [0, 0, 0], "destructionEffect1"];
};
_unit setVariable [QGVAR(burning), true];
_unit setVariable [QGVAR(intensity), _intensity];
_unit setVariable [QGVAR(burnUIPFH), -1];
if (local _unit) then {
if (_unit isEqualTo ace_player) then {
private _burnIndicatorPFH = [FUNC(burnIndicator), 1, _unit] call CBA_fnc_addPerFrameHandler;
_unit setVariable [QGVAR(burnUIPFH), _burnIndicatorPFH];
};
private _soundID = floor (1 + random 15);
private _sound = format [QGVAR(scream_%1), _soundID];
[QGVAR(playScream), [_sound, _unit]] call CBA_fnc_globalEvent;
[_unit, false] call FUNC(burnReaction);
};
_lastIntensityUpdate = 0;
_lastPropogateUpdate = 0;
_isThisUnitAlive = true;
}, {
(_this getVariable "params") params ["_unit"];
@ -326,7 +318,7 @@ if (_isBurning) exitWith {};
deleteVehicle _fireLight;
deleteVehicle _lightFlare;
deleteVehicle _fireSound;
if (local _unit) then {
if (!isPlayer _unit) then {
_unit setUnitPos "AUTO";
@ -340,9 +332,9 @@ if (_isBurning) exitWith {};
}, {
// exit condition
(_this getVariable "params") params ["_unit"];
private _unitAlive = (alive _unit) && { getNumber ((configOf _unit) >> "isPlayableLogic") != 1 };
private _unitIsUnit = { (_unit != vehicle _unit) && { isNull vehicle _unit } };
!_unitAlive || _unitIsUnit || { _intensity <= MIN_INTENSITY } || { !([_unit] call FUNC(isBurning)) }
}, ["_intensity", "_fireParticle", "_smokeParticle", "_fireLight", "_fireSound", "_lightFlare", "_lastIntensityUpdate", "_lastPropogateUpdate", "_isThisUnitAlive"]] call CBA_fnc_createPerFrameHandlerObject;

View File

@ -0,0 +1,31 @@
#include "script_component.hpp"
/*
* Author: Brandon (TCVM), veteran29
* Handles burning reactions of an unit, like screaming or throwing the weapons away due to pain.
*
* Arguments:
* 0: Unit <OBJECT>
* 1: Should unit throw its current weapon <BOOL>
*
* Return Value:
* None
*
* Public: No
*/
params ["_unit", ["_throwWeapon", true]];
if (
_throwWeapon
&& {GVAR(dropWeapon) > 0}
&& {_unit in _unit && { !(currentWeapon _unit isEqualTo "") }}
&& {!isPlayer _unit || GVAR(dropWeapon >= 2)}
) then {
[_unit] call EFUNC(hitreactions,throwWeapon);
};
if (_unit isKindOf "CAManBase") then {
private _soundID = floor (1 + random 15);
private _sound = format [QGVAR(scream_%1), _soundID];
[QGVAR(playScream), [_sound, _unit]] call CBA_fnc_globalEvent;
};

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