Merge branch 'master' into armake

This commit is contained in:
jonpas 2017-02-07 03:51:29 +01:00
commit b2986cea8a
1946 changed files with 73638 additions and 11499 deletions

55
.gibot.yml Normal file
View File

@ -0,0 +1,55 @@
stages:
mark_for_closing:
days: 30
labels:
- need more info
- invalid
- can't reproduce
- wontfix
- information required
exclude:
- marked for cleanup
comment:
- 'Hello @{author}! There has been no activity on this ticket for over a period of {days} days. I am automatically replying to let you know we will close this ticket within 1 week due to inactivity and consider this resolved.'
- 'If you believe this is in error, please reply with the requested information.'
- 'Thank you. :robot:'
action:
close: false
comment: true
assign_label:
- marked for cleanup
clean_up:
days: 7
labels:
- marked for cleanup
comment:
- 'Hello @{author}! We have detected no activity for {days} days on this ticket. We therefore assume that the original reporter has lost interest or the issue has been resolved.'
- 'Since we have marked this ticket for deletion, we will be closing it.'
- 'If this has been closed in error, please create a comment below and we can reopen this issue. Note that you may need to provide additional information that was requested.'
- 'Thank you. :robot:'
action:
close: true
comment: true
assign_label:
- closed by bot
remove_label:
- marked for cleanup
remind_about_old_ticket:
days: 160
labels:
- bug
- critical bug
exclude:
- need more info
- invalid
- can't reproduce
- wontfix
- information required
- marked for cleanup
- inactive
comment:
- 'Hello @acemod/maintainers. This ticket has been open for over {days} days without any activity.'
action:
comment: true
assign_label:
- inactive

View File

@ -1,5 +1,5 @@
**Arma 3 Version:** `x.xx` (stable / rc / dev)
**CBA Version:** `2.x.x` (stable / dev + commit hash)
**CBA Version:** `3.x.x` (stable / dev + commit hash)
**ACE3 Version:** `3.x.x` (stable / dev + commit hash)
**Mods:**

View File

@ -1,4 +1,5 @@
**When merged this pull request will:**
- Describe what this pull request will do
- Each change in a separate line
- Respect the [Development Guidelines](http://ace3mod.com/wiki/development/)
- Include documentation if applicable
- Respect the [Development Guidelines](https://ace3mod.com/wiki/development/)

View File

@ -0,0 +1,20 @@
# No issues and PRs without labels
issues=false
pr-wo-labels=false
# Issues are disabled, don't fetch them
max-issues=0
# Label filters
exclude-labels=by design,can't reproduce,duplicate,question,invalid,wontfix,ignore changelog
# Tag is created before generating changelog for release candidates
unreleased=false
# No section labels, we only want a list of merged PRs (label separation only works for Issues)
simple-list=true
# Misc
author=false
compare-link=false
header-label=## Change Log Summary

1
.gitignore vendored
View File

@ -9,3 +9,4 @@ texHeaders.bin
*.biprivatekey
Thumbs.db
ace3_*.zip
CHANGELOG.md

View File

@ -18,7 +18,7 @@ script:
fi
env:
global:
- secure: KcJQbknBOdC5lA4nFGKPXVRVIGLDXDRzC8XkHuXJCE9pIR/wbxbkvx8fHKcC6SC9eHgzneC3+o4m4+CjIbVvIwDgslRbJ8Y59i90ncONmdoRx1HUYHwuYWVZm9HJFjCsIbrEqhSyyKS+PB3WZVOLbErtNHsgS8f43PTh5Ujg7Vg=
- secure: cdxkn5cAx+s1C9Ne5m+odEhde1uuSg6XGMDgepN4DwSAJwtMnUv3ZmDebd5YJC1raZJdep+n09Cj0GoTNICQRkco50DxHKHYNad41wetY0tn0cs9gmPYzyFE5q4vuWiQ47dlGhQQ7IJDyX0nU++gG5E50/PhlZfebdedGSprN/4=
notifications:
slack:
rooms:

View File

@ -29,6 +29,7 @@ Walter Pearce <jaynus@gmail.com>
# CONTRIBUTORS
[BIG]Bull
11RDP-LoupVert <loupvert@11rdp.fr>
654wak654 <ozanegitmen@gmail.com>
ACCtomeek <tomeek99@gmail.com>
adam3adam <br.ada@seznam.cz>
Adanteh
@ -89,6 +90,7 @@ legman <juicemelon@msn.com>
Legolasindar "Viper" <legolasindar@gmail.com>
licht-im-Norden87 <lichtimnorden87@gmail.com>
looter <looter222@gmail.com>
Luigi "Luigium" Myrini <luigium@outlook.fr>
Macusercom <macusercom@gmail.com>
MarcBook
meat <p.humberdroz@gmail.com>

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.6.0-blue.svg?style=flat-square" alt="ACE3 Version">
<img src="https://img.shields.io/badge/Version-3.8.3-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">

Binary file not shown.

Binary file not shown.

BIN
ace_break_line_x64.dll Normal file

Binary file not shown.

BIN
ace_clipboard_x64.dll Normal file

Binary file not shown.

BIN
ace_fcs_x64.dll Normal file

Binary file not shown.

BIN
ace_medical_x64.dll Normal file

Binary file not shown.

BIN
ace_parse_imagepath_x64.dll Normal file

Binary file not shown.

View File

@ -69,7 +69,7 @@ class ACE_Settings {
displayName = CSTRING(simulationInterval_DisplayName);
description = CSTRING(simulationInterval_Description);
typeName = "SCALAR";
value = 0.0;
value = 0.05;
};
class GVAR(simulationRadius) {
category = CSTRING(DisplayName);

View File

@ -71,7 +71,7 @@ class CfgVehicles {
displayName = CSTRING(simulationInterval_DisplayName);
description = CSTRING(simulationInterval_Description);
typeName = "NUMBER";
defaultValue = 0.0;
defaultValue = 0.05;
};
class simulationRadius {
displayName = CSTRING(simulationRadius_DisplayName);

View File

@ -39,7 +39,7 @@ if (!hasInterface) exitWith {};
{
_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);
WARNING_2("Weapon Mod [%1] missing ace compat pbo [%2] (from @ace\optionals)",_modPBO,_compatPBO);
};
} forEach [
["RH_acc","ace_compat_rh_acc"],

View File

@ -2,6 +2,8 @@
ADDON = false;
PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;
ADDON = true;

View File

@ -14,24 +14,22 @@
*/
#include "script_component.hpp"
private ["_muzzleVelocityShiftTableUpperLimit", "_temperatureIndexFunction",
"_temperatureIndexA", "_temperatureIndexB", "_interpolationRatio"];
params["_muzzleVelocityShiftTable", "_temperature"];
params ["_muzzleVelocityShiftTable", "_temperature"];
// Check if muzzleVelocityShiftTable is Less Than 11 Entrys
if ((count _muzzleVelocityShiftTable) < 11) exitWith {0};
_muzzleVelocityShiftTableUpperLimit = _muzzleVelocityShiftTable select 10;
private _muzzleVelocityShiftTableUpperLimit = _muzzleVelocityShiftTable select 10;
if (isNil "_muzzleVelocityShiftTableUpperLimit") exitWith { 0 };
// Find exact data index required for given temperature
_temperatureIndexFunction = (_temperature + 15) / 5;
private _temperatureIndexFunction = (_temperature + 15) / 5;
// lower and upper data index used for interpolation
_temperatureIndexA = (0 max (floor(_temperatureIndexFunction))) min 10;
_temperatureIndexB = (0 max (ceil(_temperatureIndexFunction))) min 10;
private _temperatureIndexA = (0 max (floor(_temperatureIndexFunction))) min 10;
private _temperatureIndexB = (0 max (ceil(_temperatureIndexFunction))) min 10;
// Interpolation ratio
_interpolationRatio = _temperatureIndexFunction - floor(_temperatureIndexFunction);
private _interpolationRatio = _temperatureIndexFunction - floor(_temperatureIndexFunction);
// Interpolation
(_muzzleVelocityShiftTable select _temperatureIndexA) * (1 - _interpolationRatio) + (_muzzleVelocityShiftTable select _temperatureIndexB) * _interpolationRatio // Return

View File

@ -17,11 +17,9 @@
*/
#include "script_component.hpp"
private "_airDensity";
params ["_ballisticCoefficient", "_temperature"/*in C*/, "_pressure"/*in hPa*/, "_relativeHumidity"/*as ratio 0-1*/, "_atmosphereModel"/*"ICAO" or "ASM"*/];
_airDensity = [_temperature, _pressure, _relativeHumidity] call EFUNC(weather,calculateAirDensity);
private _airDensity = [_temperature, _pressure, _relativeHumidity] call EFUNC(weather,calculateAirDensity);
if (_atmosphereModel == "ICAO") then {
(STD_AIR_DENSITY_ICAO / _airDensity) * _ballisticCoefficient

View File

@ -19,14 +19,13 @@
*/
#include "script_component.hpp"
private ["_twist", "_length", "_stabilityFactor"];
params ["_caliber", "_bulletLength", "_bulletMass", "_barrelTwist", "_muzzleVelocity", "_temperature", "_barometricPressure"];
// Source: http://www.jbmballistics.com/ballistics/bibliography/articles/miller_stability_1.pdf
_twist = _barrelTwist / _caliber;
_length = _bulletLength / _caliber;
private _twist = _barrelTwist / _caliber;
private _length = _bulletLength / _caliber;
_stabilityFactor = 7587000 * _bulletMass / (_twist^2 * _caliber^3 * _length * (1 + _length^2));
private _stabilityFactor = 7587000 * _bulletMass / (_twist^2 * _caliber^3 * _length * (1 + _length^2));
if (_muzzleVelocity > 341.376) then {
(_stabilityFactor * (_muzzleVelocity / 853.44) ^ (1/3)) * KELVIN(_temperature) / KELVIN(15) * 1013.25 / _barometricPressure

View File

@ -15,17 +15,16 @@
private _aceTimeSecond = floor CBA_missionTime;
{
private ["_bulletVelocity", "_bulletPosition", "_bulletSpeed"];
_x params["_bullet","_caliber","_bulletTraceVisible","_index"];
_x params ["_bullet","_caliber","_bulletTraceVisible","_index"];
_bulletVelocity = velocity _bullet;
private _bulletVelocity = velocity _bullet;
_bulletSpeed = vectorMagnitude _bulletVelocity;
private _bulletSpeed = vectorMagnitude _bulletVelocity;
if (!alive _bullet || _bulletSpeed < 100) then {
GVAR(allBullets) deleteAt (GVAR(allBullets) find _x);
} else {
_bulletPosition = getPosASL _bullet;
private _bulletPosition = getPosASL _bullet;
if (_bulletTraceVisible && _bulletSpeed > 500) then {
drop ["\A3\data_f\ParticleEffects\Universal\Refract","","Billboard",1,0.1,getPos _bullet,[0,0,0],0,1.275,1,0,[0.02*_caliber,0.01*_caliber],[[0,0,0,0.65],[0,0,0,0.2]],[1,0],0,0,"","",""];

View File

@ -42,12 +42,6 @@ if (!GVAR(simulateForEveryone) && !(local _unit)) then {
//if (!GVAR(vehicleGunnerEnabled) && !(_unit isKindOf "Man")) then { _abort = true; }; // We currently do not have firedEHs on vehicles
if (GVAR(disabledInFullAutoMode) && getNumber(configFile >> "CfgWeapons" >> _weapon >> _mode >> "autoFire") == 1) then { _abort = true; };
if (_abort || !(GVAR(extensionAvailable))) exitWith {
if (missionNamespace getVariable [QEGVAR(windDeflection,enabled), false]) then {
EGVAR(windDeflection,trackedBullets) pushBack [_projectile, getNumber(configFile >> "CfgAmmo" >> _ammo >> "airFriction")];
};
};
// Get Weapon and Ammo Configurations
_AmmoCacheEntry = uiNamespace getVariable format[QGVAR(%1), _ammo];
if (isNil "_AmmoCacheEntry") then {
@ -86,6 +80,12 @@ if (GVAR(ammoTemperatureEnabled) || GVAR(barrelLengthInfluenceEnabled)) then {
};
};
if (_abort || !(GVAR(extensionAvailable))) exitWith {
if (missionNamespace getVariable [QEGVAR(windDeflection,enabled), false]) then {
EGVAR(windDeflection,trackedBullets) pushBack [_projectile, getNumber(configFile >> "CfgAmmo" >> _ammo >> "airFriction")];
};
};
_bulletTraceVisible = false;
if (GVAR(bulletTraceEnabled) && cameraView == "GUNNER") then {
if (currentWeapon ACE_player == binocular ACE_player) then {

View File

@ -22,6 +22,7 @@ _initStartTime = CBA_missionTime;
_mapSize = getNumber (configFile >> "CfgWorlds" >> worldName >> "MapSize");
if (("ace_advanced_ballistics" callExtension format["init:%1:%2", worldName, _mapSize]) == "Terrain already initialized") exitWith {
INFO_1("Terrain already initialized [world: %1]", worldName);
#ifdef DEBUG_MODE_FULL
systemChat "AdvancedBallistics: Terrain already initialized";
#endif
@ -32,11 +33,14 @@ _gridCells = _mapGrids * _mapGrids;
GVAR(currentGrid) = 0;
INFO_2("Starting Terrain Extension [cells: %1] [world: %2]", _gridCells, worldName);
[{
params ["_args","_idPFH"];
_args params ["_mapGrids", "_gridCells", "_initStartTime"];
if (GVAR(currentGrid) >= _gridCells) exitWith {
INFO_2("Finished terrain initialization in %1 seconds [world: %2]", ceil(CBA_missionTime - _initStartTime), worldName);
#ifdef DEBUG_MODE_FULL
systemChat format["AdvancedBallistics: Finished terrain initialization in %1 seconds", ceil(CBA_missionTime - _initStartTime)];
#endif

View File

@ -59,7 +59,7 @@ if ((_typicalSpeed > 0) && {_typicalSpeed < 360}) then {
if (_inheritedBarrelConfig || _inheritedTempConfig) then {
private _parentConfig = inheritsFrom _ammoConfig;
private _parentSpeed = getNumber (_parentConfig >> "typicalSpeed");
ACE_LOGWARNING_4("Subsonic Ammo %1 (%2 m/s) missing `ACE_muzzleVelocities` or `ACE_ammoTempMuzzleVelocityShifts` configs, attempting to use parent %3 (%4m/s)",_this,_typicalSpeed,configName _parentConfig, _parentSpeed);
WARNING_4("Subsonic Ammo %1 (%2 m/s) missing `ACE_muzzleVelocities` or `ACE_ammoTempMuzzleVelocityShifts` configs, attempting to use parent %3 (%4m/s)",_this,_typicalSpeed,configName _parentConfig, _parentSpeed);
if (_parentSpeed <= 0) exitWith {//Handle weird or null parent
_muzzleVelocityTable = [];
_ammoTempMuzzleVelocityShifts = [];

View File

@ -15,11 +15,10 @@
*/
#include "script_component.hpp"
private ["_weaponConfig", "_barrelTwist", "_twistDirection", "_barrelLength", "_result"];
_weaponConfig = (configFile >> "CfgWeapons" >> _this);
private _weaponConfig = (configFile >> "CfgWeapons" >> _this);
_barrelTwist = getNumber(_weaponConfig >> "ACE_barrelTwist");
_twistDirection = 1;
private _barrelTwist = getNumber(_weaponConfig >> "ACE_barrelTwist");
private _twistDirection = 1;
if (isNumber (_weaponConfig >> "ACE_twistDirection")) then {
_twistDirection = getNumber (_weaponConfig >> "ACE_twistDirection");
if !(_twistDirection in [-1, 0, 1]) then {
@ -27,9 +26,9 @@ if (isNumber (_weaponConfig >> "ACE_twistDirection")) then {
};
};
_barrelLength = getNumber(_weaponConfig >> "ACE_barrelLength");
private _barrelLength = getNumber(_weaponConfig >> "ACE_barrelLength");
_result = [_barrelTwist, _twistDirection, _barrelLength];
private _result = [_barrelTwist, _twistDirection, _barrelLength];
uiNamespace setVariable [format[QGVAR(%1), _weapon], _result];

View File

@ -4,7 +4,6 @@
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define CBA_DEBUG_SYNCHRONOUS
// #define ENABLE_PERFORMANCE_COUNTERS
#ifdef DEBUG_ENABLED_ADVANCEDBALLISTICS

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="Advanced_Ballistics">
<Key ID="STR_ACE_Advanced_Ballistics_WindInfoKey">
@ -12,6 +12,8 @@
<Hungarian>Széladatok mutatása</Hungarian>
<Czech>Zobrazit údaje o větru</Czech>
<Portuguese>Mostrar Informação do Vento</Portuguese>
<Japanese>風の情報を表示</Japanese>
<Korean>바람의 정보를 표시</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_ProtractorKey">
<English>Show Protractor</English>
@ -24,6 +26,8 @@
<Hungarian>Szögmérő mutatása</Hungarian>
<Czech>Zobrazit úhloměr</Czech>
<Portuguese>Mostrar Transferidor</Portuguese>
<Japanese>分度器を表示</Japanese>
<Korean>각도기 표시</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_DisplayName">
<English>Advanced Ballistics</English>
@ -36,6 +40,8 @@
<Hungarian>Fejlett ballisztika</Hungarian>
<Russian>Продвинутая баллистика</Russian>
<Italian>Balistica Avanzata</Italian>
<Japanese>アドバンスド バリスティックス</Japanese>
<Korean>고급 탄도학</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_enabled_DisplayName">
<English>Advanced Ballistics</English>
@ -48,6 +54,8 @@
<Hungarian>Fejlett ballisztika</Hungarian>
<Russian>Продвинутая баллистика</Russian>
<Italian>Balistica Avanzata</Italian>
<Japanese>アドバンスド バリスティックス</Japanese>
<Korean>고급 탄도학</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_enabled_Description">
<English>Enables advanced ballistics</English>
@ -60,6 +68,8 @@
<Hungarian>Engedélyezi a fejlett ballisztikát</Hungarian>
<Russian>Включает продвинутую баллистику</Russian>
<Italian>Abilita Balistica Avanzata</Italian>
<Japanese>アドバンスド バリスティックスを有効化</Japanese>
<Korean>고급 탄도학을 적용합니다</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_simulateForSnipers_DisplayName">
<English>Enabled For Snipers</English>
@ -72,6 +82,8 @@
<Hungarian>Mesterlövészeknek engedélyezve</Hungarian>
<Russian>Включена для снайперов</Russian>
<Italian>Abilita per Tiratori Scelti</Italian>
<Japanese>狙撃手へ有効化</Japanese>
<Korean>저격수만 적용</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_simulateForSnipers_Description">
<English>Enables advanced ballistics for non local snipers (when using high power optics)</English>
@ -84,6 +96,8 @@
<Hungarian>Engedélyezi a fejlett ballisztikát nem-helyi mesterlövészeknek (nagy-teljesítményű optika használatakor)</Hungarian>
<Russian>Включает продвинутую баллистику для нелокальных снайперов (при использовании мощной оптики)</Russian>
<Italian>Abilita Balistica Avanzata per Tiratori Scelti non locali (con ottiche ad alto potenziale)</Italian>
<Japanese>非ローカルの狙撃手 (高倍率スコープを使っている場合)へアドバンスド バリスティックスを有効化します</Japanese>
<Korean>고급 탄도학을 비-저격수 인원에게도 적용합니다(고성능 조준경을 사용시)</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_simulateForGroupMembers_DisplayName">
<English>Enabled For Group Members</English>
@ -96,6 +110,8 @@
<Hungarian>Csoporttagoknak engedélyezve</Hungarian>
<Russian>Включена для группы</Russian>
<Italian>Abilita per Membri del Gruppo</Italian>
<Japanese>グループ メンバーへ有効化</Japanese>
<Korean>그룹 멤버도 적용</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_simulateForGroupMembers_Description">
<English>Enables advanced ballistics for non local group members</English>
@ -108,6 +124,8 @@
<Hungarian>Engedélyezi a fejlett ballisztikát nem-helyi csoporttagoknak</Hungarian>
<Russian>Включает продвинутую баллистику для нелокальных членов группы</Russian>
<Italian>Abilita Balistica Avanzata per Membri non locali del Gruppo</Italian>
<Japanese>非ローカルのグループ メンバーへアドバンスド バリスティックスを有効化します</Japanese>
<Korean>고급 탄도학을 비-그룹멤버에게도 적용합니다</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_simulateForEveryone_DisplayName">
<English>Enabled For Everyone</English>
@ -120,6 +138,8 @@
<Hungarian>Mindenkinek engedélyezve</Hungarian>
<Russian>Включена для всех</Russian>
<Italian>Abilita per tutti</Italian>
<Japanese>全員に有効化</Japanese>
<Korean>모두에게 적용</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_simulateForEveryone_Description">
<English>Enables advanced ballistics for all non local players (enabling this may degrade performance during heavy firefights in multiplayer)</English>
@ -132,6 +152,8 @@
<Hungarian>Engedélyezi a fejlett ballisztikát az összes nem-helyi játékosnak (ez a funkció leronthatja a teljesítményt intenzív többjátékos tűzharcok alatt)</Hungarian>
<Russian>Включает продвинутую баллистику для всех нелокальных игроков (включение этой опции может снизить производительность при массовых перестрелках в мультиплеере)</Russian>
<Italian>Abilita Balistica Avanzata per tutti i giocatori non locali (abilitare questo parametro potrebbe degradare le prestazioni durante scontri intensi in multiplayer)</Italian>
<Japanese>非ローカルの全プレイヤーへアドバンスド バリスティックスを有効化します (マルチプレイで大規模な銃撃戦がおこなわれると、動作の低下を招きます)</Japanese>
<Korean>고급 탄도학을 모든 비-로컬그룹에게도 적용합니다(적용 후 대규모 전투시 성능하락을 유발할 수 있습니다)</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_alwaysSimulateForGroupMembers_DisplayName">
<English>Always Enabled For Group Members</English>
@ -144,6 +166,8 @@
<Hungarian>Mindig engedélyezve csoporttagoknak</Hungarian>
<Russian>Всегда включена для членов группы</Russian>
<Italian>Sempre abilitato per Membri del Gruppo</Italian>
<Japanese>常にグループ メンバーへ有効化</Japanese>
<Korean>그룹 멤버에게 항상 적용</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_alwaysSimulateForGroupMembers_Description">
<English>Always enables advanced ballistics when a group member fires</English>
@ -156,6 +180,8 @@
<Hungarian>Mindig engedélyezi a fejlett ballisztikát, ha egy csoporttag tüzel</Hungarian>
<Russian>Всегда включает продвинутую баллистику когда стреляет член группы</Russian>
<Italian>Abilita sempre Balistica Avanzata quando un Membro del Gruppo spara</Italian>
<Japanese>グループ メンバーが射撃した時、常にアドバンスド バリスティックスを有効化します</Japanese>
<Korean>그룹 멤버가 발사시 항상 고급 탄도학을 적용합니다</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_disabledInFullAutoMod_DisplayName">
<English>Disabled In FullAuto Mode</English>
@ -168,6 +194,8 @@
<Hungarian>Automata módban letiltva</Hungarian>
<Russian>Выкл. для автомат. режима</Russian>
<Italian>Disabilita in modalità di fuoco automatico</Italian>
<Japanese>フルオートでは無効化</Japanese>
<Korean>조정간 자동시 비활성화</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_disabledInFullAutoMod_Description">
<English>Disables the advanced ballistics during full auto fire</English>
@ -180,6 +208,8 @@
<Hungarian>Letiltja a fejlett ballisztikát automata tüzelés folyamán</Hungarian>
<Russian>Выключает продвинутую баллистику при стрельбе в полностью автоматическом режиме</Russian>
<Italian>Disabilita Balistica Avanzata durante fuoco automatico</Italian>
<Japanese>フルオートで射撃中ではアドバンスド バリスティックスを無効化します</Japanese>
<Korean>조정간 자동시 고급 탄도학을 비활성화 합니다</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_ammoTemperatureEnabled_DisplayName">
<English>Enable Ammo Temperature Simulation</English>
@ -192,6 +222,8 @@
<Hungarian>Lőszer-hő szimuláció engedélyezése</Hungarian>
<Russian>Симуляция температуры для боеприпасов</Russian>
<Italian>Abilita simulazione della temperatura delle munizioni</Italian>
<Japanese>弾薬の温度シミュレーションを有効化</Japanese>
<Korean>탄약 온도 구현 적용</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_ammoTemperatureEnabled_Description">
<English>Muzzle velocity varies with ammo temperature</English>
@ -204,6 +236,8 @@
<Hungarian>A kezdősebesség a lőszer hőmérsékletétől függően változó</Hungarian>
<Russian>Начальная скорость пули зависит от температуры</Russian>
<Italian>Velocità alla volata varia con la temperatura delle munizioni</Italian>
<Japanese>弾薬の温度により初速値を変化させます</Japanese>
<Korean>탄약 온도에 비례해 총구 속도가 달라집니다</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_barrelLengthInfluenceEnabled_DisplayName">
<English>Enable Barrel Length Simulation</English>
@ -216,6 +250,8 @@
<Hungarian>Csőhossz-szimuláció engedélyezése</Hungarian>
<Russian>Симуляция длины ствола</Russian>
<Italian>Abilita simulazione della lunghezza della canna</Italian>
<Japanese>銃身長のシミュレーションを有効化</Japanese>
<Korean>총열 길이 구현 적용</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_barrelLengthInfluenceEnabled_Description">
<English>Muzzle velocity varies with barrel length</English>
@ -228,6 +264,8 @@
<Hungarian>A kezdősebesség a cső hosszától függően változó</Hungarian>
<Russian>Начальная скорость пули зависит от длины ствола</Russian>
<Italian>Velocità alla volata varia con la lunghezza della canna</Italian>
<Japanese>銃身長により初速値を変化させます</Japanese>
<Korean>총구 속도가 총열에 비례해 달라집니다</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_bulletTraceEnabled_DisplayName">
<English>Enable Bullet Trace Effect</English>
@ -240,6 +278,8 @@
<Hungarian>Nyomkövető-effekt engedélyezése</Hungarian>
<Russian>Следы пуль</Russian>
<Italian>Abilita effetto di tracciatura dei proiettili</Italian>
<Japanese>弾丸の痕跡表示を有効化</Japanese>
<Korean>예광탄 효과 적용</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_bulletTraceEnabled_Description">
<English>Enables a bullet trace effect to high caliber bullets (only visible when looking through high power optics)</English>
@ -252,6 +292,8 @@
<Hungarian>Engedélyezi a nagy kaliberű lövedékek nyomának vizuális követését (csak nagy teljesítményű optikán keresztül látható)</Hungarian>
<Russian>Включает эффект следов пуль для больших калибров (видны только через мощную оптику)</Russian>
<Italian>Abilita effetto di tracciatura per proiettili di alto calibro (visibile solo attraverso ottiche ad alto potenziale)</Italian>
<Japanese>大口径の銃弾による弾丸の痕跡表示を有効化します (高倍率スコープを介してでしか見れません)</Japanese>
<Korean>대구경 탄환에 예광탄 효과를 적용합니다(오직 고성능 조준경 사용시에만 보입니다)</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_simulationInterval_DisplayName">
<English>Simulation Interval</English>
@ -264,6 +306,8 @@
<Hungarian>Szimuláció intervalluma</Hungarian>
<Russian>Интервал симуляции</Russian>
<Italian>Intervallo Simulazione</Italian>
<Japanese>シミュレーション間隔</Japanese>
<Korean>구현 간격</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_simulationInterval_Description">
<English>Defines the interval between every calculation step</English>
@ -276,6 +320,8 @@
<Hungarian>Meghatározza a számítási lépések közötti időintervallumot</Hungarian>
<Russian>Определяет временной интервал между вычислениями</Russian>
<Italian>Definisce l'intervallo tra ogni step di calcolo</Italian>
<Japanese>各計算ごとの間隔を定義します</Japanese>
<Korean>각 계산 단위의 간격을 정의합니다</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_simulationRadius_DisplayName">
<English>Simulation Radius</English>
@ -288,6 +334,8 @@
<Hungarian>Szimuláció hatóköre</Hungarian>
<Russian>Радиус симуляции</Russian>
<Italian>Raggio Simulazione</Italian>
<Japanese>シミュレーションの適用範囲</Japanese>
<Korean>구현 범위</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_simulationRadius_Description">
<English>Defines the radius around the player (in meters) at which advanced ballistics are applied to projectiles</English>
@ -300,6 +348,8 @@
<Hungarian>Meghatározza a játékos körüli hatókört (méterben), ahol a lövedékek fejlett ballisztikát használnak</Hungarian>
<Russian>Определяет радиус вокруг игрока (в метрах), в котором продвинутая баллистика применяется к снарядам</Russian>
<Italian>Definisce il raggio attorno al giocatore (in metri) per cui la Balistica Avanzata è applicata ai proiettili</Italian>
<Japanese>プレイヤーの周囲にアドバンスド バリスティックスによる弾道を適用させる範囲を半径で定義します (メートル)</Japanese>
<Korean>플레이어 주위의 발사체를 고급 탄도학으로 정의하는 범위를 정합니다(미터)</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_Description">
<English>This module enables advanced ballistics simulation - meaning the trajectory of projectiles is influenced by variables like air temperature, atmospheric pressure, humidity, gravity, the type of ammunition and the weapon from which it was fired.</English>
@ -312,6 +362,8 @@
<Russian>Этот модуль включает симуляцию продвинутой баллистики - при этом на траекторию полета снаряда влияют различные параметры, такие как температура воздуха, атмосферное давление, влажность, гравитация, тип боеприпаса и оружия, из которого произвели выстрел.</Russian>
<Spanish>Este módulo permite la simulación balística avanzada - es decir, la trayectoria de los proyectiles está influenciada por variables como la temperatura del aire, la presión atmosférica, la humedad, la gravedad, el tipo de municiones y el arma desde el que fue disparada.</Spanish>
<Italian>Questo modulo abilita la simulazione della Balistica Avanzata - cioè la traiettoria dei proiettili è influenzata da variabili come la temperatura dell'aria, pressione atmosferica, umidità, gravità, il tipo di munizione e l'arma da cui è sparata</Italian>
<Japanese>このモジュールはアドバンスド バリスティックスを有効化します。弾道は気温や気圧、湿度、重力、弾薬の種類、発射する武器から影響を受けるようになります。</Japanese>
<Korean>이 모듈은 고급 탄도학을 적용시킵니다 - 이는 발사체의 궤적이 기온, 대기압, 습도, 중력, 탄환의 종류와 어느 무기에서 발사되는지에 따라 영향을 받습니다.</Korean>
</Key>
</Package>
</Project>

View File

@ -0,0 +1 @@
z\ace\addons\advanced_fatigue

View File

@ -0,0 +1,45 @@
class ACE_Settings {
class GVAR(enabled) {
category = "Advanced Fatigue";
displayName = CSTRING(Enabled);
description = CSTRING(Enabled_Description);
typeName = "BOOL";
value = 1;
};
class GVAR(enableStaminaBar) {
category = "Advanced Fatigue";
displayName = CSTRING(EnableStaminaBar);
description = CSTRING(EnableStaminaBar_Description);
typeName = "BOOL";
value = 1;
isClientSettable = 1;
};
class GVAR(performanceFactor) {
category = "Advanced Fatigue";
displayName = CSTRING(PerformanceFactor);
description = CSTRING(PerformanceFactor_Description);
typeName = "SCALAR";
value = 1;
};
class GVAR(recoveryFactor) {
category = "Advanced Fatigue";
displayName = CSTRING(RecoveryFactor);
description = CSTRING(RecoveryFactor_Description);
typeName = "SCALAR";
value = 1;
};
class GVAR(loadFactor) {
category = "Advanced Fatigue";
displayName = CSTRING(LoadFactor);
description = CSTRING(LoadFactor_Description);
typeName = "SCALAR";
value = 1;
};
class GVAR(terrainGradientFactor) {
category = "Advanced Fatigue";
displayName = CSTRING(TerrainGradientFactor);
description = CSTRING(TerrainGradientFactor_Description);
typeName = "SCALAR";
value = 1;
};
};

View File

@ -0,0 +1,28 @@
class Cfg3DEN {
class Attributes {
class Slider;
class GVAR(slider): Slider {
attributeLoad = "params [""_ctrlGroup""]; private _slider = _ctrlGroup controlsGroupCtrl 100; private _edit = _ctrlGroup controlsGroupCtrl 101; _slider sliderSetPosition _value; _edit ctrlSetText ([_value, 1, 1] call CBA_fnc_formatNumber); ";
attributeSave = "params [""_ctrlGroup""]; sliderPosition (_ctrlGroup controlsGroupCtrl 100); ";
onLoad = "params [""_ctrlGroup""]; private _slider = _ctrlGroup controlsGroupCtrl 100; private _edit = _ctrlGroup controlsGroupCtrl 101; _slider sliderSetRange [0, 2]; _slider ctrlAddEventHandler [""SliderPosChanged"", { params [""_slider""]; private _edit = (ctrlParentControlsGroup _slider) controlsGroupCtrl 101; private _value = sliderPosition _slider; _edit ctrlSetText ([_value, 1, 1] call CBA_fnc_formatNumber); }]; _edit ctrlAddEventHandler [""KillFocus"", { params [""_edit""]; private _slider = (ctrlParentControlsGroup _edit) controlsGroupCtrl 100; private _value = ((parseNumber ctrlText _edit) min 2) max 0; _slider sliderSetPosition _value; _edit ctrlSetText str _value; }];";
};
};
class Object {
class AttributeCategories {
class ace_attributes {
class Attributes {
class GVAR(performanceFactor) {
property = QGVAR(performanceFactor);
control = QGVAR(slider);
displayName = CSTRING(PerformanceFactor);
tooltip = CSTRING(PerformanceFactor_EdenDescription);
expression = QUOTE(_this setVariable [ARR_3(QQGVAR(performanceFactor),_value,true)]);
typeName = "NUMBER";
condition = "objectControllable";
defaultValue = 1;
};
};
};
};
};
};

View File

@ -0,0 +1,23 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
};
};
class Extended_DisplayLoad_EventHandlers {
class RscDisplayMission {
ADDON = QUOTE(call FUNC(createStaminaBar));
};
};

View File

@ -0,0 +1,62 @@
class CfgMovesBasic;
class CfgMovesMaleSdr: CfgMovesBasic {
class States {
// Jog speed adjustment: 12km/h
class AmovPercMstpSlowWrflDnon;
class AmovPercMrunSlowWrflDf: AmovPercMstpSlowWrflDnon {
speed = 0.634570;
};
class AmovPercMrunSlowWrflDfl: AmovPercMrunSlowWrflDf {
speed = 0.634570;
};
class AmovPercMrunSlowWrflDl: AmovPercMrunSlowWrflDfl {
speed = 0.691626;
};
class AmovPercMrunSlowWrflDr: AmovPercMrunSlowWrflDfl {
speed = 0.727404;
};
// Jog + raised weapon speed adjustment: 13km/h
class AmovPercMstpSrasWrflDnon;
class AmovPercMrunSrasWrflDf: AmovPercMstpSrasWrflDnon {
speed = 0.677068;
};
// Tactical Jog animation replacement and speed adjustment: 10km/h
class AmovPercMwlkSlowWrflDf_ver2;
class AmovPercMwlkSlowWrflDfl_ver2;
class AmovPercMtacSlowWrflDf_ver2: AmovPercMwlkSlowWrflDf_ver2 {
speed = 0.528808;
file = "\A3\anims_f\Data\Anim\Sdr\Mov\Erc\run\low\Rfl\AmovPercMrunSlowWrflDf";
};
class AmovPercMtacSlowWrflDfl_ver2: AmovPercMwlkSlowWrflDfl_ver2 {
speed = 0.528808;
file = "\A3\anims_f\Data\Anim\Sdr\Mov\Erc\run\low\Rfl\AmovPercMrunSlowWrflDfl";
};
class AmovPercMtacSlowWrflDfr_ver2: AmovPercMtacSlowWrflDf_ver2 {
speed = 0.528808;
file = "\A3\anims_f\Data\Anim\Sdr\Mov\Erc\run\low\Rfl\AmovPercMrunSlowWrflDfr";
};
class AmovPercMtacSlowWrflDr_ver2: AmovPercMtacSlowWrflDf_ver2 {
speed = 0.528808;
file = "\A3\anims_f\Data\Anim\Sdr\Mov\Erc\run\low\Rfl\AmovPercMrunSlowWrflDr";
};
class AmovPercMtacSlowWrflDl_ver2: AmovPercMtacSlowWrflDf_ver2 {
speed = 0.528808;
file = "\A3\anims_f\Data\Anim\Sdr\Mov\Erc\run\low\Rfl\AmovPercMrunSlowWrflDl";
};
class AmovPercMtacSlowWrflDb_ver2: AmovPercMtacSlowWrflDf_ver2 {
speed = 0.684541;
file = "\A3\anims_f\Data\Anim\Sdr\Mov\Erc\run\low\Rfl\AmovPercMrunSlowWrflDb";
soundEdge[] = {0.25,0.5,0.75,1};
};
class AmovPercMtacSlowWrflDbl_ver2: AmovPercMtacSlowWrflDb_ver2 {
speed = 0.684541;
file = "\A3\anims_f\Data\Anim\Sdr\Mov\Erc\run\low\Rfl\AmovPercMrunSlowWrflDbl";
};
class AmovPercMtacSlowWrflDbr_ver2: AmovPercMtacSlowWrflDb_ver2 {
speed = 0.684541;
file = "\A3\anims_f\Data\Anim\Sdr\Mov\Erc\run\low\Rfl\AmovPercMrunSlowWrflDbr";
};
};
};

View File

@ -0,0 +1,76 @@
class CfgSounds {
class GVAR(breathLow0) {
sound[] = {"A3\sounds_f\characters\human-sfx\P04\Breath_Low_1", 0.6, 1, 7};
titles[] = {};
};
class GVAR(breathLow1) {
sound[] = {"A3\sounds_f\characters\human-sfx\P04\Breath_Low_2", 0.6, 1, 7};
titles[] = {};
};
class GVAR(breathLow2) {
sound[] = {"A3\sounds_f\characters\human-sfx\P04\Breath_Low_3", 0.6, 1, 7};
titles[] = {};
};
class GVAR(breathLow3) {
sound[] = {"A3\sounds_f\characters\human-sfx\P04\Breath_Low_4", 0.6, 1, 7};
titles[] = {};
};
class GVAR(breathLow4) {
sound[] = {"A3\sounds_f\characters\human-sfx\P04\Breath_Low_5", 0.6, 1, 7};
titles[] = {};
};
class GVAR(breathLow5) {
sound[] = {"A3\sounds_f\characters\human-sfx\P04\Breath_Low_6", 0.6, 1, 7};
titles[] = {};
};
class GVAR(breathMid0) {
sound[] = {"A3\sounds_f\characters\human-sfx\P04\Breath_Mid_1", 0.8, 1, 13};
titles[] = {};
};
class GVAR(breathMid1) {
sound[] = {"A3\sounds_f\characters\human-sfx\P04\Breath_Mid_2", 0.8, 1, 13};
titles[] = {};
};
class GVAR(breathMid2) {
sound[] = {"A3\sounds_f\characters\human-sfx\P04\Breath_Mid_3", 0.8, 1, 13};
titles[] = {};
};
class GVAR(breathMid3) {
sound[] = {"A3\sounds_f\characters\human-sfx\P04\Breath_Mid_4", 0.8, 1, 13};
titles[] = {};
};
class GVAR(breathMid4) {
sound[] = {"A3\sounds_f\characters\human-sfx\P04\Breath_Mid_5", 0.8, 1, 13};
titles[] = {};
};
class GVAR(breathMid5) {
sound[] = {"A3\sounds_f\characters\human-sfx\P04\Breath_Mid_6", 0.8, 1, 13};
titles[] = {};
};
class GVAR(breathMax0) {
sound[] = {"A3\sounds_f\characters\human-sfx\P04\Breath_Max_1", 1, 1, 17};
titles[] = {};
};
class GVAR(breathMax1) {
sound[] = {"A3\sounds_f\characters\human-sfx\P04\Breath_Max_2", 1, 1, 17};
titles[] = {};
};
class GVAR(breathMax2) {
sound[] = {"A3\sounds_f\characters\human-sfx\P04\Breath_Max_3", 1, 1, 17};
titles[] = {};
};
class GVAR(breathMax3) {
sound[] = {"A3\sounds_f\characters\human-sfx\P04\Breath_Max_4", 1, 1, 17};
titles[] = {};
};
class GVAR(breathMax4) {
sound[] = {"A3\sounds_f\characters\human-sfx\P04\Breath_Max_5", 1, 1, 17};
titles[] = {};
};
class GVAR(breathMax5) {
sound[] = {"A3\sounds_f\characters\human-sfx\P04\Breath_Max_6", 1, 1, 17};
titles[] = {};
};
};

View File

@ -0,0 +1,45 @@
class CfgVehicles {
class ACE_Module;
class GVAR(moduleSettings): ACE_Module {
author = ECSTRING(common,ACETeam);
category = "ACE";
displayName = "Advanced Fatigue";
function = QFUNC(moduleSettings);
scope = 2;
isGlobal = 1;
isTriggerActivated = 0;
icon = QPATHTOF(UI\Icon_Module.paa);
class Arguments {
class Enabled {
displayName = CSTRING(Enabled);
description = CSTRING(Enabled_Description);
typeName = "BOOL";
defaultValue = 1;
};
class PerformanceFactor {
displayName = CSTRING(PerformanceFactor);
description = CSTRING(PerformanceFactor_Description);
typeName = "NUMBER";
defaultValue = 1;
};
class RecoveryFactor {
displayName = CSTRING(RecoveryFactor);
description = CSTRING(RecoveryFactor_Description);
typeName = "NUMBER";
defaultValue = 1;
};
class LoadFactor {
displayName = CSTRING(LoadFactor);
description = CSTRING(LoadFactor_Description);
typeName = "NUMBER";
defaultValue = 1;
};
class TerrainGradientFactor {
displayName = CSTRING(TerrainGradientFactor);
description = CSTRING(TerrainGradientFactor_Description);
typeName = "NUMBER";
defaultValue = 1;
};
};
};
};

View File

@ -0,0 +1,20 @@
class RscControlsGroupNoScrollbars;
class RscPicture;
class GVAR(StaminaBarContainer): RscControlsGroupNoScrollbars {
x = "(profilenamespace getvariable [""IGUI_GRID_STAMINA_X"", ((safezoneX + safezoneW) - (10 * (((safezoneW / safezoneH) min 1.2) / 40)) - 4.3 * (((safezoneW / safezoneH) min 1.2) / 40))])";
y = "(profilenamespace getvariable [""IGUI_GRID_STAMINA_Y"", (safezoneY + 4.05 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))])";
w = "10 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "0.15 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
class Controls {
class StaminaBar: RscPicture {
idc = 10;
x = 0;
y = 0;
w = "10 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "0.15 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
text = "\A3\Ui_f\data\IGUI\RscIngameUI\RscUnitInfo\stamina_ca.paa";
};
};
};

View File

@ -0,0 +1,10 @@
ace_advanced_fatigue
==========
An in depth stamina and fatigue simulation.
## Maintainers
The people responsible for merging changes to this component or answering potential questions.
- [BaerMitUmlaut](https://github.com/BaerMitUmlaut)

Binary file not shown.

View File

@ -0,0 +1,10 @@
PREP(addDutyFactor);
PREP(createStaminaBar);
PREP(getAnimDuty);
PREP(getMetabolicCosts);
PREP(handleEffects);
PREP(handlePlayerChanged);
PREP(handleStaminaBar);
PREP(mainLoop);
PREP(moduleSettings);
PREP(removeDutyFactor);

View File

@ -0,0 +1,56 @@
#include "script_component.hpp"
if (!hasInterface) exitWith {};
["ace_settingsInitialized", {
if (!GVAR(enabled)) exitWith {};
// - Post process effect ------------------------------------------------------
GVAR(ppeBlackout) = ppEffectCreate ["ColorCorrections", 4220];
GVAR(ppeBlackout) ppEffectEnable true;
GVAR(ppeBlackout) ppEffectForceInNVG true;
GVAR(ppeBlackout) ppEffectAdjust [1,1,0,[0,0,0,1],[0,0,0,0],[1,1,1,1],[10,10,0,0,0,0.1,0.5]];
GVAR(ppeBlackout) ppEffectCommit 0.4;
// - GVAR updating and initialization -----------------------------------------
["unit", FUNC(handlePlayerChanged), true] call CBA_fnc_addPlayerEventHandler;
private _fnc_showStaminaBar = {
private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull];
_staminaBarContainer ctrlShow ((!visibleMap) && {(vehicle ACE_player) == ACE_player});
};
["visibleMap", _fnc_showStaminaBar, true] call CBA_fnc_addPlayerEventHandler;
["vehicle", _fnc_showStaminaBar, true] call CBA_fnc_addPlayerEventHandler;
// - Duty factors -------------------------------------------------------------
if (["ACE_Medical"] call EFUNC(common,isModLoaded)) then {
[QEGVAR(medical,pain), { // 0->1.0, 0.5->1.05, 1->1.1
linearConversion [0, 1, (_this getVariable [QEGVAR(medical,pain), 0]), 1, 1.1, true];
}] call FUNC(addDutyFactor);
[QEGVAR(medical,bloodVolume), { // 100->1.0, 90->1.1, 80->1.2
linearConversion [100, 0, (_this getVariable [QEGVAR(medical,bloodVolume), 100]), 1, 2, true];
}] call FUNC(addDutyFactor);
};
if (["ACE_Dragging"] call EFUNC(common,isModLoaded)) then {
[QEGVAR(dragging,isCarrying), {
[1, 3] select (_this getVariable [QEGVAR(dragging,isCarrying), false]);
}] call FUNC(addDutyFactor);
};
if (["ACE_Weather"] call EFUNC(common,isModLoaded)) then {
[QEGVAR(weather,temperature), { // 35->1, 45->2
linearConversion [35, 45, (missionNamespace getVariable [QEGVAR(weather,currentTemperature), 25]), 1, 2, true];
}] call FUNC(addDutyFactor);
};
// - Add main loop at 1 second interval -------------------------------------------------------------
[FUNC(mainLoop), [], 1] call CBA_fnc_waitAndExecute;
}] call CBA_fnc_addEventHandler;
["ace_settingChanged", {
params ["_name", "_value"];
if (_name == QGVAR(enableStaminaBar) && {!_value}) then {
private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull];
_staminaBarContainer ctrlSetFade 1;
_staminaBarContainer ctrlCommit 0;
};
}] call CBA_fnc_addEventHandler;

View File

@ -0,0 +1,13 @@
#include "script_component.hpp"
ADDON = false;
PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;
//#include "initSettings.sqf"
GVAR(staminaBarWidth) = 10 * (((safezoneW / safezoneH) min 1.2) / 40);
GVAR(dutyList) = [[], []];
ADDON = true;

View File

@ -0,0 +1,23 @@
#include "script_component.hpp"
class CfgPatches {
class ADDON {
name = COMPONENT_NAME;
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
author = ECSTRING(common,ACETeam);
authors[] = {"BaerMitUmlaut"};
url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
#include "ACE_Settings.hpp"
#include "CfgEden.hpp"
#include "CfgEventHandlers.hpp"
#include "CfgMovesMaleSdr.hpp"
#include "CfgSounds.hpp"
#include "CfgVehicles.hpp"
#include "Dialog.hpp"

View File

@ -0,0 +1,18 @@
/*
* Author: BaerMitUmlaut
* Adds a duty factor.
*
* Arguments:
* 0: Factor ID <STRING>
* 1: Factor <NUMBER> or <CODE>
*
* Return Value:
* None
*/
#include "script_component.hpp"
params [["_id", "", [""]], ["_factor", 1, [0, {}]]];
if (_id == "" || {_factor isEqualTo 1}) exitWith {};
GVAR(dutyList) params ["_idList", "_factorList"];
_idList pushBack _id;
_factorList pushBack _factor,

View File

@ -0,0 +1,18 @@
/*
* Author: BaerMitUmlaut
* Creates the stamina bar.
*
* Arguments:
* 0: Display <DISPLAY>
*
* Return Value:
* None
*/
#include "script_component.hpp"
params ["_display"];
private _staminaBar = _display ctrlCreate [QGVAR(StaminaBarContainer), -1];
uiNamespace setVariable [QGVAR(staminaBarContainer), _staminaBar];
_staminaBar ctrlSetFade 1;
_staminaBar ctrlCommit 0;

View File

@ -0,0 +1,62 @@
/*
* Author: BaerMitUmlaut
* Calculates the duty of the current animation.
*
* Arguments:
* 0: Unit <OBJECT>
* 1: Animation name <STRING>
*
* Return Value:
* Duty <NUMBER>
*
* Example:
* [player, "AidlPercMstpSlowWrflDnon_G05"] call ace_advanced_fatigue_fnc_getAnimDuty
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit", "_animName"];
private _duty = 1;
private _animType = _animName select [1, 3];
GVAR(isSwimming) = false;
if (_animType in ["idl", "mov", "adj"]) then {
switch (_animName select [5, 3]) do {
case ("knl"): {
_duty = 1.5;
};
case ("pne"): {
_duty = 10;
};
default {
_duty = 1;
};
};
if (currentWeapon _unit != handgunWeapon _unit) then {
if (_animName select [13, 3] == "ras") then {
// low ready jog
_duty = _duty * 1.2;
if (_animName select [9, 3] == "tac") then {
// high ready jog/walk
_duty = _duty * 1.5;
};
};
};
} else {
// swimming and diving
switch (true) do {
case (_animType in ["swm", "ssw", "bsw"]): {
_duty = 6.5;
GVAR(isSwimming) = true;
};
case (_animType in ["dve", "sdv", "bdv"]): {
_duty = 2.5;
GVAR(isSwimming) = true;
};
};
};
_duty

View File

@ -0,0 +1,61 @@
/*
* Author: BaerMitUmlaut
* Calculates the current metabolic costs for a unit.
* Calculation is done according to the Pandolf/Wojtowicz formulas.
*
* Arguments:
* 0: Unit <OBJECT>
* 1: Speed <NUMBER>
*
* Return Value:
* Metabolic cost <NUMBER>
*
* Example:
* [player, 3.3] call ace_advanced_fatigue_fnc_getMetabolicCosts
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit", "_velocity"];
private _virtualLoad = 0;
{
_virtualLoad = _virtualLoad + (_x getVariable [QEGVAR(movement,vLoad), 0]);
} forEach [
_unit,
uniformContainer _unit,
vestContainer _unit,
backpackContainer _unit
];
private _gearMass = ((loadAbs _unit + _virtualLoad) * 0.1 / 2.2046) * GVAR(loadFactor);
private _terrainFactor = 1;
private _terrainAngle = asin (1 - ((surfaceNormal getPosASL _unit) select 2));
private _terrainGradient = (_terrainAngle / 45 min 1) * 5 * GVAR(terrainGradientFactor);
private _duty = GVAR(animDuty);
{
if (_x isEqualType 0) then {
_duty = _duty * _x;
} else {
_duty = _duty * (_unit call _x);
};
} forEach (GVAR(dutyList) select 1);
if (GVAR(isSwimming)) then {
_terrainGradient = 0;
};
if (_velocity > 2) then {
(
2.10 * SIM_BODYMASS
+ 4 * (SIM_BODYMASS + _gearMass) * ((_gearMass / SIM_BODYMASS) ^ 2)
+ _terrainFactor * (SIM_BODYMASS + _gearMass) * (0.90 * (_velocity ^ 2) + 0.66 * _velocity * _terrainGradient)
) * 0.23 * _duty
} else {
(
1.05 * SIM_BODYMASS
+ 4 * (SIM_BODYMASS + _gearMass) * ((_gearMass / SIM_BODYMASS) ^ 2)
+ _terrainFactor * (SIM_BODYMASS + _gearMass) * (1.15 * (_velocity ^ 2) + 0.66 * _velocity * _terrainGradient)
) * 0.23 * _duty
};

View File

@ -0,0 +1,101 @@
/*
* Author: BaerMitUmlaut
* Handles any audible, visual and physical effects of fatigue.
*
* Arguments:
* 0: Unit <OBJECT>
* 1: Fatigue <NUMBER>
* 2: Speed <NUMBER>
* 3: Overexhausted <BOOL>
*
* Return Value:
* None
*
* Example:
* [_player, 0.5, 3.3, true] call ace_advanced_fatigue_fnc_handleEffects
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit", "_fatigue", "_speed", "_overexhausted"];
#ifdef DEBUG_MODE_FULL
systemChat str _fatigue;
systemChat str vectorMagnitude velocity _unit;
#endif
// - Audible effects ----------------------------------------------------------
GVAR(lastBreath) = GVAR(lastBreath) + 1;
if (_fatigue > 0.4 && {GVAR(lastBreath) > (_fatigue * -10 + 9)} && {!underwater _unit}) then {
switch (true) do {
case (_fatigue < 0.6): {
playSound (QGVAR(breathLow) + str(floor random 6));
};
case (_fatigue < 0.85): {
playSound (QGVAR(breathMid) + str(floor random 6));
};
default {
playSound (QGVAR(breathMax) + str(floor random 6));
};
};
GVAR(lastBreath) = 0;
};
// - Visual effects -----------------------------------------------------------
GVAR(ppeBlackoutLast) = GVAR(ppeBlackoutLast) + 1;
if (GVAR(ppeBlackoutLast) == 1) then {
GVAR(ppeBlackout) ppEffectAdjust [1,1,0,[0,0,0,1],[0,0,0,0],[1,1,1,1],[10,10,0,0,0,0.1,0.5]];
GVAR(ppeBlackout) ppEffectCommit 1;
} else {
if (_fatigue > 0.85) then {
if (GVAR(ppeBlackoutLast) > (100 - _fatigue * 100) / 3) then {
GVAR(ppeBlackout) ppEffectAdjust [1,1,0,[0,0,0,1],[0,0,0,0],[1,1,1,1],[2,2,0,0,0,0.1,0.5]];
GVAR(ppeBlackout) ppEffectCommit 1;
GVAR(ppeBlackoutLast) = 0;
};
};
};
// - Physical effects ---------------------------------------------------------
if (GVAR(isSwimming)) exitWith {
_unit setAnimSpeedCoef linearConversion [0.7, 0.9, _fatigue, 1, 0.5, true];
if ((isSprintAllowed _unit) && {_fatigue > 0.7}) then {
[_unit, "blockSprint", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set);
} else {
if ((!isSprintAllowed _unit) && {_fatigue < 0.7}) then {
[_unit, "blockSprint", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set);
};
};
};
if ((getAnimSpeedCoef _unit) != 1) then {
_unit setAnimSpeedCoef 1;
};
if (_overexhausted) then {
[_unit, "forceWalk", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set);
} else {
if (isForcedWalk _unit && {_fatigue < 0.7}) then {
[_unit, "forceWalk", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set);
} else {
if ((isSprintAllowed _unit) && {_fatigue > 0.7}) then {
[_unit, "blockSprint", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set);
} else {
if ((!isSprintAllowed _unit) && {_fatigue < 0.6}) then {
[_unit, "blockSprint", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set);
};
};
};
};
switch (stance _unit) do {
case ("CROUCH"): {
_unit setCustomAimCoef (1.0 + _fatigue ^ 2 * 0.1);
};
case ("PRONE"): {
_unit setCustomAimCoef (1.0 + _fatigue ^ 2 * 2.0);
};
default {
_unit setCustomAimCoef (1.5 + _fatigue ^ 2 * 3.0);
};
};

View File

@ -0,0 +1,61 @@
/*
* Author: BaerMitUmlaut
* Handles switching units (once on init and afterwards via Zeus).
*
* Arguments:
* 0: New Unit <OBJECT>
* 1: Old Unit <OBJECT>
*
* Return Value:
* None
*/
#include "script_component.hpp"
params ["_newUnit", "_oldUnit"];
TRACE_2("unit changed",_newUnit,_oldUnit);
if !(isNull _oldUnit) then {
_oldUnit enableStamina true;
_oldUnit removeEventHandler ["AnimChanged", _oldUnit getVariable [QGVAR(animHandler), -1]];
_oldUnit setVariable [QGVAR(animHandler), nil];
TRACE_1("remove old",_oldUnit getVariable QGVAR(animHandler));
_oldUnit setVariable [QGVAR(ae1Reserve), GVAR(ae1Reserve)];
_oldUnit setVariable [QGVAR(ae2Reserve), GVAR(ae2Reserve)];
_oldUnit setVariable [QGVAR(anReserve), GVAR(anReserve)];
_oldUnit setVariable [QGVAR(anFatigue), GVAR(anFatigue)];
_oldUnit setVariable [QGVAR(muscleDamage), GVAR(muscleDamage)];
};
_newUnit enableStamina false;
// Don't add a new EH if the unit respawned
if (_newUnit getVariable [QGVAR(animHandler), -1] == -1) then {
private _animHandler = _newUnit addEventHandler ["AnimChanged", {
GVAR(animDuty) = _this call FUNC(getAnimDuty);
}];
TRACE_1("add new",_animHandler);
_newUnit setVariable [QGVAR(animHandler), _animHandler];
};
GVAR(ae1Reserve) = _newUnit getVariable [QGVAR(ae1Reserve), AE1_MAXRESERVE];
GVAR(ae2Reserve) = _newUnit getVariable [QGVAR(ae2Reserve), AE2_MAXRESERVE];
GVAR(anReserve) = _newUnit getVariable [QGVAR(anReserve), AN_MAXRESERVE];
GVAR(anFatigue) = _newUnit getVariable [QGVAR(anFatigue), 0];
GVAR(muscleDamage) = _newUnit getVariable [QGVAR(muscleDamage), 0];
// Clean variables for respawning units
{
_newUnit setVariable [_x, nil];
} forEach [QGVAR(ae1Reserve), QGVAR(ae2Reserve), QGVAR(anReserve), QGVAR(anFatigue), QGVAR(muscleDamage)];
GVAR(VO2Max) = 35 + 20 * (_newUnit getVariable [QGVAR(performanceFactor), GVAR(performanceFactor)]);
GVAR(VO2MaxPower) = GVAR(VO2Max) * SIM_BODYMASS * 0.23 * JOULES_PER_ML_O2 / 60;
GVAR(peakPower) = VO2MAX_STRENGTH * GVAR(VO2MaxPower);
GVAR(ae1PathwayPower) = GVAR(peakPower) / (13.3 + 16.7 + 113.3) * 13.3 * ANTPERCENT ^ 1.28 * 1.362;
GVAR(ae2PathwayPower) = GVAR(peakPower) / (13.3 + 16.7 + 113.3) * 16.7 * ANTPERCENT ^ 1.28 * 1.362;
GVAR(anPathwayPower) = GVAR(peakPower) - _ae1PathwayPower - _ae2PathwayPower;
GVAR(ppeBlackoutLast) = 100;
GVAR(lastBreath) = 0;
GVAR(animDuty) = [_newUnit, animationState _newUnit] call FUNC(getAnimDuty);

View File

@ -0,0 +1,44 @@
/*
* Author: BaerMitUmlaut
* Handles visual changes of the stamina bar.
*
* Arguments:
* Percent of stamina remaining <NUMBER>
*
* Return Value:
* None
*/
#include "script_component.hpp"
params ["_stamina"];
private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull];
// - Size ---------------------------------------------------------------------
// Shrink the container to cut off the image (other wise it would just get stretched)
private _posAndSize = ctrlPosition _staminaBarContainer;
_posAndSize set [2, _stamina * GVAR(staminaBarWidth)];
_staminaBarContainer ctrlSetPosition _posAndSize;
// - Opacity ------------------------------------------------------------------
if (_stamina >= 0.8) then {
_staminaBarContainer ctrlSetFade (0.9 + 0.1 * (_stamina - 0.8) / 0.2);
} else {
_staminaBarContainer ctrlSetFade (0.9 * _stamina / 0.8);
};
// - Color --------------------------------------------------------------------
// 1.0 - 0.8: White
// 0.6 - 0.4: Orange
// 0.4 - 0.2: Red
private _color = [1, 1, 1];
if (_stamina < 0.6) then {
if (_stamina < 0.4) then {
_color = [1, 0, 0] vectorAdd ([0, 0.65, 0] vectorMultiply ((_stamina - 0.2) / 0.2));
} else {
_color = [1, 0.65, 0] vectorAdd ([0, 0.35, 1] vectorMultiply ((_stamina - 0.4) / 0.2));
};
};
_color pushBack 1;
(_staminaBarContainer controlsGroupCtrl 10) ctrlSetTextColor _color;
_staminaBarContainer ctrlCommit 1;

View File

@ -0,0 +1,76 @@
/*
* Author: BaerMitUmlaut
* Main looping function that updates fatigue values.
*
* Arguments:
* None
*
* Return Value:
* None
*/
#include "script_component.hpp"
if (!alive ACE_player) exitWith { // Dead people don't breath, Will also handle null (Map intros)
[FUNC(mainLoop), [], 1] call CBA_fnc_waitAndExecute;
private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull];
_staminaBarContainer ctrlSetFade 1;
_staminaBarContainer ctrlCommit 1;
};
private _currentWork = REE;
private _currentSpeed = (vectorMagnitude (velocity ACE_player)) min 6;
// fix #4481. Diving to the ground is recorded as PRONE stance with running speed velocity. Cap maximum speed to fix.
if (stance ACE_player == "PRONE") then {
_currentSpeed = _currentSpeed min 1.5;
};
if ((vehicle ACE_player == ACE_player) && {_currentSpeed > 0.1} && {isTouchingGround ACE_player || {underwater ACE_player}}) then {
_currentWork = [ACE_player, _currentSpeed] call FUNC(getMetabolicCosts);
_currentWork = _currentWork max REE;
};
// Calculate muscle damage increase
// Note: Muscle damage recovery is ignored as it takes multiple days
GVAR(muscleDamage) = GVAR(muscleDamage) + (_currentWork / GVAR(peakPower)) ^ 3.2 * 0.00004;
private _muscleIntegrity = 1 - GVAR(muscleDamage);
// Calculate available power
private _ae1PathwayPowerFatigued = GVAR(ae1PathwayPower) * sqrt (GVAR(ae1Reserve) / AE1_MAXRESERVE) * OXYGEN * sqrt _muscleIntegrity;
private _ae2PathwayPowerFatigued = GVAR(ae2PathwayPower) * sqrt (GVAR(ae2Reserve) / AE2_MAXRESERVE) * OXYGEN * sqrt _muscleIntegrity;
// Calculate how much power is consumed from each reserve
private _ae1Power = _currentWork min _ae1PathwayPowerFatigued;
private _ae2Power = ((_currentWork - _ae1Power) max 0) min _ae2PathwayPowerFatigued;
private _anPower = (_currentWork - _ae1Power - _ae2Power) max 0;
// Remove ATP from reserves for current work
GVAR(ae1Reserve) = GVAR(ae1Reserve) - _ae1Power / WATTSPERATP;
GVAR(ae2Reserve) = GVAR(ae2Reserve) - _ae2Power / WATTSPERATP;
GVAR(anReserve) = GVAR(anReserve) - _anPower / WATTSPERATP;
// Increase anearobic fatigue
GVAR(anFatigue) = GVAR(anFatigue) + _anPower * (0.057 / GVAR(peakPower)) * 1.1;
// Aerobic ATP reserve recovery
GVAR(ae1Reserve) = ((GVAR(ae1Reserve) + OXYGEN * 6.60 * (GVAR(ae1PathwayPower) - _ae1Power) / GVAR(ae1PathwayPower) * GVAR(recoveryFactor)) min AE1_MAXRESERVE) max 0;
GVAR(ae2Reserve) = ((GVAR(ae2Reserve) + OXYGEN * 5.83 * (GVAR(ae2PathwayPower) - _ae2Power) / GVAR(ae2PathwayPower) * GVAR(recoveryFactor)) min AE2_MAXRESERVE) max 0;
// Anaerobic ATP reserver and fatigue recovery
GVAR(anReserve) = ((GVAR(anReserve)
+ (_ae1PathwayPowerFatigued + _ae2PathwayPowerFatigued - _ae1Power - _ae2Power) / GVAR(VO2MaxPower) * 56.7 * GVAR(anFatigue) ^ 2 * GVAR(recoveryFactor)
) min AN_MAXRESERVE) max 0;
GVAR(anFatigue) = ((GVAR(anFatigue)
- (_ae1PathwayPowerFatigued + _ae2PathwayPowerFatigued - _ae1Power - _ae2Power) * (0.057 / GVAR(peakPower)) * GVAR(anFatigue) ^ 2 * GVAR(recoveryFactor)
) min 1) max 0;
private _aeReservePercentage = (GVAR(ae1Reserve) / AE1_MAXRESERVE + GVAR(ae2Reserve) / AE2_MAXRESERVE) / 2;
private _anReservePercentage = GVAR(anReserve) / AN_MAXRESERVE;
private _perceivedFatigue = 1 - (_anReservePercentage min _aeReservePercentage);
[ACE_player, _perceivedFatigue, _currentSpeed, GVAR(anReserve) == 0] call FUNC(handleEffects);
if (GVAR(enableStaminaBar)) then {
[GVAR(anReserve) / AN_MAXRESERVE] call FUNC(handleStaminaBar);
};
[FUNC(mainLoop), [], 1] call CBA_fnc_waitAndExecute;

View File

@ -0,0 +1,18 @@
/*
* Author: BaerMitUmlaut
* Initializes the module settings.
*
* Arguments:
* 0: Module <OBJECT>
*
* Return Value:
* None
*/
#include "script_component.hpp"
params ["_logic"];
[_logic, QGVAR(enabled), "Enabled"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(performanceFactor), "PerformanceFactor"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(recoveryFactor), "RecoveryFactor"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(loadFactor), "LoadFactor"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(terrainGradientFactor), "TerrainGradientFactor"] call EFUNC(common,readSettingFromModule);

View File

@ -0,0 +1,20 @@
/*
* Author: BaerMitUmlaut
* Removes a duty factor.
*
* Arguments:
* 0: Factor ID <STRING>
*
* Return Value:
* None
*/
#include "script_component.hpp"
params [["_id", "", [""]]];
GVAR(dutyList) params ["_idList", "_factorList"];
private _index = _idList find _id;
if (_index != -1) then {
_idList deleteAt _index;
_factorList deleteAt _index;
};

View File

@ -0,0 +1 @@
#include "\z\ace\addons\advanced_fatigue\script_component.hpp"

View File

@ -0,0 +1,59 @@
[
QGVAR(enabled),
"CHECKBOX",
[LSTRING(Enabled), LSTRING(Enabled_Description)],
"ACE3 Advanced Fatigue",
true,
true
] call CBA_Settings_fnc_init;
[
QGVAR(enableStaminaBar),
"CHECKBOX",
[LSTRING(EnableStaminaBar), LSTRING(EnableStaminaBar_Description)],
"ACE3 Advanced Fatigue",
true,
true, {
if (!_this) then {
private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull];
_staminaBarContainer ctrlSetFade 1;
_staminaBarContainer ctrlCommit 0;
};
}
] call CBA_Settings_fnc_init;
[
QGVAR(performanceFactor),
"SLIDER",
[LSTRING(PerformanceFactor), LSTRING(PerformanceFactor_Description)],
"ACE3 Advanced Fatigue",
[0, 2, 1, 1],
true
] call CBA_Settings_fnc_init;
[
QGVAR(recoveryFactor),
"SLIDER",
[LSTRING(RecoveryFactor), LSTRING(RecoveryFactor_Description)],
"ACE3 Advanced Fatigue",
[0, 2, 1, 1],
true
] call CBA_Settings_fnc_init;
[
QGVAR(loadFactor),
"SLIDER",
[LSTRING(LoadFactor), LSTRING(LoadFactor_Description)],
"ACE3 Advanced Fatigue",
[0, 2, 1, 1],
true
] call CBA_Settings_fnc_init;
[
QGVAR(terrainGradientFactor),
"SLIDER",
[LSTRING(TerrainGradientFactor), LSTRING(TerrainGradientFactor_Description)],
"ACE3 Advanced Fatigue",
[0, 2, 1, 1],
true
] call CBA_Settings_fnc_init;

View File

@ -0,0 +1,29 @@
#define COMPONENT advanced_fatigue
#define COMPONENT_BEAUTIFIED Advanced Fatigue
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define ENABLE_PERFORMANCE_COUNTERS
#ifdef DEBUG_ENABLED_ADVANCED_FATIGUE
#define DEBUG_MODE_FULL
#endif
#ifdef DEBUG_SETTINGS_ADVANCED_FATIGUE
#define DEBUG_SETTINGS DEBUG_SETTINGS_ADVANCED_FATIGUE
#endif
#include "\z\ace\addons\main\script_macros.hpp"
#define ANTPERCENT 0.8
#define SIM_BODYMASS 70
#define JOULES_PER_ML_O2 20.9
#define VO2MAX_STRENGTH 4.1
#define REE 18.83 //((0.5617 * SIM_BODYMASS + 42.57) * 0.23)
#define OXYGEN 0.9
#define WATTSPERATP 7
#define AE1_MAXRESERVE 4000000
#define AE2_MAXRESERVE 84000
#define AN_MAXRESERVE 2300

View File

@ -0,0 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="Advanced_Fatigue">
<Key ID="STR_ACE_Advanced_Fatigue_PerformanceFactor">
<English>Performance Factor</English>
<German>Leistungsfaktor</German>
<Japanese>パフォーマンス要因</Japanese>
<Polish>Współczynnik wydolności</Polish>
<Korean>성능 요인</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_PerformanceFactor_Description">
<English>Influences the overall performance of all players with no custom factor. Higher means better.</English>
<German>Beinflusst die Leistungsfähigkeit aller Spieler ohne eigenen Leistungsfaktor. Ein höherer Wert bedeutet bessere Leistung.</German>
<Japanese>非カスタム要因をもつ全プレイヤーへ全体的に動作を影響させます。高いほど影響がでます。</Japanese>
<Polish>Wpływa na ogólną wydolność organizmu u wszystkich graczy bez ustawionego niestandardowego współczynnika. Więcej znaczy lepiej.</Polish>
<Korean>모든 성능이 임의로 설정된 값 없이 영향받습니다. 값이 클수록 더 나은 성능을 발휘합니다</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_PerformanceFactor_EdenDescription">
<English>Influences the overall performance of this unit. Higher means better.</English>
<German>Beinflusst die Leistungsfähigkeit dieser Einheit. Ein höherer Wert bedeutet bessere Leistung.</German>
<Japanese>非カスタム要因をもつ全プレイヤーへ全体的に動作を影響させます。高いほど影響がでます。</Japanese>
<Polish>Wpływa na ogólną wydolność tej jednostki. Więcej znaczy lepiej.</Polish>
<Korean>모든 성능이 이 단위로 영향을 받습니다. 값이 클수록 더 나은 성능을 발휘합니다</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_RecoveryFactor">
<English>Recovery Factor</English>
<German>Erholungsfaktor</German>
<Japanese>回復要因</Japanese>
<Polish>Współczynnik regeneracji</Polish>
<Korean>회복 요인</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_RecoveryFactor_Description">
<English>Changes how fast the player recovers when resting. Higher is faster.</English>
<German>Ändert, wie schnell ein Spieler Ausdauer regeneriert. Ein höherer Wert bedeutet eine schnellere Regeneration.</German>
<Japanese>休憩時は、プレイヤーが早く回復します。高いほど早くなります。</Japanese>
<Polish>Wpływa na czas regeneracji podczas postoju. Więcej znaczy szybciej.</Polish>
<Korean>얼마나 빨리 회복하는지를 바꿉니다. 값이 클수록 더 나은 성능을 발휘합니다</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_LoadFactor">
<English>Load Factor</English>
<German>Gewichtsfaktor</German>
<Japanese>負荷要因</Japanese>
<Polish>Współczynnik masy ekwipunku</Polish>
<Korean>부담 요인</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_LoadFactor_Description">
<English>Increases or decreases how much weight influences the players performance. Zero means equipment weight has no performance influence.</English>
<German>Erhöht oder verringert, wie viel Einfluss das Ausrüstungsgewicht auf die Leistung hat. Null heißt, dass es keinen Einfluss hat.</German>
<Japanese>重量によりプレイヤーの動作への影響下増加したり、低下します。装備を持っていない場合、影響はしません。</Japanese>
<Polish>Zmniejsza lub zwiększa wpływ ciężaru ekwipunku na wydolność gracza. Zero oznacza kompletny brak wpływu na wydolność.</Polish>
<Korean>플레이어가 무게에 따라 얼마나 영향받는지를 증가시키거나 감소시킵니다. 0의 경우 플레이어가 장비 무게에 영향받지 않습니다.</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_TerrainGradientFactor">
<English>Terrain Gradient Factor</English>
<German>Terrainsteigungsfaktor</German>
<Japanese>地形の勾配による要因</Japanese>
<Polish>Współczynnik terenu</Polish>
<Korean>지형 경사도 요인</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_TerrainGradientFactor_Description">
<English>Sets how much steep terrain increases stamina loss. Higher means higher stamina loss.</English>
<German>Beeinflusst, wie stark Steigungen den Ausdauerverbrauch erhöhen. Ein höherer Wert erhöht den Ausdauerverbrauch.</German>
<Japanese>地形によって影響する体力の消費量を決定します。高数値ではより体力を消費します。</Japanese>
<Polish>Wpływa na to w jakim stopniu stromy teren wpływa na utratę wytrzymałości. Więcej oznacza szybszą utratę wytrzymałości.</Polish>
<Korean>경사도에 따라 얼마나 피로해지는지를 정합니다. 값이 클수록 더 많은 피로를 유발합니다.</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_Enabled">
<English>Enabled</English>
<German>Aktiv</German>
<Japanese>有効化</Japanese>
<Polish>Włączone</Polish>
<Korean>활성화</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_Enabled_Description">
<English>Enables/disables Advanced Fatigue.</English>
<German>Aktiviert/deaktiviert Advanced Fatigue.</German>
<Japanese>アドバンスド疲労の有効化と無効化</Japanese>
<Polish>Włącza/wyłącza zaawansowaną wytrzymałość</Polish>
<Korean>고급 피로도 활성화/비활성화</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_EnableStaminaBar">
<English>Show stamina bar</English>
<German>Zeige Ausdauerleiste</German>
<Japanese>体力バーを表示</Japanese>
<Polish>Pokaż pasek wytrzymałości</Polish>
<Korean>피로도 막대</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_EnableStaminaBar_Description">
<English>Shows the stamina bar.</English>
<German>Zeigt die Ausdauerleiste an.</German>
<Japanese>体力バーを表示します。</Japanese>
<Polish>Pokazuje pasek wytrzymałości.</Polish>
<Korean>피로도 막대를 보여줍니다.</Korean>
</Key>
</Package>
</Project>

View File

@ -0,0 +1 @@
z\ace\addons\advanced_throwing

View File

@ -0,0 +1,40 @@
class ACE_Settings {
class GVAR(enabled) {
category = CSTRING(Category);
displayName = CSTRING(Enable_DisplayName);
description = CSTRING(Enable_Description);
typeName = "BOOL";
value = 1;
isClientSettable = 1;
};
class GVAR(showThrowArc) {
category = CSTRING(Category);
displayName = CSTRING(ShowThrowArc_DisplayName);
description = CSTRING(ShowThrowArc_Description);
typeName = "BOOL";
value = 1;
isClientSettable = 1;
};
class GVAR(showMouseControls) {
category = CSTRING(Category);
displayName = CSTRING(ShowMouseControls_DisplayName);
description = CSTRING(ShowMouseControls_Description);
typeName = "BOOL";
value = 1;
isClientSettable = 1;
};
class GVAR(enablePickUp) {
category = CSTRING(Category);
displayName = CSTRING(EnablePickUp_DisplayName);
description = CSTRING(EnablePickUp_Description);
typeName = "BOOL";
value = 1;
};
class GVAR(enablePickUpAttached) {
category = CSTRING(Category);
displayName = CSTRING(EnablePickUpAttached_DisplayName);
description = CSTRING(EnablePickUpAttached_Description);
typeName = "BOOL";
value = 1;
};
};

View File

@ -0,0 +1,17 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
};
};

View File

@ -0,0 +1,72 @@
class CBA_Extended_EventHandlers;
class CfgVehicles {
class ACE_Module;
class GVAR(Module): ACE_Module {
author = ECSTRING(common,ACETeam);
category = "ACE";
displayName = CSTRING(Category);
function = QFUNC(moduleInit);
scope = 2;
isGlobal = 1;
icon = QPATHTOF(UI\Icon_Module_AdvancedThrowing_ca.paa);
class Arguments {
class enabled {
displayName = CSTRING(Enable_DisplayName);
description = CSTRING(Enable_Description);
typeName = "BOOL";
defaultValue = 1;
};
class showThrowArc {
displayName = CSTRING(ShowThrowArc_DisplayName);
description = CSTRING(ShowThrowArc_Description);
typeName = "BOOL";
defaultValue = 1;
};
class showMouseControls {
displayName = CSTRING(ShowMouseControls_DisplayName);
description = CSTRING(ShowMouseControls_Description);
typeName = "BOOL";
defaultValue = 1;
};
class enablePickUp {
displayName = CSTRING(EnablePickUp_DisplayName);
description = CSTRING(EnablePickUp_Description);
typeName = "BOOL";
defaultValue = 1;
};
class enablePickUpAttached {
displayName = CSTRING(EnablePickUpAttached_DisplayName);
description = CSTRING(EnablePickUpAttached_Description);
typeName = "BOOL";
defaultValue = 1;
};
};
class ModuleDescription {
description = CSTRING(Module_Description);
};
};
class Items_base_F;
class GVAR(pickUpHelper): Items_base_F {
author = ECSTRING(common,ACETeam);
displayName = "ACE Throwable Pick Up Helper";
model = "\a3\weapons_f\dummyweapon.p3d";
scope = 1;
class ACE_Actions {
class GVAR(pickUp) {
displayName = CSTRING(PickUp);
condition = QUOTE([ARR_2(_player,true)] call FUNC(canPrepare));
statement = QUOTE(_this call FUNC(pickUp));
distance = 1.8; // Requires >1.7 to work when standing with weapon on back
icon = "\a3\ui_f\data\igui\cfg\actions\obsolete\ui_action_takemine_ca.paa";
};
};
class EventHandlers {
class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
};
};
};

View File

@ -1,7 +1,7 @@
ace_sitting
===============
ace_advanced_throwing
===================
The Sitting module introduces ability to sit on chairs.
Integrates advanced throwing by [Dslyecxi](https://github.com/dslyecxi).
## Maintainers

View File

@ -0,0 +1,17 @@
PREP(canPrepare);
PREP(canThrow);
PREP(drawArc);
PREP(drawThrowable);
PREP(exitThrowMode);
PREP(getMuzzle);
PREP(moduleInit);
PREP(onKeyDown);
PREP(onMouseButtonDown);
PREP(onMouseScroll);
PREP(pickUp);
PREP(prepare);
PREP(prime);
PREP(renderPickUpInteraction);
PREP(throw);
PREP(throwFiredXEH);
PREP(updateControlsHint);

View File

@ -0,0 +1,121 @@
#include "script_component.hpp"
// Fired XEH
[QGVAR(throwFiredXEH), FUNC(throwFiredXEH)] call CBA_fnc_addEventHandler;
// Exit on HC
if (!hasInterface) exitWith {};
// Ammo/Magazines look-up hash for correctness of initSpeed
GVAR(ammoMagLookup) = call CBA_fnc_createNamespace;
{
{
private _ammo = getText (configFile >> "CfgMagazines" >> _x >> "ammo");
if (_ammo != "") then { GVAR(ammoMagLookup) setVariable [_ammo, _x]; };
} count (getArray (configFile >> "CfgWeapons" >> "Throw" >> _x >> "magazines"));
nil
} count getArray (configFile >> "CfgWeapons" >> "Throw" >> "muzzles");
// Add keybinds
["ACE3 Weapons", QGVAR(prepare), localize LSTRING(Prepare), {
// Condition
if (!([ACE_player] call FUNC(canPrepare))) exitWith {false};
// Statement
[ACE_player] call FUNC(prepare);
true
}, {false}, [34, [true, false, false]], false] call CBA_fnc_addKeybind; // Shift + G
["ACE3 Weapons", QGVAR(dropModeToggle), localize LSTRING(DropModeToggle), {
// Condition
if !(ACE_player getVariable [QGVAR(inHand), false]) exitWith {false};
// Statement
private _currentDropMode = ACE_player getVariable [QGVAR(dropMode), false];
ACE_player setVariable [QGVAR(dropMode), !_currentDropMode];
ACE_player setVariable [QGVAR(throwType), THROW_TYPE_DEFAULT]; // Reset for consistency when opening
call FUNC(updateControlsHint); // Change controls hint for MMB
true
}, {false}, [34, [false, true, false]], false] call CBA_fnc_addKeybind; // Ctrl + G
["ACE3 Weapons", QGVAR(dropModeHold), localize LSTRING(DropModeHold), {
// Condition
if !(ACE_player getVariable [QGVAR(inHand), false]) exitWith {false};
// Statement
ACE_player setVariable [QGVAR(dropMode), true];
ACE_player setVariable [QGVAR(throwType), THROW_TYPE_DEFAULT]; // Reset for consistency when opening
call FUNC(updateControlsHint); // Change controls hint for MMB
true
}, {
// Condition
if !(ACE_player getVariable [QGVAR(inHand), false]) exitWith {false};
// Statement
ACE_player setVariable [QGVAR(dropMode), false];
call FUNC(updateControlsHint); // Change controls hint for MMB
true
}, [0, [false, false, false]], false] call CBA_fnc_addKeybind; // Empty
// Event handlers
["unit", {
[_this select 1, "Player changed"] call FUNC(exitThrowMode);
}] call CBA_fnc_addPlayerEventhandler;
["visibleMap", {
if (visibleMap && {ACE_player getVariable [QGVAR(inHand), false]}) then {
[ACE_player, "Opened Map"] call FUNC(exitThrowMode);
};
}] call CBA_fnc_addPlayerEventhandler;
["ace_interactMenuOpened", {
// Exit if advanced throwing is disabled (pick up only supports advanced throwing)
if (!GVAR(enabled)) exitWith {};
if (ACE_player getVariable [QGVAR(inHand), false]) then {
[ACE_player, "Interact menu opened"] call FUNC(exitThrowMode);
} else {
params ["_interactionType"];
// Ignore self-interaction menu, when in vehicle and when pick up is disabled
if (GVAR(enablePickUp) && {_interactionType == 0} && {vehicle ACE_player == ACE_player}) then {
// Show pick up actions on CfgAmmo's
call FUNC(renderPickUpInteraction);
};
};
}] call CBA_fnc_addEventHandler;
// Set last thrown time on Vanilla Throwing and Advanced Throwing
["ace_firedPlayer", {
if (_weapon == "Throw") then {
_unit setVariable [QGVAR(lastThrownTime), CBA_missionTime];
};
}] call CBA_fnc_addEventHandler;
// Display handlers
["KeyDown", {_this call FUNC(onKeyDown)}] call CBA_fnc_addDisplayHandler;
["MouseButtonDown", {_this call FUNC(onMouseButtonDown)}] call CBA_fnc_addDisplayHandler;
["MouseZChanged", {_this call FUNC(onMouseScroll)}] call CBA_fnc_addDisplayHandler;
#ifdef DRAW_THROW_PATH
GVAR(predictedPath) = [];
GVAR(flightPath) = [];
addMissionEventHandler ["Draw3D", { // Blue is predicted before throw, red is real
{
_x params ["", "_newTrajAGL"];
drawIcon3D ["\a3\ui_f\data\gui\cfg\hints\icon_text\group_1_ca.paa", [0,0,1,1], _newTrajAGL, 1, 1, 0, "", 2];
} forEach GVAR(predictedPath);
{
_newTrajAGL = _x;
drawIcon3D ["\a3\ui_f\data\gui\cfg\hints\icon_text\group_1_ca.paa", [1,0,0,1], _newTrajAGL, 1, 1, 0, "", 2];
} forEach GVAR(flightPath)
}];
#endif

View File

@ -2,8 +2,8 @@
ADDON = false;
PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
GVAR(initializedClasses) = [];
PREP_RECOMPILE_END;
ADDON = true;

View File

@ -6,9 +6,9 @@ class CfgPatches {
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_interaction"};
requiredAddons[] = {"ace_common", "ace_weaponselect"};
author = ECSTRING(common,ACETeam);
authors[] = {"Jonpas"};
authors[] = {"Jonpas", "Dslyecxi", "Zapat"};
url = ECSTRING(main,URL);
VERSION_CONFIG;
};
@ -16,9 +16,4 @@ class CfgPatches {
#include "ACE_Settings.hpp"
#include "CfgEventHandlers.hpp"
#include "CfgMoves.hpp"
#include "CfgVehicles.hpp"
class ACE_newEvents {
SetHandcuffed = QEGVAR(captives,setHandcuffed);
};

View File

@ -0,0 +1,37 @@
/*
* Author: Jonpas
* Checks if a throwable can be prepared.
*
* Arguments:
* 0: Unit <OBJECT>
* 1: Ignore Last Thrown Time <BOOL> (default: false)
*
* Return Value:
* Can Prepare <BOOL>
*
* Example:
* [unit] call ace_advanced_throwing_fnc_canPrepare
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit", ["_ignoreLastThrownTime", false]];
// Don't delay when picking up
if (_ignoreLastThrownTime) then {
_unit setVariable [QGVAR(lastThrownTime), -1];
};
GVAR(enabled) &&
#ifdef ALLOW_QUICK_THROW
{true} &&
#else
{_unit getVariable [QGVAR(lastThrownTime), CBA_missionTime - 3] < CBA_missionTime - 2} && // Prevent throwing in quick succession
#endif
{!(call EFUNC(common,isFeatureCameraActive))} &&
{!EGVAR(common,isReloading)} &&
{[_unit, objNull, ["isNotInside", "isNotSitting"/*, "isNotOnLadder"*/]] call EFUNC(common,canInteractWith)} && // Ladder needs positioning fixes on throw
{_unit call CBA_fnc_canUseWeapon} // Disable in non-FFV seats due to surface detection issues

View File

@ -0,0 +1,31 @@
/*
* Author: Jonpas
* Checks if a throwable can be thrown.
*
* Arguments:
* 0: Unit <OBJECT>
*
* Return Value:
* Can Throw <BOOL>
*
* Example:
* [unit] call ace_advanced_throwing_fnc_canThrow
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit"];
if !(_unit getVariable [QGVAR(inHand), false]) exitWith {false};
if (vehicle _unit != _unit) exitWith {
private _startPos = eyePos _unit;
private _aimLinePos = AGLToASL (positionCameraToWorld [0, 0, 1]);
private _intersections = lineIntersectsSurfaces [_startPos, _aimLinePos, _unit, objNull, false];
//TRACE_1("Intersections",_intersections);
(_intersections select {(vehicle _unit) in (_x select 3)}) isEqualTo []
};
true

View File

@ -0,0 +1,92 @@
/*
* Author: Zapat, Dslyecxi, Jonpas
* Draws throw arc.
*
* Arguments:
* None
*
* Return Value:
* Flight path (just for debug) <ARRAY>
*
* Example:
* call ace_advanced_throwing_fnc_drawArc
*
* Public: No
*/
#include "script_component.hpp"
// Disable drawing when intersecting with the vehicle
if !([ACE_player] call FUNC(canThrow)) exitWith {
drawIcon3D ["\a3\ui_f\data\igui\cfg\actions\obsolete\ui_action_cancel_manualfire_ca.paa", [1, 0, 0, 1], positionCameraToWorld [0, 0, 1], 1, 1, 0, "", 1];
};
private _activeThrowable = ACE_player getVariable [QGVAR(activeThrowable), objNull];
// Exit during switches and similar where object can be null for a very short amount of time
if (isNull _activeThrowable) exitWith {};
private _dropMode = ACE_player getVariable [QGVAR(dropMode), false];
private _throwType = ACE_player getVariable [QGVAR(throwType), THROW_TYPE_DEFAULT];
private _throwSpeed = ACE_player getVariable [QGVAR(throwSpeed), THROW_SPEED_DEFAULT];
private _direction = [THROWSTYLE_NORMAL_DIR, THROWSTYLE_HIGH_DIR] select (_throwType == "high" || {_dropMode});
private _velocity = [_throwSpeed, _throwSpeed / THROWSTYLE_HIGH_VEL_COEF / 1.25] select (_throwType == "high");
_velocity = [_velocity, THROWSTYLE_DROP_VEL] select _dropMode;
private _viewStart = AGLToASL (positionCameraToWorld [0, 0, 0]);
private _viewEnd = AGLToASL (positionCameraToWorld _direction);
private _initialVelocity = (vectorNormalized (_viewEnd vectorDiff _viewStart)) vectorMultiply (_velocity);
private _prevTrajASL = getPosASLVisual _activeThrowable;
private _pathData = [];
for "_i" from 0.05 to 1.45 step 0.1 do {
private _newTrajASL = (getPosASLVisual _activeThrowable) vectorAdd (_initialVelocity vectorMultiply _i) vectorAdd ([0, 0, -4.9] vectorMultiply (_i * _i));
private _cross = 0;
if (_newTrajASL distance (getPosASLVisual ACE_player) <= 20) then {
if ((ASLToATL _newTrajASL) select 2 <= 0) then {
_cross = 1; // 1: Distance Limit (Green)
} else {
// Even vanilla throwables go through glass, only "GEOM" LOD will stop it but that will also stop it when there is glass in a window
if (lineIntersects [_prevTrajASL, _newTrajASL]) then { // Checks the "VIEW" LOD
_cross = 2; // 2: View LOD Block (Red)
} else {
if (!((lineIntersectsSurfaces [_prevTrajASL, _newTrajASL, _activeThrowable, ACE_player, true, 1, "GEOM", "FIRE"]) isEqualTo [])) then {
_cross = 3; // 3: GEOM/FIRE LOD Block (Yellow) - pass a3 bulding glass, but blocked on some CUP glass
};
};
};
private _iDim = linearConversion [20, 0, _newTrajASL distance (getPosASLVisual ACE_player), 0.3, 2.5, true];
private _alpha = linearConversion [20, 0, _newTrajASL distance (getPosASLVisual ACE_player), 0.05, 0.7, true];
private _movePerc = linearConversion [3, 0, vectorMagnitude (velocity ACE_player), 0, 1, true];
_alpha = _alpha * _movePerc;
private _col = [ [1, 1, 1, _alpha], [0, 1, 0, _alpha], [1, 0, 0, _alpha], [1, 1, 0, _alpha] ] select _cross;
if (_cross != 2 && {lineIntersects [eyePos ACE_player, _newTrajASL]}) then {
_col set [3, 0.1]
};
_pathData pushBack [_col, ASLToAGL _newTrajASL, _iDim];
};
if (_cross > 0) exitWith {};
_prevTrajASL = _newTrajASL;
};
reverse _pathData;
// To get the sort order correct from our POV, particularly when using outlined dots
{
_x params ["_col", "_newTrajAGL", "_iDim"];
drawIcon3D ["\a3\ui_f\data\gui\cfg\hints\icon_text\group_1_ca.paa", _col, _newTrajAGL, _iDim, _iDim, 0, "", 2];
#ifdef DRAW_THROW_PATH
drawIcon3D ["", _col, _newTrajAGL, _iDim, _iDim, 0, str (ACE_player distance _newTrajAGL), 2, 0.05, "RobotoCondensed"];
#endif
} forEach _pathData;
_pathData

View File

@ -0,0 +1,149 @@
/*
* Author: Dslyecxi, Jonpas, SilentSpike
* Handles drawing the currently selected or cooked throwable.
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
* call ace_advanced_throwing_fnc_drawThrowable
*
* Public: No
*/
#include "script_component.hpp"
if (dialog || {!(ACE_player getVariable [QGVAR(inHand), false])} || {!([ACE_player, true] call FUNC(canPrepare))}) exitWith {
[ACE_player, "In dialog or no throwable in hand or cannot prepare throwable"] call FUNC(exitThrowMode);
};
private _primed = ACE_player getVariable [QGVAR(primed), false];
private _activeThrowable = ACE_player getVariable [QGVAR(activeThrowable), objNull];
// Exit if throwable died primed in hand
if (isNull _activeThrowable && {_primed}) exitWith {
[ACE_player, "Throwable died primed in hand"] call FUNC(exitThrowMode);
};
private _throwable = currentThrowable ACE_player;
// Inventory check
if (_throwable isEqualTo [] && {!_primed}) exitWith {
[ACE_player, "No valid throwables"] call FUNC(exitThrowMode);
};
private _throwableMag = _throwable param [0, "#none"];
// Get correct throw power for primed grenade
if (_primed) then {
private _ammoType = typeOf _activeThrowable;
_throwableMag = GVAR(ammoMagLookup) getVariable _ammoType;
if (isNil "_throwableMag") then {
// What we're trying to throw must not be a normal throwable because it is not in our lookup hash (e.g. 40mm smoke)
// Just use HandGrenade as it has an average initSpeed value
_throwableMag = "HandGrenade";
};
};
// Some throwables have different classname for magazine and ammo
// Primed magazine may be different, read speed before checking primed magazine!
private _throwSpeed = getNumber (configFile >> "CfgMagazines" >> _throwableMag >> "initSpeed");
// Reduce power of throw over shoulder and to sides
private _unitDirVisual = getDirVisual ACE_player;
private _cameraDir = getCameraViewDirection ACE_player;
_cameraDir = (_cameraDir select 0) atan2 (_cameraDir select 1);
private _phi = abs (_cameraDir - _unitDirVisual) % 360;
_phi = [_phi, 360 - _phi] select (_phi > 180);
private _power = linearConversion [0, 180, _phi - 30, 1, 0.3, true];
ACE_player setVariable [QGVAR(throwSpeed), _throwSpeed * _power];
#ifdef DEBUG_MODE_FULL
hintSilent format ["Heading: %1\nPower: %2\nSpeed: %3\nThrowMag: %4\nMuzzle: %5", _phi, _power, _throwSpeed * _power, _throwableMag, ACE_player getVariable [QGVAR(activeMuzzle), ""]];
#endif
private _throwableType = getText (configFile >> "CfgMagazines" >> _throwableMag >> "ammo");
if (!([ACE_player] call FUNC(canThrow)) && {!_primed}) exitWith {
if (!isNull _activeThrowable) then {
deleteVehicle _activeThrowable;
// Restore muzzle ammo (setAmmo 1 has no impact if no appliccable throwable in inventory)
ACE_player setAmmo [ACE_player getVariable [QGVAR(activeMuzzle), ""], 1];
};
};
if (isNull _activeThrowable || {(_throwableType != typeOf _activeThrowable) && {!_primed}}) then {
if (!isNull _activeThrowable) then {
deleteVehicle _activeThrowable;
// Restore muzzle ammo (setAmmo 1 has no impact if no appliccable throwable in inventory)
ACE_player setAmmo [ACE_player getVariable [QGVAR(activeMuzzle), ""], 1];
};
_activeThrowable = _throwableType createVehicleLocal [0, 0, 0];
_activeThrowable enableSimulation false;
ACE_player setVariable [QGVAR(activeThrowable), _activeThrowable];
// Set muzzle ammo to 0 to block vanilla throwing (can only be 0 or 1)
private _muzzle = _throwableMag call FUNC(getMuzzle);
ACE_player setAmmo [_muzzle, 0];
ACE_player setVariable [QGVAR(activeMuzzle), _muzzle];
};
// Exit in case of explosion in hand
if (isNull _activeThrowable) exitWith {
[ACE_player, "No active throwable (explosion in hand)"] call FUNC(exitThrowMode);
};
// Exit if locality changed (someone took the throwable from hand)
if (!local _activeThrowable && {ACE_player getVariable [QGVAR(localityChanged), true]}) exitWith {
[ACE_player, "Throwable locality changed"] call FUNC(exitThrowMode);
};
// Set position
private _posHeadRel = ACE_player selectionPosition "head";
private _leanCoef = (_posHeadRel select 0) - 0.15; // 0.15 counters the base offset
// Don't take leaning into account when weapon is lowered due to jiggling when walking side-ways (bandaid)
if (abs _leanCoef < 0.15 || {vehicle ACE_player != ACE_player} || {weaponLowered ACE_player}) then {
_leanCoef = 0;
};
private _posCameraWorld = AGLToASL (positionCameraToWorld [0, 0, 0]);
_posHeadRel = _posHeadRel vectorAdd [-0.03, 0.01, 0.15]; // Bring closer to eyePos value
private _posFin = AGLToASL (ACE_player modelToWorldVisual _posHeadRel);
private _throwType = ACE_player getVariable [QGVAR(throwType), THROW_TYPE_DEFAULT];
// Orient it nicely, point towards player
_activeThrowable setDir (_unitDirVisual + 90);
private _pitch = [-30, -90] select (_throwType == "high");
[_activeThrowable, _pitch, 0] call BIS_fnc_setPitchBank;
if (ACE_player getVariable [QGVAR(dropMode), false]) then {
_posFin = _posFin vectorAdd (AGLToASL (positionCameraToWorld [_leanCoef, 0, ACE_player getVariable [QGVAR(dropDistance), DROP_DISTANCE_DEFAULT]]));
// Even vanilla throwables go through glass, only "GEOM" LOD will stop it but that will also stop it when there is no glass in a window
if (lineIntersects [_posCameraWorld, _posFin vectorDiff _posCameraWorld]) then {
ACE_player setVariable [QGVAR(dropDistance), ((ACE_player getVariable [QGVAR(dropDistance), DROP_DISTANCE_DEFAULT]) - 0.1) max DROP_DISTANCE_DEFAULT];
};
} else {
private _xAdjustBonus = [0, -0.075] select (_throwType == "high");
private _yAdjustBonus = [0, 0.1] select (_throwType == "high");
private _cameraOffset = [_leanCoef, 0, 0.3] vectorAdd [-0.1, -0.15, -0.03] vectorAdd [_xAdjustBonus, _yAdjustBonus, 0];
_posFin = _posFin vectorAdd (AGLToASL (positionCameraToWorld _cameraOffset));
if (vehicle ACE_player != ACE_player) then {
// Counteract vehicle velocity including acceleration
private _vectorDiff = (velocity (vehicle ACE_player)) vectorMultiply (time - (ACE_player getVariable [QGVAR(lastTick), time]) + 0.01);
_posFin = _posFin vectorAdd _vectorDiff;
ACE_player setVariable [QGVAR(lastTick), time];
};
};
_activeThrowable setPosASL (_posFin vectorDiff _posCameraWorld);

View File

@ -0,0 +1,59 @@
/*
* Author: Dslyecxi, Jonpas
* Exits throw mode.
*
* Arguments:
* 0: Unit <OBJECT>
* 1: Reason <STRING>
*
* Return Value:
* None
*
* Example:
* [unit, "reason"] call ace_advanced_throwing_fnc_exitThrowMode
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit", "_reason"];
TRACE_2("params",_unit,_reason);
if !(_unit getVariable [QGVAR(inHand), false]) exitWith {};
#ifdef DEBUG_MODE_FULL
systemChat format ["Exit Throw Mode: %1", _reason];
#endif
private _activeThrowable = _unit getVariable [QGVAR(activeThrowable), objNull];
if !(_unit getVariable [QGVAR(primed), false]) then {
deleteVehicle _activeThrowable;
} else {
_unit setVariable [QGVAR(lastThrownTime), CBA_missionTime];
// Fix floating for throwables without proper physics (eg. IR Grenade)
_activeThrowable setVelocity [0, 0, -0.1];
};
// Restore muzzle ammo (setAmmo 1 has no impact if no appliccable throwable in inventory)
_unit setAmmo [_unit getVariable [QGVAR(activeMuzzle), ""], 1];
_unit setVariable [QGVAR(inHand), false];
_unit setVariable [QGVAR(primed), false];
_unit setVariable [QGVAR(activeThrowable), objNull];
_unit setVariable [QGVAR(activeMuzzle), ""];
_unit setVariable [QGVAR(throwType), THROW_TYPE_DEFAULT];
_unit setVariable [QGVAR(throwSpeed), THROW_SPEED_DEFAULT];
_unit setVariable [QGVAR(dropMode), false];
_unit setVariable [QGVAR(dropDistance), DROP_DISTANCE_DEFAULT];
// Remove controls hint (check if ever enabled is inside the function)
call EFUNC(interaction,hideMouseHint);
// Remove throw action
[_unit, "DefaultAction", _unit getVariable [QGVAR(throwAction), -1]] call EFUNC(common,removeActionEventHandler);
// Remove throw arc draw
if (!isNil QGVAR(draw3DHandle)) then {
removeMissionEventHandler ["Draw3D", GVAR(draw3DHandle)];
GVAR(draw3DHandle) = nil;
};

View File

@ -0,0 +1,25 @@
/*
* Author: PabstMirror
* Retrieve muzzle name from config.
*
* Arguments:
* 0: Magazine Classname <STRING>
*
* Return Value:
* None
*
* Example:
* "magazine" call ace_advanced_throwing_fnc_getMuzzle
*
* Public: No
*/
#include "script_component.hpp"
params ["_magazineClassname"];
_magazineClassname = toLower _magazineClassname;
private _throwMuzzles = getArray (configFile >> "CfgWeapons" >> "Throw" >> "muzzles");
_throwMuzzles = _throwMuzzles select {_magazineClassname in ((getArray (configFile >> "CfgWeapons" >> "Throw" >> _x >> "magazines")) apply {toLower _x})};
[_throwMuzzles select 0, ""] select (_throwMuzzles isEqualTo [])

View File

@ -0,0 +1,33 @@
/*
* Author: Jonpas
* Initializes the Advanced Throwing module.
*
* Arguments:
* 0: Logic <OBJECT>
* 1: Synchronized Units <ARRAY>
* 2: Module Activated <BOOL>
*
* Return Value:
* None
*
* Example:
* [logic, [unit1, unit2], true] call ace_advanced_throwing_fnc_moduleInit
*
* Public:
* No
*/
#include "script_component.hpp"
if (!isServer) exitWith {};
params ["_logic", "_units", "_activated"];
if (!_activated) exitWith {};
[_logic, QGVAR(enabled), "enabled"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(showThrowArc), "showThrowArc"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(showMouseControls), "showMouseControls"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(enablePickUp), "enablePickUp"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(enablePickUpAttached), "enablePickUpAttached"] call EFUNC(common,readSettingFromModule);
INFO_1("Advanced Throwing Module Initialized. Enabled: %1",GVAR(enabled));

View File

@ -0,0 +1,45 @@
/*
* Author: Dslyecxi, Jonpas
* Key down event.
*
* Arguments:
* 0: Control <CONTROL>
* 1: Key <NUMBER>
* 2: Shift <BOOL>
* 3: Ctrl <BOOL>
* 4: Alt <BOOL>
*
* Return Value:
* None
*
* Example:
* [control, 5, false, true, false] call ace_advanced_throwing_fnc_onKeyDown
*
* Public: No
*/
#include "script_component.hpp"
if !(ACE_player getVariable [QGVAR(inHand), false]) exitWith {false};
params ["", "_key", "_shift", "_ctrl", "_alt"];
// Exit if any of the action keys is pressed
{
if (_key in _x) exitWith {
[ACE_player, "Pressed a key that cycles us out of throwables"] call FUNC(exitThrowMode);
};
} forEach [
actionKeys "ReloadMagazine",
actionKeys "Handgun",
actionKeys "Binoculars",
actionKeys "SwitchWeapon",
actionKeys "Optics",
actionKeys "NextWeapon",
actionKeys "PrevWeapon",
actionKeys "OpticsTemp",
actionKeys "SwitchPrimary",
actionKeys "SwitchHandgun",
actionKeys "SwitchSecondary"
];
false

View File

@ -0,0 +1,46 @@
/*
* Author: Dslyecxi, Jonpas
* Mouse button down event.
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
* [] call ace_advanced_throwing_fnc_onMouseButtonDown
*
* Public: No
*/
#include "script_component.hpp"
if !(ACE_player getVariable [QGVAR(inHand), false]) exitWith {};
params ["", "_key"];
// Left mouse button
// "DefaultAction" doesn't get executed when in driver seat or in FFV seat with weapon lowered
if (_key == 0) exitWith {
if (!isNull (ACE_player getVariable [QGVAR(activeThrowable), objNull])) then {
// Look gets automatically pointed at weapon direction on first LMB press when in FFV seat, require weapon to be up if in vehicle
private _inVehicle = vehicle ACE_player != ACE_player;
if (!_inVehicle || {_inVehicle && {!weaponLowered ACE_player}}) then {
[ACE_player] call FUNC(throw);
};
};
};
private _primed = ACE_player getVariable [QGVAR(primed), false];
// Right mouse button
if (_key == 1) exitWith {
if (!_primed) then {
[ACE_player, "Storing throwable"] call FUNC(exitThrowMode);
};
};
// Middle mouse button
if (_key == 2 && {!_primed}) exitWith {
[ACE_player, true] call FUNC(prime);
};

View File

@ -0,0 +1,48 @@
/*
* Author: Dslyecxi, Jonpas
* Mouse scroll wheel changed event.
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
* [] call ace_advanced_throwing_fnc_onMouseScroll
*
* Public: No
*/
#include "script_component.hpp"
if !(ACE_player getVariable [QGVAR(inHand), false]) exitWith {};
params ["", "_amount"];
if (ACE_player getVariable [QGVAR(dropMode), false]) then {
private _dropDistance = ACE_player getVariable [QGVAR(dropDistance), DROP_DISTANCE_DEFAULT];
if (_amount < 0) then {
// Move closer
ACE_player setVariable [QGVAR(dropDistance), (_dropDistance - 0.1) max DROP_DISTANCE_DEFAULT];
} else {
// Move further
ACE_player setVariable [QGVAR(dropDistance), (_dropDistance + 0.1) min 1];
};
// Limit distance in vehicle
if (vehicle ACE_player != ACE_player) then {
ACE_player setVariable [QGVAR(dropDistance), (ACE_player getVariable [QGVAR(dropDistance), DROP_DISTANCE_DEFAULT]) min 0.5];
};
} else {
private _throwType = ACE_player getVariable [QGVAR(throwType), THROW_TYPE_DEFAULT];
if (_amount < 0) then {
if (_throwType == "high") then {
ACE_player setVariable [QGVAR(throwType), THROW_TYPE_DEFAULT];
};
} else {
if (_throwType == "normal") then {
ACE_player setVariable [QGVAR(throwType), "high"];
};
};
TRACE_2("Change Throw Type",_amount,ACE_player getVariable QGVAR(throwType));
};

View File

@ -0,0 +1,61 @@
/*
* Author: Jonpas
* Picks up a throwable from the ground.
*
* Arguments:
* 0: Pick Up Helper <OBJECT>
* 1: Unit <OBJECT>
*
* Return Value:
* None
*
* Example:
* [helper, player] call ace_advanced_throwing_fnc_pickUp
*
* Public: No
*/
#include "script_component.hpp"
params ["_helper", "_unit"];
TRACE_2("params",_helper,_unit);
private _activeThrowable = _helper getVariable [QGVAR(throwable), objNull];
if (isNull _activeThrowable) exitWith {TRACE_2("throwable is null",_helper,_activeThrowable);};
// Detach if attached (to vehicle for example or another player)
private _attachedTo = attachedTo _activeThrowable;
if (!isNull _attachedTo) then {
private _attachedList = _attachedTo getVariable [QEGVAR(attach,attached), []];
{
_x params ["_xObject"];
if (_activeThrowable == _xObject) exitWith {
TRACE_2("removing from ace_attach",_attachedTo,_attachedList);
_attachedList deleteAt _forEachIndex;
_attachedTo setVariable [QEGVAR(attach,attached), _attachedList, true];
};
} forEach _attachedList;
detach _activeThrowable;
};
// Change locality for manipulation (some commands require local object, such as setVelocity)
if (!local _activeThrowable) then {
["ace_setOwner", [_activeThrowable, CBA_clientID]] call CBA_fnc_serverEvent;
// Mark when it's safe to exit throw mode (locality change has delay)
_unit setVariable [QGVAR(localityChanged), false];
[{
// Becomes local or times out
local (_this select 0) || {(_this select 1) + 5 < CBA_missionTime}
}, {
(_this select 2) setVariable [QGVAR(localityChanged), true];
}, [_activeThrowable, CBA_missionTime, _unit]] call CBA_fnc_waitUntilAndExecute;
};
// Invoke listenable event
["ace_throwablePickedUp", [_activeThrowable, _unit, _attachedTo]] call CBA_fnc_localEvent;
_unit setVariable [QGVAR(primed), true];
_unit setVariable [QGVAR(activeThrowable), _activeThrowable];
_unit call FUNC(prepare);

View File

@ -0,0 +1,53 @@
/*
* Author: Dslyecxi, Jonpas
* Prepares throwable or selects the next.
*
* Arguments:
* 0: Unit <OBJECT>
*
* Return Value:
* None
*
* Example:
* [unit] call ace_advanced_throwing_fnc_prepare
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit"];
TRACE_1("params",_unit);
// Select next throwable if one already in hand
if (_unit getVariable [QGVAR(inHand), false]) exitWith {
TRACE_1("inHand",_unit);
if (!(_unit getVariable [QGVAR(primed), false])) then {
TRACE_1("not primed",_unit);
// Restore muzzle ammo (setAmmo 1 has no impact if no appliccable throwable in inventory)
// selectNextGrenade relies on muzzles array (setAmmo 0 removes the muzzle from the array and current can't be found, cycles between 0 and 1 muzzles)
ACE_player setAmmo [ACE_player getVariable [QGVAR(activeMuzzle), ""], 1];
[_unit] call EFUNC(weaponselect,selectNextGrenade);
};
};
// Try selecting next throwable if none currently selected
if (isNull (_unit getVariable [QGVAR(activeThrowable), objNull]) && {(currentThrowable _unit) isEqualTo []} && {!([_unit] call EFUNC(weaponselect,selectNextGrenade))}) exitWith {
TRACE_1("no throwables",_unit);
};
_unit setVariable [QGVAR(inHand), true];
// Add controls hint
call FUNC(updateControlsHint);
// Add throw action to suppress weapon firing (not possible to suppress mouseButtonDown event)
_unit setVariable [QGVAR(throwAction), [_unit, "DefaultAction", {true}, {true}] call EFUNC(common,addActionEventHandler)];
// Draw throwable and throw arc if enabled
GVAR(draw3DHandle) = addMissionEventHandler ["Draw3D", {
call FUNC(drawThrowable);
if (GVAR(showThrowArc)) then {
call FUNC(drawArc);
};
}];

View File

@ -0,0 +1,66 @@
/*
* Author: Dslyecxi, Jonpas
* Primes the throwable, creates global throwable vehicle and throws Fired XEH.
*
* Arguments:
* 0: Unit <OBJECT>
* 1: Show Hint <BOOL> (default: false)
*
* Return Value:
* None
*
* Example:
* [unit] call ace_advanced_throwing_fnc_prime
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit", ["_showHint", false]];
TRACE_2("params",_unit,_showHint);
_unit setVariable [QGVAR(primed), true];
// Remove item before cooking to prevent weaponselect showing more throwables than there actually are in inventory
private _throwableMag = (currentThrowable _unit) select 0;
_unit removeItem _throwableMag;
private _throwableType = getText (configFile >> "CfgMagazines" >> _throwableMag >> "ammo");
private _muzzle = _unit getVariable [QGVAR(activeMuzzle), ""];
// Set muzzle ammo to 0 to block vanilla throwing (can only be 0 or 1), removeItem above resets it
_unit setAmmo [_muzzle, 0];
// Handle weird scripted grenades (RHS) which could cause unexpected behaviour
private _nonInheritedCfg = configProperties [configFile >> "CfgAmmo" >> _throwableType, 'configName _x == QGVAR(replaceWith)', false];
if ((count _nonInheritedCfg) == 1) then {
_throwableType = getText (_nonInheritedCfg select 0);
};
// Create actual throwable globally
private _activeThrowableOld = _unit getVariable [QGVAR(activeThrowable), objNull];
private _activeThrowable = createVehicle [_throwableType, _activeThrowableOld, [], 0, "CAN_COLLIDE"];
_unit setVariable [QGVAR(activeThrowable), _activeThrowable];
deleteVehicle _activeThrowableOld;
// Throw Fired XEH
[QGVAR(throwFiredXEH), [
_unit, // unit
"Throw", // weapon
_muzzle, // muzzle
_muzzle, // mode
_throwableType, // ammo
_throwableMag, // magazine
_activeThrowable // projectile
]] call CBA_fnc_globalEvent;
if (_showHint) then {
// Show primed hint
private _displayNameShort = getText (configFile >> "CfgMagazines" >> _throwableMag >> "displayNameShort");
private _picture = getText (configFile >> "CfgMagazines" >> _throwableMag >> "picture");
[[_displayNameShort, localize LSTRING(Primed)] joinString " ", _picture] call EFUNC(common,displayTextPicture);
// Change controls hint for RMB
call FUNC(updateControlsHint);
};

View File

@ -0,0 +1,66 @@
/*
* Author: PabstMirror, Jonpas
* When interact_menu starts rendering (from "interact_keyDown" event).
* Add pick up helpers to all nearby throwables and keep setting them to their position (setVariable and attachTo does not work on CfgAmmo).
*
* Arguments:
* None
*
* Return Value:
* Nothing
*
* Example:
* call ace_advanced_throwing_fnc_renderPickUpInteraction
*
* Public: No
*/
#include "script_component.hpp"
[{
params ["_args", "_idPFH"];
_args params ["_setPosition", "_addedPickUpHelpers", "_throwablesHelped", "_nearThrowables"];
// isNull is necessarry to prevent rare error when ending mission with interact key down
if (EGVAR(interact_menu,keyDown) && {!isNull ACE_player}) then {
// Rescan when player moved >5 meters from last pos, nearObjects can be costly with a lot of objects around
if ((getPosASL ACE_player) distance _setPosition > 5) then {
// Grenades inherit from GrenadeHand, IR throwbles from IRStrobeBase, IR Chemlights are special snowflakes
// nearEntities does not see throwables
_nearThrowables = ACE_player nearObjects ["GrenadeHand", PICK_UP_DISTANCE];
_nearThrowables append (ACE_player nearObjects ["IRStrobeBase", PICK_UP_DISTANCE]);
_nearThrowables append (ACE_player nearObjects ["ACE_Chemlight_IR_Dummy", PICK_UP_DISTANCE]);
{
if (!(_x in _throwablesHelped) &&
{!(_x isKindOf "SmokeShellArty")} && {!(_x isKindOf "G_40mm_Smoke")} && // All smokes inherit from "GrenadeHand" >> "SmokeShell"
{GVAR(enablePickUpAttached) || {!GVAR(enablePickUpAttached) && {isNull (attachedTo _x)}}}
) then {
TRACE_2("Making PickUp Helper",_x,typeOf _x);
private _pickUpHelper = QGVAR(pickUpHelper) createVehicleLocal [0, 0, 0];
_pickUpHelper attachTo [_x, [0, 0, 0]];
_pickUpHelper setVariable [QGVAR(throwable), _x];
_addedPickUpHelpers pushBack _pickUpHelper;
_throwablesHelped pushBack _x;
};
nil
} count _nearThrowables;
_args set [0, getPosASL ACE_player];
_args set [3, _nearThrowables];
};
// Make sure helper is on correct location as it will not automatically move
// attachTo is not supported with CfgAmmo, it is only used to get location
{
// Only handling with attachTo works nicely
_x attachTo [_x getVariable [QGVAR(throwable), objNull], [0, 0, 0]];
nil
} count _addedPickUpHelpers;
} else {
TRACE_1("Cleaning Pick Up Helpers",count _addedPickUpHelpers);
{deleteVehicle _x} count _addedPickUpHelpers;
[_idPFH] call CBA_fnc_removePerFrameHandler;
};
}, 0, [(getPosASL ACE_player) vectorAdd [-100, 0, 0], [], [], []]] call CBA_fnc_addPerFrameHandler;

View File

@ -0,0 +1,83 @@
/*
* Author: Dslyecxi, Jonpas
* Throw selected throwable.
*
* Arguments:
* 0: Unit <OBJECT>
*
* Return Value:
* None
*
* Example:
* unit call ace_advanced_throwing_fnc_throw
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit"];
TRACE_1("params",_unit);
// Prime the throwable if it hasn't been cooking already
// Next to proper simulation this also has to happen before delay for orientation of the throwable to be set
if (!(_unit getVariable [QGVAR(primed), false])) then {
[_unit] call FUNC(prime);
};
[_unit, "ThrowGrenade"] call EFUNC(common,doGesture);
// Pass position to reset later because animation may change it in certain stances
[{
params ["_unit", "_activeThrowable", "_posThrown", "_throwType", "_throwSpeed", "_dropMode"];
TRACE_6("delayParams",_unit,_activeThrowable,_posThrown,_throwType,_throwSpeed,_dropMode);
// Reset position in case animation changed it
_activeThrowable setPosASL _posThrown;
// Launch actual throwable
private _direction = [THROWSTYLE_NORMAL_DIR, THROWSTYLE_HIGH_DIR] select (_throwType == "high" || {_dropMode});
private _velocity = [_throwSpeed, _throwSpeed / THROWSTYLE_HIGH_VEL_COEF / 1.25] select (_throwType == "high");
_velocity = [_velocity, THROWSTYLE_DROP_VEL] select _dropMode;
private _p2 = (eyePos _unit) vectorAdd (AGLToASL (positionCameraToWorld _direction)) vectorDiff (AGLToASL (positionCameraToWorld [0, 0, 0]));
private _p1 = AGLtoASL (_activeThrowable modelToWorldVisual [0, 0, 0]);
private _newVelocity = (_p1 vectorFromTo _p2) vectorMultiply _velocity;
// Adjust for throwing from inside vehicles, where we have a vehicle-based velocity that can't be compensated for by a human
if (vehicle _unit != _unit) then {
_newVelocity = _newVelocity vectorAdd (velocity (vehicle _unit));
};
// Drop if unit dies during throw process
if (alive _unit) then {
_activeThrowable setVelocity _newVelocity;
};
// Invoke listenable event
["ace_throwableThrown", [_unit, _activeThrowable]] call CBA_fnc_localEvent;
}, [
_unit,
_unit getVariable [QGVAR(activeThrowable), objNull],
getPosASLVisual (_unit getVariable [QGVAR(activeThrowable), objNull]),
_unit getVariable [QGVAR(throwType), THROW_TYPE_DEFAULT],
_unit getVariable [QGVAR(throwSpeed), THROW_SPEED_DEFAULT],
_unit getVariable [QGVAR(dropMode), false]
], 0.3] call CBA_fnc_waitAndExecute;
#ifdef DRAW_THROW_PATH
GVAR(predictedPath) = call FUNC(drawArc); // save the current throw arc
GVAR(flightPath) = [];
[_unit getVariable QGVAR(activeThrowable)] spawn {
params ["_grenade"];
while {!isNull _grenade} do {
GVAR(flightPath) pushBack ASLtoAGL getPosASL _grenade;
sleep 0.05;
};
};
#endif
// Stop rendering arc and doing rendering magic while throw is happening
[_unit, "Completed a throw fully"] call FUNC(exitThrowMode);

View File

@ -0,0 +1,28 @@
/*
* Author: CBA Team
* Throws Fired XEH.
*
* Arguments:
* 0: unit - Object the event handler is assigned to <OBJECT>
* 1: weapon - Fired weapon <STRING>
* 2: muzzle - Muzzle that was used <STRING>
* 3: mode - Current mode of the fired weapon <STRING>
* 4: ammo - Ammo used <STRING>
* 5: magazine - magazine name which was used <STRING>
* 6: projectile - Object of the projectile that was shot <OBJECT>
*
* Return Value:
* None
*
* Example:
* [unit, "weapon", "muzle", "mode", "ammo", "magazine", projectile] call ace_advanced_throwing_fnc_throwFiredXEH
*
* Public: No
*/
#include "script_component.hpp"
TRACE_1("Fired",_this);
{
_this call _x;
} forEach ((_this select 0) getVariable "cba_xeh_fired");

View File

@ -0,0 +1,32 @@
/*
* Author: Jonpas
* Updates controls hints based on current state.
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
* call ace_advanced_throwing_fnc_updateControlsHint
*
* Public: No
*/
#include "script_component.hpp"
if (!GVAR(showMouseControls)) exitWith {};
private _primed = ACE_player getVariable [QGVAR(primed), false];
private _mmb = [localize LSTRING(ChangeMode), localize LSTRING(Extend)] select (ACE_player getVariable [QGVAR(dropMode), false]);
if (!_primed) then {
_mmb = [_mmb, localize LSTRING(Cook)] joinString " / ";
};
[
localize LSTRING(Throw),
[localize ELSTRING(common,Cancel), ""] select _primed,
_mmb
] call EFUNC(interaction,showMouseHint);

View File

@ -0,0 +1 @@
#include "\z\ace\addons\advanced_throwing\script_component.hpp"

View File

@ -0,0 +1,31 @@
#define COMPONENT advanced_throwing
#define COMPONENT_BEAUTIFIED Advanced Throwing
#include "\z\ace\addons\main\script_mod.hpp"
// #define DRAW_THROW_PATH
// #define ALLOW_QUICK_THROW
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define ENABLE_PERFORMANCE_COUNTERS
#ifdef DEBUG_ENABLED_ADVANCED_THROWING
#define DEBUG_MODE_FULL
#endif
#ifdef DEBUG_SETTINGS_ADVANCED_THROWING
#define DEBUG_SETTINGS DEBUG_SETTINGS_ADVANCED_THROWING
#endif
#include "\z\ace\addons\main\script_macros.hpp"
#define THROWSTYLE_NORMAL_DIR [0, 70, 500]
#define THROWSTYLE_HIGH_DIR [0, 200, 500]
#define THROWSTYLE_HIGH_VEL_COEF 2
#define THROWSTYLE_DROP_VEL 2
#define THROW_TYPE_DEFAULT "normal"
#define THROW_SPEED_DEFAULT 18
#define DROP_DISTANCE_DEFAULT 0.2
#define PICK_UP_DISTANCE 10

View File

@ -0,0 +1,173 @@
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="Advanced_Throwing">
<Key ID="STR_ACE_Advanced_Throwing_Category">
<English>Advanced Throwing</English>
<Russian>Улучшенный бросок гранат</Russian>
<Japanese>アドバンスド投てき</Japanese>
<Polish>Zaawansowane rzucanie</Polish>
<German>Erweitertes Wurfsystem</German>
<Korean>고급 투척</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_Module_Description">
<English>Allows changing advanced throwing behaviour.</English>
<Russian>Позволяет настраивать поведение улучшенного броска гранат.</Russian>
<Japanese>アドバンスド投てきの挙動変更を許可します。</Japanese>
<Polish>Zezwala na zmianę zachowania zaawansowanego trybu rzucania.</Polish>
<German>Erlaubt es, das Verhalten des erweiterten Wurfsystems zu ändern.</German>
<Korean>고급 투척 행위를 허가합니다</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_Enable_DisplayName">
<English>Enable Advanced Throwing</English>
<Russian>Включить улучшенный бросок</Russian>
<Japanese>アドバンスド投てきを有効化</Japanese>
<Polish>Aktywuj zaawansowane rzucanie</Polish>
<German>Aktiviere erweitertes Wurfsystem</German>
<Korean>고급 투척 활성화 </Korean>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_Enable_Description">
<English>Enables advanced throwing system.</English>
<Russian>Включает систему улучшенного броска.</Russian>
<Japanese>アドバンスド投てきシステムを有効化</Japanese>
<Polish>Aktywuje system zaawansowanego rzucania.</Polish>
<German>Aktiviert das erweiterte Wurfsystem.</German>
<Korean>고급 투척을 활성화 합니다</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_ShowThrowArc_DisplayName">
<English>Show Throw Arc</English>
<Russian>Показать траекторию броска</Russian>
<Japanese>軌道を表示</Japanese>
<Polish>Pokaż trasę lotu</Polish>
<German>Zeige Wurfbogen</German>
<Korean>투척 궤적 표시</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_ShowThrowArc_Description">
<English>Enables visualization of the throw arc (where throwable will fly).</English>
<Russian>Включает визуализацию траектории броска (как полетит граната).</Russian>
<Japanese>投てき物の予測軌道の表示を有効化します。</Japanese>
<Polish>Wyświetla wizualizację trasy przelotu granatu.</Polish>
<German>Aktiviert die Visualisierung des Wurfbogens (wohin das Objekt geworfen werden wird).</German>
<Korean>투척 궤도를 시각화 합니다(투척물이 어디로 갈지)</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_ShowMouseControls_DisplayName">
<English>Show Throwing Mouse Controls</English>
<Russian>Показывать управление мышью</Russian>
<Japanese>投てきのマウス操作を表示</Japanese>
<Polish>Pokaż podpowiedzi sterowania myszą</Polish>
<German>Zeige Maussteuerung beim Werfen</German>
<Korean>마우스 조작 표시</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_ShowMouseControls_Description">
<English>Enables visual cues for mouse controls when throwable is prepared.</English>
<Russian>Включает отображение подсказок по управлению мышью, когда граната подготовлена.</Russian>
<Japanese>投てき物を投げるとき、マウス操作の説明表示を有効化します。</Japanese>
<Polish>Wyświetla podpowiedzi sterowania myszą kiedy obiekt miotany jest w ręku.</Polish>
<German>Aktiviert visuelle Hinweise zur Maussteuerung, wenn ein Objekt zum Werfen vorbereitet wird.</German>
<Korean>투척물을 준비시 마우스 조작을 시각화해서 보여줍니다</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_EnablePickUp_DisplayName">
<English>Enable Throwables Pick Up</English>
<Russian>Включить подбор гранат</Russian>
<Japanese>投てき物の拾い上げを有効化</Japanese>
<Polish>Zezwól na podnoszenie obiektów miotanych</Polish>
<German>Aktiviere Aufheben von Wurfobjekten</German>
<Korean>투척물 줍기 활성화</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_EnablePickUp_Description">
<English>Enables ability to pick up throwables from the ground.</English>
<Russian>Включает возможность подбирать гранаты с земли.</Russian>
<Japanese>地面に落ちている投てき物の拾い上げ動作を有効化します。</Japanese>
<Polish>Umożliwia podnoszenie obiektów miotanych z ziemi.</Polish>
<German>Aktiviert die Möglichkeit, geworfene Objekte wieder vom Boden aufzuheben.</German>
<Korean>땅에 떨어진 투척물을 주울 수 있게 해줍니다.</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_EnablePickUpAttached_DisplayName">
<English>Enable Attached Throwables Pick Up</English>
<Russian>Включить подбор прикрепленных гранат</Russian>
<Japanese>拾い上げた投てき物の取り付けを有効化</Japanese>
<Polish>Zezwól na podnoszenie przyczepionych obiektów miotanych</Polish>
<German>Aktiviere erneute Aufnahme befestigter Wurfobjekte</German>
<Korean>부착 투척물 줍기 활성화</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_EnablePickUpAttached_Description">
<English>Enables ability to pick up throwables from attached objects.</English>
<Russian>Включает возможность подбирать гранаты, прикрепленные к объектам.</Russian>
<Japanese>オブジェクトに取り付けられていた投てき物を拾い上げられるようにします。</Japanese>
<Polish>Umożliwia podnoszenie obiektów miotanych przyczepionych do innych obiektów.</Polish>
<German>Aktiviert die Möglichkeit, befestigte Wurfobjekte erneut aufzunehmen.</German>
<Korean>부착된 투척물을 주울 수 있게 해줍니다.</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_Prepare">
<English>Prepare/Change Throwable</English>
<Russian>Подготовить/заменить гранату</Russian>
<Japanese>機能の起動/変更</Japanese>
<Polish>Przygotuj/zmień ob. miotany</Polish>
<German>Wurfobjekt vorbereiten/wechseln</German>
<Korean>투척물 준비/변경</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_dropModeHold">
<English>Throwable Drop Mode (Hold)</English>
<Russian>Режим броска гранаты (удерживать)</Russian>
<Japanese>投てきモード (押しっぱ)</Japanese>
<Polish>Tryb upuszczania ob. miotanego (przytrzymaj)</Polish>
<German>Wurfobjekt Fallmodus (halten)</German>
<Korean>투척물 떨어뜨리기 모드(꾹눌러서)</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_DropModeToggle">
<English>Throwable Drop Mode (Toggle)</English>
<Russian>Режим броска гранаты (переключить)</Russian>
<Japanese>投てきモード (トグル)</Japanese>
<Polish>Tryb upuszczania ob. miotanego (przełącz)</Polish>
<German>Wurfobjekt Fallmodus (umschalten)</German>
<Korean>투척물 떨어뜨리기 모드(토글)</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_Primed">
<English>Primed</English>
<Russian>Подготовлена</Russian>
<Japanese>起動した</Japanese>
<Polish>Odbezpieczony</Polish>
<German>Scharf gemacht</German>
<Korean>뇌관 작동</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_Throw">
<English>Throw</English>
<Russian>Бросить</Russian>
<Japanese>投げる</Japanese>
<Polish>Rzuć</Polish>
<German>Werfen</German>
<Korean>던지기</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_ChangeMode">
<English>(Scroll) Change Mode</English>
<Russian>(Скролл) Изменить режим</Russian>
<Japanese>(スクロール) モード変更</Japanese>
<Polish>(Kółko m.) zmień tryb</Polish>
<German>(Scrollen) Modus wechseln</German>
<Korean>(마우스 휠) 모드 변경</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_Extend">
<English>(Scroll) Extend</English>
<Russian>(Скролл) Увеличить</Russian>
<Japanese>(スクロール) 遠くに</Japanese>
<Polish>(Kółko m.) przedłuż</Polish>
<German>(Scrollen) Erweitern</German>
<Korean>(마우스 휠) 연장</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_Cook">
<English>(Click) Cook</English>
<Russian>(Клик) Подготовить</Russian>
<Japanese>(クリック) 起爆</Japanese>
<Polish>(Kliknięcie) Odbezpiecz</Polish>
<German>(Klicken) Abkochen</German>
<Korean>(클릭) 예열</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_PickUp">
<English>Pick Up</English>
<Russian>Подобрать</Russian>
<Japanese>拾い上げる</Japanese>
<Polish>Podnieś</Polish>
<German>Aufheben</German>
<Korean>줍기</Korean>
</Key>
</Package>
</Project>

View File

@ -2,8 +2,6 @@
// weapon config changes, by commy2
/* documentation:
aiDispersionCoefX = 1.0 Dispersion multiplier for AI units (axis X - left to right).
aiDispersionCoefY = 1.0 Dispersion multiplier for AI units (axis Y - top-down).
aiRateOfFire = 5.0 Delay between shots at given aiRateOfFireDistance.
aiRateOfFireDistance = 500 At shorter distance delay (aiRateOfFire) goes linearly to zero.
*/
@ -15,19 +13,12 @@ class Mode_FullAuto;
class CfgWeapons {
// rifles
class RifleCore;
class Rifle: RifleCore {
aiDispersionCoefX = 6;
aiDispersionCoefY = 6;
};
class Rifle_Base_F: Rifle {};
class Rifle_Long_Base_F: Rifle_Base_F {};
class Rifle_Base_F;
class Rifle_Short_Base_F;
class Rifle_Long_Base_F;
// MX
class arifle_MX_Base_F: Rifle_Base_F {
aiDispersionCoefY = 18.0;
aiDispersionCoefX = 12.0;
modes[] += {"ACE_Burst_far"};
class Single: Mode_SemiAuto {
@ -70,8 +61,6 @@ class CfgWeapons {
// MX carbine
class arifle_MXC_F: arifle_MX_Base_F {
aiDispersionCoefY = 18.0;
aiDispersionCoefX = 12.0;
class Single: Single {
minRange = 120; // 2;
@ -143,8 +132,6 @@ class CfgWeapons {
// MX machine gun
class arifle_MX_SW_F: arifle_MX_Base_F {
aiDispersionCoefY = 24.0;
aiDispersionCoefX = 21.0;
// Shit is still broken
//modes[] += {"ACE_Burst_far"};
modes[] = {"Single","manual","close","short","medium","far_optic1","far_optic2","ACE_Burst_far"};
@ -180,8 +167,6 @@ class CfgWeapons {
// Katiba
class arifle_Katiba_Base_F: Rifle_Base_F {
aiDispersionCoefY = 18.0;
aiDispersionCoefX = 12.0;
modes[] += {"ACE_Burst_far"};
class Single: Mode_SemiAuto {
@ -224,8 +209,6 @@ class CfgWeapons {
// Katiba carbine
class arifle_Katiba_C_F: arifle_Katiba_Base_F {
aiDispersionCoefY = 18.0;
aiDispersionCoefX = 12.0;
class Single: Single {
minRange = 120; // 2;
@ -268,8 +251,6 @@ class CfgWeapons {
// F2002
class mk20_base_F: Rifle_Base_F {
aiDispersionCoefY = 18.0;
aiDispersionCoefX = 12.0;
modes[] += {"ACE_Burst_far"};
class Single: Mode_SemiAuto {
@ -316,8 +297,6 @@ class CfgWeapons {
// F2002 carbine
class arifle_Mk20C_F: mk20_base_F {
aiDispersionCoefY = 18.0;
aiDispersionCoefX = 12.0;
class Single: Single {
minRange = 120; // 2;
@ -358,8 +337,6 @@ class CfgWeapons {
// TAR-20
class Tavor_base_F: Rifle_Base_F {
aiDispersionCoefY = 18.0;
aiDispersionCoefX = 12.0;
modes[] += {"ACE_Burst_far"};
class Single: Mode_SemiAuto {
@ -407,8 +384,6 @@ class CfgWeapons {
// TAR-21
class arifle_TRG21_F: Tavor_base_F {
aiDispersionCoefY = 18.0;
aiDispersionCoefX = 12.0;
class Single: Single {
minRange = 120; // 2;
@ -457,8 +432,6 @@ class CfgWeapons {
// SDAR
class SDAR_base_F: Rifle_Base_F {
aiDispersionCoefY = 28.0;
aiDispersionCoefX = 20.0;
class Single: Mode_SemiAuto {
minRange = 10; //2;
@ -470,9 +443,7 @@ class CfgWeapons {
};
// PD2000
class pdw2000_base_F: Rifle_Base_F {
aiDispersionCoefY = 18.0;
aiDispersionCoefX = 12.0;
class pdw2000_base_F: Rifle_Short_Base_F {
class Single: Mode_SemiAuto {
minRange = 100; //2;
@ -484,9 +455,7 @@ class CfgWeapons {
};
// Vector
class SMG_01_Base: Rifle_Base_F {
aiDispersionCoefY = 18.0;
aiDispersionCoefX = 12.0;
class SMG_01_Base: Rifle_Short_Base_F {
class Single: Mode_SemiAuto {
minRange = 50; //2;
@ -498,9 +467,7 @@ class CfgWeapons {
};
// Scorpion EVO
class SMG_02_base_F: Rifle_Base_F {
aiDispersionCoefY = 18.0;
aiDispersionCoefX = 12.0;
class SMG_02_base_F: Rifle_Short_Base_F {
class Single: Mode_SemiAuto {
minRange = 50; //2;
@ -515,8 +482,6 @@ class CfgWeapons {
// Stoner
class LMG_Mk200_F: Rifle_Long_Base_F {
aiDispersionCoefY = 24.0;
aiDispersionCoefX = 21.0;
modes[] += {"ACE_Burst_far"};
class medium;
@ -544,8 +509,6 @@ class CfgWeapons {
// Negev
class LMG_Zafir_F: Rifle_Long_Base_F {
aiDispersionCoefY = 23.0;
aiDispersionCoefX = 19.0;
modes[] += {"ACE_Burst_far"};
class Single: Mode_SemiAuto {
@ -719,8 +682,6 @@ class CfgWeapons {
// marksmen medium mg
class MMG_01_base_F: Rifle_Long_Base_F {
aiDispersionCoefY = 25.0;
aiDispersionCoefX = 20.0;
modes[] += {"ACE_Burst_far"};
class manual;
@ -745,8 +706,6 @@ class CfgWeapons {
};
class MMG_02_base_F: Rifle_Long_Base_F {
aiDispersionCoefY = 20.0;
aiDispersionCoefX = 15.0;
modes[] += {"ACE_Burst_far"};
class manual;

View File

@ -4,7 +4,6 @@
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define CBA_DEBUG_SYNCHRONOUS
// #define ENABLE_PERFORMANCE_COUNTERS
#ifdef DEBUG_ENABLED_AI

View File

@ -1,4 +1,3 @@
class CfgAmmo {
class BulletBase;
class B_20mm : BulletBase {
@ -11,11 +10,11 @@ class CfgAmmo {
explosive = 1.8;
tracersEvery = 3;
tracerEndTime = 3.5;
CraterEffects = "ExploAmmoCrater";
explosionEffects = "ExploAmmoExplosion";
model = "\A3\Weapons_f\Data\bullettracer\tracer_red";
};
class ACE_20mm_HE : B_20mm {};
class ACE_20mm_AP : B_20mm {
hit = 50;
@ -57,7 +56,6 @@ class CfgAmmo {
submunitionAmmo = "ACE_Gatling_30mm_HE_Plane_CAS_01_Sub";
submunitionConeType[] = {"custom", {{0,0}, {0,0}, {0,0}} };
};
class ACE_Gatling_30mm_HE_Plane_CAS_01_Sub: Gatling_30mm_HE_Plane_CAS_01_F {};
// adjust damage and splash damage, closer to bluefor gatling with same caliber

View File

@ -1,4 +1,3 @@
class CfgMagazines {
// shoot helper object to tripple rof
class VehicleMagazine;

View File

@ -1,4 +1,3 @@
class CfgVehicles {
class All {
class Turrets;
@ -11,7 +10,6 @@ class CfgVehicles {
};
class Air: AllVehicles {};
class Helicopter: Air {
class Turrets {
class MainTurret;
@ -19,13 +17,11 @@ class CfgVehicles {
};
class Plane: Air {};
class ParachuteBase: Helicopter {
class Turrets;
};
class UAV: Plane {};
class Helicopter_Base_F: Helicopter {
class Turrets: Turrets {
class CopilotTurret;
@ -54,7 +50,6 @@ class CfgVehicles {
};
class Heli_Light_01_unarmed_base_F: Heli_Light_01_base_F {};
class B_Heli_Light_01_F: Heli_Light_01_unarmed_base_F {
/*class Turrets: Turrets {
class CopilotTurret: CopilotTurret {};
@ -74,12 +69,11 @@ class CfgVehicles {
};
class B_Heli_Light_01_armed_F: Heli_Light_01_armed_base_F {};
class Heli_Light_02_base_F: Helicopter_Base_H {
driverCanEject = 1;
lockDetectionSystem = 12;
incomingMissileDetectionSystem = 16;
magazines[] = {"2000Rnd_762x51_Belt_T_Green","12Rnd_PG_missiles","168Rnd_CMFlare_Chaff_Magazine"};
magazines[] = {"2000Rnd_762x51_Belt_T_Green", "12Rnd_PG_missiles", "168Rnd_CMFlare_Chaff_Magazine"};
class Turrets: Turrets {
class CopilotTurret: CopilotTurret {
@ -98,7 +92,6 @@ class CfgVehicles {
#include "Heli_Attack_01_base_F.hpp"
class B_Heli_Attack_01_F: Heli_Attack_01_base_F {};
class Heli_Attack_02_base_F: Helicopter_Base_F {
lockDetectionSystem = 12;
incomingMissileDetectionSystem = 16;
@ -121,16 +114,17 @@ class CfgVehicles {
canEject = 1;
showHMD = 1;
};
class MainTurret: MainTurret {
magazines[] = {"2000Rnd_762x51_Belt_T_Red"};
canEject = 1;
};
class RightDoorGun: MainTurret {
magazines[] = {"2000Rnd_762x51_Belt_T_Red"};
canEject = 1;
};
};
/*class UserActions {
class DoorL1_Open {
available = 1;
@ -159,7 +153,6 @@ class CfgVehicles {
showHMD = 1;
};
};
/*class UserActions: UserActions {
class DoorL1_Open {
available = 1;
@ -195,44 +188,41 @@ class CfgVehicles {
};*/
};
class Heli_light_03_base_F: Helicopter_Base_F {};
class I_Heli_light_03_base_F: Heli_light_03_base_F {
lockDetectionSystem = 0;
incomingMissileDetectionSystem = 16;
class Heli_light_03_base_F: Helicopter_Base_F {
driverCanEject = 1;
weapons[] = {"M134_minigun","missiles_DAR","CMFlareLauncher", "ACE_AIR_SAFETY" };
magazines[] = {"5000Rnd_762x51_Yellow_Belt","24Rnd_missiles","168Rnd_CMFlare_Chaff_Magazine"};
class Turrets: Turrets {
class MainTurret: MainTurret {
canEject = 1;
};
};
};
class I_Heli_light_03_F: Heli_light_03_base_F {
lockDetectionSystem = 0;
incomingMissileDetectionSystem = 16;
weapons[] = {"M134_minigun", "missiles_DAR", "CMFlareLauncher", "ACE_AIR_SAFETY" };
magazines[] = {"5000Rnd_762x51_Yellow_Belt", "24Rnd_missiles", "168Rnd_CMFlare_Chaff_Magazine"};
class Turrets: Turrets {
class MainTurret: MainTurret {
showHMD = 1;
gunBeg = "commanderview";
gunEnd = "laserstart";
memoryPointGun = "laserstart";
stabilizedInAxes = 3;
weapons[] = {"Laserdesignator_mounted"};
soundServo[] = {"",0.01,1,30};
soundServo[] = {"", 0.01, 1, 30};
magazines[] = {"Laserbatteries"};
inGunnerMayFire = 1;
};
};
};
class I_Heli_light_03_F: Heli_light_03_base_F {
class Turrets: Turrets {
class MainTurret: MainTurret {};
};
};
class Heli_light_03_unarmed_base_F: Heli_light_03_base_F {};
class I_Heli_light_03_unarmed_F: Heli_light_03_unarmed_base_F {};
class Plane_CAS_01_base_F: Plane_Base_F {
lockDetectionSystem = 12;
incomingMissileDetectionSystem = 16;
class Turrets;
#include <flightmodel_thunderbolt.hpp>
@ -241,7 +231,6 @@ class CfgVehicles {
class Plane_CAS_02_base_F: Plane_Base_F {
lockDetectionSystem = 12;
incomingMissileDetectionSystem = 16;
class Turrets;
#include <flightmodel_yak.hpp>
@ -250,7 +239,6 @@ class CfgVehicles {
class Plane_Fighter_03_base_F: Plane_Base_F {
lockDetectionSystem = 12;
incomingMissileDetectionSystem = 16;
class Turrets;
#include <flightmodel_alca.hpp>
@ -274,35 +262,23 @@ class CfgVehicles {
class UAV_02_CAS_base_F: UAV_02_base_F {
weapons[] = {};
magazines[] = {};
/*class Turrets: Turrets {
class MainTurret: MainTurret {};
};*/
};
class Heli_Transport_03_base_F: Helicopter_Base_H {};
class B_Heli_Transport_03_base_F: Heli_Transport_03_base_F {
lockDetectionSystem = 12;
incomingMissileDetectionSystem = 16;
class Heli_Transport_03_base_F: Helicopter_Base_H {
driverCanEject = 1;
class Turrets: Turrets {
class CopilotTurret: CopilotTurret {
canEject = 1;
};
//class MainTurret: MainTurret {};
class RightDoorGun: MainTurret {};
};
};
class B_Heli_Transport_03_unarmed_base_F: Heli_Transport_03_base_F {
class Turrets: Turrets {
class CopilotTurret: CopilotTurret {
canEject = 1;
};
//class MainTurret: MainTurret {};
//class RightDoorGun: MainTurret {};
};
class B_Heli_Transport_03_F: Heli_Transport_03_base_F {
lockDetectionSystem = 12;
incomingMissileDetectionSystem = 16;
};
class Heli_Transport_04_base_F: Helicopter_Base_H {
@ -314,6 +290,7 @@ class CfgVehicles {
class CopilotTurret: CopilotTurret {
canEject = 1;
};
class LoadmasterTurret: MainTurret {
canEject = 1;
};
@ -325,6 +302,7 @@ class CfgVehicles {
class CopilotTurret: CopilotTurret {
canEject = 1;
};
class LoadmasterTurret: LoadmasterTurret {
canEject = 1;
};
@ -336,6 +314,7 @@ class CfgVehicles {
class CopilotTurret: CopilotTurret {
canEject = 1;
};
class LoadmasterTurret: LoadmasterTurret {
canEject = 1;
};

View File

@ -1,13 +1,10 @@
class Mode_SemiAuto;
class Mode_Burst;
class Mode_FullAuto;
class CfgWeapons {
class RocketPods;
class ACE_AIR_SAFETY : RocketPods
{
class ACE_AIR_SAFETY : RocketPods {
CanLock = 0;
displayName = "SAFE";
displayNameMagazine = "SAFE";
@ -24,10 +21,12 @@ class CfgWeapons {
// Manual Switching Of Flare Mode
class SmokeLauncher;
class CMFlareLauncher: SmokeLauncher {
modes[] = {"Single","Burst","AIBurst"};
modes[] = {"Single", "Burst", "AIBurst"};
class Single: Mode_SemiAuto {
reloadTime = 0.1;
};
class Burst: Mode_Burst {
displayName = CSTRING(CMFlareLauncher_Burst_Name);
};
@ -43,6 +42,7 @@ class CfgWeapons {
reloadTime = 0.023; //0.04;
dispersion = 0.006; //0.0022;
};
class close: manual {};
class short: close {};
class medium: close {};
@ -57,18 +57,22 @@ class CfgWeapons {
dispersion = 0.006;
displayName = CSTRING(gatling_20mm_Name);
};
class close: close {
reloadTime = 0.04;
dispersion = 0.006;
};
class short: short {
reloadTime = 0.04;
dispersion = 0.006;
};
class medium: medium {
reloadTime = 0.04;
dispersion = 0.006;
};
class far: far {
reloadTime = 0.04;
dispersion = 0.006;
@ -78,14 +82,13 @@ class CfgWeapons {
// buff gatling rof
class MGunCore;
class MGun: MGunCore {};
class LMG_RCWS: MGun {};
class LMG_Minigun: LMG_RCWS {
class manual: MGun {
reloadTime = 0.075; //0.015;
dispersion = 0.00093; //0.006;
};
class close: manual {};
class short: close {};
class medium: close {};
@ -94,10 +97,12 @@ class CfgWeapons {
class LMG_Minigun_heli: LMG_Minigun {
showAimCursorInternal = 0;
class manual: manual {
reloadTime = 0.015; //0.033; Note: This is a way to fast ROF (requires over 60 FPS) @todo
dispersion = 0.006; //0.0087;
};
class close: manual {};
class short: close {};
class medium: close {};
@ -110,11 +115,13 @@ class CfgWeapons {
dispersion = 0.0064; //0.0023;
multiplier = 1;
};
class HighROF: LowROF {
reloadTime = 0.02; //0.03;
dispersion = 0.0064; //0.0023;
multiplier = 1;
};
class close: HighROF {};
class short: close {};
class medium: LowROF {};
@ -124,12 +131,14 @@ class CfgWeapons {
class Gatling_30mm_Plane_CAS_01_F: CannonCore {
autoFire = 1;
burst = 1;
class LowROF: Mode_FullAuto {
autoFire = 0;
burst = 22; //65;
reloadTime = 0.0462; //0.0154; //0.034;
multiplier = 3;
};
class close: LowROF {};
class near: close {};
class short: close {};

File diff suppressed because one or more lines are too long

View File

@ -10,570 +10,566 @@ class HScrollbar;
class RscLadderPicture;
class RscControlsGroupNoScrollbars;
class RscInGameUI
{
class RscInGameUI {
class RscUnitInfo;
class Rsc_ACE_Helo_UI_Turret: RscUnitInfo
{
class Rsc_ACE_Helo_UI_Turret: RscUnitInfo {
idd = 300;
controls[] = {"CA_IGUI_elements_group","CA_VehicleToggles"};
controls[] = {"CA_IGUI_elements_group", "CA_VehicleToggles"};
class VScrollbar;
class HScrollbar;
class CA_IGUI_elements_group: RscControlsGroup
{
class CA_IGUI_elements_group: RscControlsGroup {
idc = 170;
class VScrollbar: VScrollbar
{
class VScrollbar: VScrollbar {
width = 0;
};
class HScrollbar: HScrollbar
{
class HScrollbar: HScrollbar {
height = 0;
};
x = "0 * (0.01875 * SafezoneH) + (SafezoneX + ((SafezoneW - SafezoneH) / 2))";
y = "0 * (0.025 * SafezoneH) + (SafezoneY)";
w = "53.5 * (0.01875 * SafezoneH)";
h = "40 * (0.025 * SafezoneH)";
class controls
{
class CA_Distance: RscText
{
x = "0 * (0.01875 * SafezoneH) + (SafezoneX + ((SafezoneW - SafezoneH) / 2))";
y = "0 * (0.025 * SafezoneH) + (SafezoneY)";
w = "53.5 * (0.01875 * SafezoneH)";
h = "40 * (0.025 * SafezoneH)";
class controls {
class CA_Distance: RscText {
idc = 151;
style = 2;
sizeEx = "0.0295*SafezoneH";
sizeEx = "0.0295 * SafezoneH";
shadow = 0;
font = "EtelkaMonospacePro";
x = "24.78 * (0.01875 * SafezoneH)";
y = "30.88 * (0.025 * SafezoneH)";
w = "4 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
x = "24.78 * (0.01875 * SafezoneH)";
y = "30.88 * (0.025 * SafezoneH)";
w = "4 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
};
class CA_Speed: RangeText
{
class CA_Speed: RangeText {
idc = 188;
style = 2;
sizeEx = "0.0295*SafezoneH";
sizeEx = "0.0295 * SafezoneH";
shadow = 0;
font = "EtelkaMonospacePro";
text = "120";
x = "14.78 * (0.01875 * SafezoneH)";
y = "30.88 * (0.025 * SafezoneH)";
w = "4 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
x = "14.78 * (0.01875 * SafezoneH)";
y = "30.88 * (0.025 * SafezoneH)";
w = "4 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
};
class CA_Alt: RangeText
{
class CA_Alt: RangeText {
idc = 189;
style = 2;
sizeEx = "0.0295*SafezoneH";
sizeEx = "0.0295 * SafezoneH";
shadow = 0;
font = "EtelkaMonospacePro";
text = "3825";
x = "34.78 * (0.01875 * SafezoneH)";
y = "30.88 * (0.025 * SafezoneH)";
w = "4 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
x = "34.78 * (0.01875 * SafezoneH)";
y = "30.88 * (0.025 * SafezoneH)";
w = "4 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
};
class CA_VisionMode: RscText
{
class CA_VisionMode: RscText {
idc = 152;
style = 0;
sizeEx = "0.0295*SafezoneH";
sizeEx = "0.0295 * SafezoneH";
shadow = 0;
font = "EtelkaMonospacePro";
text = "VIS";
x = "12.58 * (0.01875 * SafezoneH)";
y = "8 * (0.025 * SafezoneH)";
w = "4 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
x = "12.58 * (0.01875 * SafezoneH)";
y = "8 * (0.025 * SafezoneH)";
w = "4 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
};
class CA_FlirMode: RscText
{
class CA_FlirMode: RscText {
idc = 153;
style = 0;
sizeEx = "0.0295*SafezoneH";
sizeEx = "0.0295 * SafezoneH";
shadow = 0;
font = "EtelkaMonospacePro";
text = "BHOT";
x = "15.78 * (0.01875 * SafezoneH)";
y = "8 * (0.025 * SafezoneH)";
w = "4.5 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
x = "15.78 * (0.01875 * SafezoneH)";
y = "8 * (0.025 * SafezoneH)";
w = "4.5 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
};
class ValueGrid: RangeText
{
class ValueGrid: RangeText {
idc = 172;
font = "EtelkaMonospacePro";
style = 2;
sizeEx = "0.0295*SafezoneH";
sizeEx = "0.0295 * SafezoneH";
shadow = 0;
x = "12.20 * (0.01875 * SafezoneH)";
y = "3.5 * (0.025 * SafezoneH)";
w = "6 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
x = "12.20 * (0.01875 * SafezoneH)";
y = "3.5 * (0.025 * SafezoneH)";
w = "6 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
};
class TextTADS: RangeText
{
class TextTADS: RangeText {
idc = 1010;
text = "TADS";
font = "EtelkaMonospacePro";
style = 2;
shadow = 0;
x = "12.30 * (0.01875 * SafezoneH)";
y = "5 * (0.025 * SafezoneH)";
w = "4 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
x = "12.30 * (0.01875 * SafezoneH)";
y = "5 * (0.025 * SafezoneH)";
w = "4 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
};
class ValueTime: RangeText
{
class ValueTime: RangeText {
idc = 190;
text = "20:28:35";
font = "EtelkaMonospacePro";
style = 2;
sizeEx = "0.0295*SafezoneH";
sizeEx = "0.0295 * SafezoneH";
shadow = 0;
x = "12.1 * (0.01875 * SafezoneH)";
y = "6.5 * (0.025 * SafezoneH)";
w = "6 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
x = "12.1 * (0.01875 * SafezoneH)";
y = "6.5 * (0.025 * SafezoneH)";
w = "6 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
};
class CA_Laser: RscText
{
class CA_Laser: RscText {
idc = 158;
style = "0x30 + 0x800";
sizeEx = "0.038*SafezoneH";
sizeEx = "0.038 * SafezoneH";
shadow = 0;
font = "EtelkaMonospacePro";
text = QPATHTOF(data\Helo_LaserON.paa);
x = "20.45 * (0.01875 * SafezoneH)";
y = "14.1 * (0.025 * SafezoneH)";
w = "12.5 * (0.01875 * SafezoneH)";
h = "12 * (0.025 * SafezoneH)";
x = "20.45 * (0.01875 * SafezoneH)";
y = "14.1 * (0.025 * SafezoneH)";
w = "12.5 * (0.01875 * SafezoneH)";
h = "12 * (0.025 * SafezoneH)";
};
class CA_Heading: RscText
{
class CA_Heading: RscText {
idc = 156;
style = 0;
sizeEx = "0.038*SafezoneH";
sizeEx = "0.038 * SafezoneH";
shadow = 0;
font = "EtelkaMonospacePro";
text = "023";
x = "24.83 * (0.01875 * SafezoneH)";
y = "6 * (0.025 * SafezoneH)";
w = "4 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
x = "24.83 * (0.01875 * SafezoneH)";
y = "6 * (0.025 * SafezoneH)";
w = "4 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
};
};
};
};
class Rsc_ACE_Helo_UI_01: RscUnitInfo
{
controls[] = {"WeaponInfoControlsGroupRight","CA_TextFlaresMode","CA_TextFlares","CA_VehicleToggles","CA_Radar"};
class Rsc_ACE_Helo_UI_01: RscUnitInfo {
controls[] = {"WeaponInfoControlsGroupRight", "CA_TextFlaresMode", "CA_TextFlares", "CA_VehicleToggles", "CA_Radar"};
};
class Rsc_ACE_Helo_UI_02: RscUnitInfo
{
controls[] = {"CA_TextFlaresMode","CA_TextFlares","CA_VehicleToggles","CA_Radar"};
class Rsc_ACE_Helo_UI_02: RscUnitInfo {
controls[] = {"CA_TextFlaresMode", "CA_TextFlares", "CA_VehicleToggles", "CA_Radar"};
};
class Rsc_ACE_Drones_UI_Turret: RscUnitInfo
{
class Rsc_ACE_Drones_UI_Turret: RscUnitInfo {
idd = 300;
controls[] = {"CA_Zeroing","CA_IGUI_elements_group","CA_VehicleToggles"};
class CA_IGUI_elements_group: RscControlsGroup
{
controls[] = {"CA_Zeroing", "CA_IGUI_elements_group", "CA_VehicleToggles"};
class CA_IGUI_elements_group: RscControlsGroup {
idc = 170;
class VScrollbar: VScrollbar
{
class VScrollbar: VScrollbar {
width = 0;
};
class HScrollbar: HScrollbar
{
class HScrollbar: HScrollbar {
height = 0;
};
x = "0 * (0.01875 * SafezoneH) + (SafezoneX + ((SafezoneW - SafezoneH) / 2))";
y = "0 * (0.025 * SafezoneH) + (SafezoneY)";
w = "53.5 * (0.01875 * SafezoneH)";
h = "40 * (0.025 * SafezoneH)";
class controls
{
class CA_Distance: RscText
{
x = "0 * (0.01875 * SafezoneH) + (SafezoneX + ((SafezoneW - SafezoneH) / 2))";
y = "0 * (0.025 * SafezoneH) + (SafezoneY)";
w = "53.5 * (0.01875 * SafezoneH)";
h = "40 * (0.025 * SafezoneH)";
class controls {
class CA_Distance: RscText {
idc = 151;
style = 2;
sizeEx = "0.0295*SafezoneH";
sizeEx = "0.0295 * SafezoneH";
shadow = 0;
font = "EtelkaMonospacePro";
x = "24.78 * (0.01875 * SafezoneH)";
y = "30.88 * (0.025 * SafezoneH)";
w = "4 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
x = "24.78 * (0.01875 * SafezoneH)";
y = "30.88 * (0.025 * SafezoneH)";
w = "4 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
};
class CA_Speed: RangeText
{
class CA_Speed: RangeText {
idc = 188;
style = 2;
sizeEx = "0.0295*SafezoneH";
sizeEx = "0.0295 * SafezoneH";
shadow = 0;
font = "EtelkaMonospacePro";
text = "120";
x = "14.78 * (0.01875 * SafezoneH)";
y = "30.88 * (0.025 * SafezoneH)";
w = "4 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
x = "14.78 * (0.01875 * SafezoneH)";
y = "30.88 * (0.025 * SafezoneH)";
w = "4 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
};
class CA_Alt: RangeText
{
class CA_Alt: RangeText {
idc = 189;
style = 2;
sizeEx = "0.0295*SafezoneH";
sizeEx = "0.0295 * SafezoneH";
shadow = 0;
font = "EtelkaMonospacePro";
text = "3825";
x = "34.78 * (0.01875 * SafezoneH)";
y = "30.88 * (0.025 * SafezoneH)";
w = "4 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
x = "34.78 * (0.01875 * SafezoneH)";
y = "30.88 * (0.025 * SafezoneH)";
w = "4 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
};
class ValueTime: RangeText
{
class ValueTime: RangeText {
idc = 190;
text = "20:28:35";
font = "EtelkaMonospacePro";
style = 2;
sizeEx = "0.0295*SafezoneH";
sizeEx = "0.0295 * SafezoneH";
shadow = 0;
x = "1.75 * (0.01875 * SafezoneH)";
y = "10.5 * (0.025 * SafezoneH)";
w = "6 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
x = "1.75 * (0.01875 * SafezoneH)";
y = "10.5 * (0.025 * SafezoneH)";
w = "6 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
};
class CA_VisionMode: RscText
{
class CA_VisionMode: RscText {
idc = 152;
style = 0;
sizeEx = "0.0295*SafezoneH";
sizeEx = "0.0295 * SafezoneH";
shadow = 0;
font = "EtelkaMonospacePro";
text = "VIS";
align = "right";
x = "2.6 * (0.01875 * SafezoneH)";
y = "12.0 * (0.025 * SafezoneH)";
w = "4 * (0.01875 * SafezoneH)";
h = "1.0 * (0.025 * SafezoneH)";
x = "2.6 * (0.01875 * SafezoneH)";
y = "12.0 * (0.025 * SafezoneH)";
w = "4 * (0.01875 * SafezoneH)";
h = "1.0 * (0.025 * SafezoneH)";
};
class CA_FlirMode: RscText
{
class CA_FlirMode: RscText {
idc = 153;
style = 0;
sizeEx = "0.0295*SafezoneH";
sizeEx = "0.0295 * SafezoneH";
shadow = 0;
font = "EtelkaMonospacePro";
text = "BHOT";
align = "right";
x = "6.18 * (0.01875 * SafezoneH)";
y = "12.0 * (0.025 * SafezoneH)";
w = "4.5 * (0.01875 * SafezoneH)";
h = "1.0 * (0.025 * SafezoneH)";
x = "6.18 * (0.01875 * SafezoneH)";
y = "12.0 * (0.025 * SafezoneH)";
w = "4.5 * (0.01875 * SafezoneH)";
h = "1.0 * (0.025 * SafezoneH)";
};
class TgT_Grid_text: RangeText
{
class TgT_Grid_text: RangeText {
idc = 1005;
text = "TGT:";
font = "EtelkaMonospacePro";
style = 2;
sizeEx = "0.0295*SafezoneH";
sizeEx = "0.0295 * SafezoneH";
shadow = 0;
x = "1.20 * (0.01875 * SafezoneH)";
y = "13.5 * (0.025 * SafezoneH)";
w = "6 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
x = "1.20 * (0.01875 * SafezoneH)";
y = "13.5 * (0.025 * SafezoneH)";
w = "6 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
};
class TGT_ValueGrid: RangeText
{
class TGT_ValueGrid: RangeText {
idc = 172;
font = "EtelkaMonospacePro";
colorText[] = {0.706,0.0745,0.0196,0.8};
colorText[] = {0.706, 0.0745, 0.0196, 0.8};
style = 2;
sizeEx = "0.0295*SafezoneH";
shadow = 0;
x = "5.20 * (0.01875 * SafezoneH)";
y = "13.5 * (0.025 * SafezoneH)";
w = "6 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
x = "5.20 * (0.01875 * SafezoneH)";
y = "13.5 * (0.025 * SafezoneH)";
w = "6 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
};
class OWN_Grid_text: RangeText
{
class OWN_Grid_text: RangeText {
idc = 1005;
text = "OWN:";
font = "EtelkaMonospacePro";
style = 2;
sizeEx = "0.0295*SafezoneH";
sizeEx = "0.0295 * SafezoneH";
shadow = 0;
x = "1.20 * (0.01875 * SafezoneH)";
y = "15 * (0.025 * SafezoneH)";
w = "6 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
x = "1.20 * (0.01875 * SafezoneH)";
y = "15 * (0.025 * SafezoneH)";
w = "6 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
};
class OWN_ValueGrid: RangeText
{
class OWN_ValueGrid: RangeText {
idc = 171;
font = "EtelkaMonospacePro";
colorText[] = {0.15,1,0.15,0.8};
colorText[] = {0.15, 1, 0.15, 0.8};
style = 2;
sizeEx = "0.0295*SafezoneH";
sizeEx = "0.0295 * SafezoneH";
shadow = 0;
x = "5.20 * (0.01875 * SafezoneH)";
y = "15 * (0.025 * SafezoneH)";
w = "6 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
x = "5.20 * (0.01875 * SafezoneH)";
y = "15 * (0.025 * SafezoneH)";
w = "6 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
};
class CA_Laser: RscText
{
class CA_Laser: RscText {
idc = 158;
style = "0x30 + 0x800";
sizeEx = "0.038*SafezoneH";
sizeEx = "0.038 * SafezoneH";
shadow = 0;
align = "right";
font = "EtelkaMonospacePro";
text = QPATHTOF(data\Helo_LaserON.paa);
x = "20.45 * (0.01875 * SafezoneH)";
y = "14.1 * (0.025 * SafezoneH)";
w = "12.5 * (0.01875 * SafezoneH)";
h = "12 * (0.025 * SafezoneH)";
x = "20.45 * (0.01875 * SafezoneH)";
y = "14.1 * (0.025 * SafezoneH)";
w = "12.5 * (0.01875 * SafezoneH)";
h = "12 * (0.025 * SafezoneH)";
};
class CA_Heading: RscText
{
class CA_Heading: RscText {
idc = 156;
style = 0;
sizeEx = "0.038*SafezoneH";
sizeEx = "0.038 * SafezoneH";
shadow = 0;
font = "EtelkaMonospacePro";
text = "023";
align = "right";
x = "25 * (0.01875 * SafezoneH)";
y = "5 * (0.025 * SafezoneH)";
w = "4 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
x = "25 * (0.01875 * SafezoneH)";
y = "5 * (0.025 * SafezoneH)";
w = "4 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
};
};
};
};
class Rsc_ACE_Drones_UI_Pilots: RscUnitInfo
{
class Rsc_ACE_Drones_UI_Pilots: RscUnitInfo {
idd = 300;
controls[] = {"WeaponInfoControlsGroupRight","CA_BackgroundVehicle","CA_BackgroundVehicleTitle","CA_BackgroundVehicleTitleDark","CA_BackgroundFuel","CA_Vehicle","CA_VehicleRole","CA_HitZones","CA_SpeedBackground","CA_SpeedUnits","CA_Speed","CA_ValueFuel","CA_AltBackground","CA_AltUnits","CA_Alt","CA_VehicleToggles","CA_Radar","DriverOpticsGroup"};
class DriverOpticsGroup: RscControlsGroup
{
controls[] = {"WeaponInfoControlsGroupRight", "CA_BackgroundVehicle", "CA_BackgroundVehicleTitle", "CA_BackgroundVehicleTitleDark", "CA_BackgroundFuel", "CA_Vehicle", "CA_VehicleRole", "CA_HitZones", "CA_SpeedBackground", "CA_SpeedUnits", "CA_Speed", "CA_ValueFuel", "CA_AltBackground", "CA_AltUnits", "CA_Alt", "CA_VehicleToggles", "CA_Radar", "DriverOpticsGroup"};
class DriverOpticsGroup: RscControlsGroup {
idc = 392;
class VScrollbar: VScrollbar
{
class VScrollbar: VScrollbar {
width = 0;
};
class HScrollbar: HScrollbar
{
class HScrollbar: HScrollbar {
height = 0;
};
x = "0 * (0.01875 * SafezoneH) + (SafezoneX + ((SafezoneW - SafezoneH) / 2))";
y = "0 * (0.025 * SafezoneH) + (SafezoneY)";
w = "53.5 * (0.01875 * SafezoneH)";
h = "40 * (0.025 * SafezoneH)";
class controls
{
class TextGrid: RscText
{
x = "0 * (0.01875 * SafezoneH) + (SafezoneX + ((SafezoneW - SafezoneH) / 2))";
y = "0 * (0.025 * SafezoneH) + (SafezoneY)";
w = "53.5 * (0.01875 * SafezoneH)";
h = "40 * (0.025 * SafezoneH)";
class controls {
class TextGrid: RscText {
style = 0;
sizeEx = "0.02*SafezoneH";
sizeEx = "0.02 * SafezoneH";
shadow = 0;
font = "EtelkaMonospacePro";
idc = 1005;
text = "GRID:";
x = "5.8 * (0.01875 * SafezoneH)";
y = "31.8 * (0.025 * SafezoneH)";
w = "5 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
x = "5.8 * (0.01875 * SafezoneH)";
y = "31.8 * (0.025 * SafezoneH)";
w = "5 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
};
class ValueGrid: TextGrid
{
class ValueGrid: TextGrid {
idc = 189;
text = "382546";
x = "10.3 * (0.01875 * SafezoneH)";
y = "31.8 * (0.025 * SafezoneH)";
w = "6 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
x = "10.3 * (0.01875 * SafezoneH)";
y = "31.8 * (0.025 * SafezoneH)";
w = "6 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
};
class TextTime: TextGrid
{
class TextTime: TextGrid {
idc = 1010;
text = "TIME [UTC]:";
x = "5.8 * (0.01875 * SafezoneH)";
y = "32.6 * (0.025 * SafezoneH)";
w = "5 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
x = "5.8 * (0.01875 * SafezoneH)";
y = "32.6 * (0.025 * SafezoneH)";
w = "5 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
};
class ValueTime: TextGrid
{
class ValueTime: TextGrid {
idc = 101;
text = "20:28:35";
x = "10 * (0.01875 * SafezoneH)";
y = "32.6 * (0.025 * SafezoneH)";
w = "6 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
x = "10 * (0.01875 * SafezoneH)";
y = "32.6 * (0.025 * SafezoneH)";
w = "6 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
};
class TextMag: TextGrid
{
class TextMag: TextGrid {
idc = 1011;
text = "CAM MAG:";
x = "5.8 * (0.01875 * SafezoneH)";
y = "7 * (0.025 * SafezoneH)";
w = "5 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
x = "5.8 * (0.01875 * SafezoneH)";
y = "7 * (0.025 * SafezoneH)";
w = "5 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
};
class OpticsZoom: TextGrid
{
class OpticsZoom: TextGrid {
idc = 192;
text = "28x";
x = "10.3 * (0.01875 * SafezoneH)";
y = "7 * (0.025 * SafezoneH)";
w = "6 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
x = "10.3 * (0.01875 * SafezoneH)";
y = "7 * (0.025 * SafezoneH)";
w = "6 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
};
class BorderLineSpdTop: RscPicture
{
class BorderLineSpdTop: RscPicture {
idc = 1203;
text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\border_line_ca.paa";
x = "3.343 * (0.01875 * SafezoneH)";
y = "12.4 * (0.025 * SafezoneH)";
w = "3 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
x = "3.343 * (0.01875 * SafezoneH)";
y = "12.4 * (0.025 * SafezoneH)";
w = "3 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
};
class BorderLineSpdBottom: RscPicture
{
class BorderLineSpdBottom: RscPicture {
idc = 1207;
text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\border_line_ca.paa";
x = "3.343 * (0.01875 * SafezoneH)";
y = "26.5 * (0.025 * SafezoneH)";
w = "3 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
x = "3.343 * (0.01875 * SafezoneH)";
y = "26.5 * (0.025 * SafezoneH)";
w = "3 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
};
class BorderLineAltTop: RscPicture
{
class BorderLineAltTop: RscPicture {
idc = 1205;
text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\border_line_ca.paa";
x = "47.16 * (0.01875 * SafezoneH)";
y = "12.4 * (0.025 * SafezoneH)";
w = "3 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
x = "47.16 * (0.01875 * SafezoneH)";
y = "12.4 * (0.025 * SafezoneH)";
w = "3 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
};
class BorderLineAltBottom: RscPicture
{
class BorderLineAltBottom: RscPicture {
idc = 1206;
text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\border_line_ca.paa";
x = "47.16 * (0.01875 * SafezoneH)";
y = "26.5 * (0.025 * SafezoneH)";
w = "3 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
x = "47.16 * (0.01875 * SafezoneH)";
y = "26.5 * (0.025 * SafezoneH)";
w = "3 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
};
class TextSpd: TextGrid
{
class TextSpd: TextGrid {
idc = 1004;
text = "SPD";
x = "4.8 * (0.01875 * SafezoneH)";
y = "11.8 * (0.025 * SafezoneH)";
w = "5 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
x = "4.8 * (0.01875 * SafezoneH)";
y = "11.8 * (0.025 * SafezoneH)";
w = "5 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
};
class SpeedValueBorder: RscPicture
{
class SpeedValueBorder: RscPicture {
idc = 1200;
text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\altimeter_value_ca.paa";
x = "6.3 * (0.01875 * SafezoneH)";
y = "19 * (0.025 * SafezoneH)";
w = "5 * (0.01875 * SafezoneH)";
h = "2 * (0.025 * SafezoneH)";
x = "6.3 * (0.01875 * SafezoneH)";
y = "19 * (0.025 * SafezoneH)";
w = "5 * (0.01875 * SafezoneH)";
h = "2 * (0.025 * SafezoneH)";
};
class CA_Speed: TextGrid
{
class CA_Speed: TextGrid {
idc = 190;
sizeEx = "0.03*SafezoneH";
text = "120";
x = "7.5 * (0.01875 * SafezoneH)";
y = "19.5 * (0.025 * SafezoneH)";
w = "6 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
x = "7.5 * (0.01875 * SafezoneH)";
y = "19.5 * (0.025 * SafezoneH)";
w = "6 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
};
class AnalogueSpeed: RscLadderPicture
{
class AnalogueSpeed: RscLadderPicture {
idc = 384;
topValue = 1312;
bottomValue = -345;
visibleRange = -1;
text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\UAVspeedLadder_ca.paa";
x = "1.5 * (0.01875 * SafezoneH)";
y = "13 * (0.025 * SafezoneH)";
w = "5 * (0.01875 * SafezoneH)";
h = "14 * (0.025 * SafezoneH)";
x = "1.5 * (0.01875 * SafezoneH)";
y = "13 * (0.025 * SafezoneH)";
w = "5 * (0.01875 * SafezoneH)";
h = "14 * (0.025 * SafezoneH)";
};
class TextAlt: TextGrid
{
class TextAlt: TextGrid {
idc = 1006;
text = "ALT";
x = "46.9 * (0.01875 * SafezoneH)";
y = "11.8 * (0.025 * SafezoneH)";
w = "5 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
x = "46.9 * (0.01875 * SafezoneH)";
y = "11.8 * (0.025 * SafezoneH)";
w = "5 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
};
class AltValueBorder: RscPicture
{
class AltValueBorder: RscPicture {
idc = 1201;
text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\airspeed_value_ca.paa";
x = "42.25 * (0.01875 * SafezoneH)";
y = "19 * (0.025 * SafezoneH)";
w = "5 * (0.01875 * SafezoneH)";
h = "2 * (0.025 * SafezoneH)";
x = "42.25 * (0.01875 * SafezoneH)";
y = "19 * (0.025 * SafezoneH)";
w = "5 * (0.01875 * SafezoneH)";
h = "2 * (0.025 * SafezoneH)";
};
class CA_Alt: TextGrid
{
class CA_Alt: TextGrid {
idc = 191;
sizeEx = "0.03*SafezoneH";
sizeEx = "0.03 * SafezoneH";
style = 1;
text = "3825";
x = "43 * (0.01875 * SafezoneH)";
y = "19.5 * (0.025 * SafezoneH)";
w = "3.2 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
x = "43 * (0.01875 * SafezoneH)";
y = "19.5 * (0.025 * SafezoneH)";
w = "3.2 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
};
class AnalogueAlt: RscLadderPicture
{
class AnalogueAlt: RscLadderPicture {
idc = 385;
topValue = 14430;
bottomValue = -2110;
visibleRange = -1;
text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\UAValtLadder_ca.paa";
x = "47 * (0.01875 * SafezoneH)";
y = "13 * (0.025 * SafezoneH)";
w = "2.5 * (0.01875 * SafezoneH)";
h = "14 * (0.025 * SafezoneH)";
x = "47 * (0.01875 * SafezoneH)";
y = "13 * (0.025 * SafezoneH)";
w = "2.5 * (0.01875 * SafezoneH)";
h = "14 * (0.025 * SafezoneH)";
};
class AnalogueHorizon: RscLadderPicture
{
class AnalogueHorizon: RscLadderPicture {
idc = 383;
topValue = 90;
bottomValue = -90;
visibleRange = -1;
text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\horizon_ladder_ca.paa";
x = "16.75 * (0.01875 * SafezoneH)";
y = "5 * (0.025 * SafezoneH)";
w = "20 * (0.01875 * SafezoneH)";
h = "30 * (0.025 * SafezoneH)";
x = "16.75 * (0.01875 * SafezoneH)";
y = "5 * (0.025 * SafezoneH)";
w = "20 * (0.01875 * SafezoneH)";
h = "30 * (0.025 * SafezoneH)";
};
class HorizonCenter: RscPicture
{
class HorizonCenter: RscPicture {
idc = 1202;
text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\horizon_aircraft_ca.paa";
x = "24.75 * (0.01875 * SafezoneH)";
y = "19 * (0.025 * SafezoneH)";
w = "4 * (0.01875 * SafezoneH)";
h = "2 * (0.025 * SafezoneH)";
x = "24.75 * (0.01875 * SafezoneH)";
y = "19 * (0.025 * SafezoneH)";
w = "4 * (0.01875 * SafezoneH)";
h = "2 * (0.025 * SafezoneH)";
};
};
};

View File

@ -8,7 +8,7 @@ class CfgPatches {
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
author = ECSTRING(common,ACETeam);
authors[] = {"KoffeinFlummi","Crusty","commy2","jaynus","Kimi"};
authors[] = {"KoffeinFlummi", "Crusty", "commy2", "jaynus", "Kimi"};
url = ECSTRING(main,URL);
VERSION_CONFIG;

View File

@ -1,4 +1,3 @@
acceleration = 300;
maxSpeed = 936;
irScanRangeMin = 500;
@ -9,16 +8,16 @@ rudderInfluence = 0.001;
aileronControlsSensitivityCoef = 3;
elevatorControlsSensitivity = 2;
rudderControlsSensitivityoef = 4;
elevatorCoef[] = {0.6,0.73,0.62,0.52,0.39,0.33,0.28};
aileronCoef[] = {0.5,0.68,0.75,0.86,0.92,0.96,1};
rudderCoef[] = {0.9,0.75,0.58,0.45,0.38,0.35,0.3};
envelope[] = {0,0.06,1.2,3,3.6,3.75,3.65,3.45,3.3,2.8,2.4,1.9,1.5};
angleOfIndicence = 0.0523599; //determines velocity vector behaviour, how quickly it catches up with where your nose is pointing, I think
draconicForceXCoef = 7.5; //max angle of attack, lower value gives higher aoa
draconicForceYCoef = 0.2198; //Something to do with bleed off of speed, low values seem to increase bleed off
elevatorCoef[] = {0.6, 0.73, 0.62, 0.52, 0.39, 0.33, 0.28};
aileronCoef[] = {0.5, 0.68, 0.75, 0.86, 0.92, 0.96, 1};
rudderCoef[] = {0.9, 0.75, 0.58, 0.45, 0.38, 0.35, 0.3};
envelope[] = {0, 0.06, 1.2, 3, 3.6, 3.75, 3.65, 3.45, 3.3, 2.8, 2.4, 1.9, 1.5};
angleOfIndicence = 0.0523599; //determines velocity vector behaviour, how quickly it catches up with where your nose is pointing, I think
draconicForceXCoef = 7.5; //max angle of attack, lower value gives higher aoa
draconicForceYCoef = 0.2198; //Something to do with bleed off of speed, low values seem to increase bleed off
draconicForceZCoef = 5.12; //????
draconicTorqueXCoef = 0.18; //resistance to elevator input, also impacts speed degradation
draconicTorqueXCoef = 0.18; //resistance to elevator input, also impacts speed degradation
draconicTorqueYCoef = 0.000017;
thrustCoef[] = {1.3,1.27,1.24,1.2,1.17,1.15,1.13,1.1,1.06,1,0.94,0.72,0.51,0.4,0.25,0};
thrustCoef[] = {1.3, 1.27, 1.24, 1.2, 1.17, 1.15, 1.13, 1.1, 1.06, 1, 0.94, 0.72, 0.51, 0.4, 0.25, 0};
gunAimDown = 0.029;
flapsFrictionCoef = 0.32;

View File

@ -1,4 +1,3 @@
maxSpeed = 736;
aileronSensitivity = 0.85;
elevatorSensitivity = 0.75;
@ -6,9 +5,9 @@ rudderInfluence = 0.001;
aileronControlsSensitivityCoef = 3;
elevatorControlsSensitivity = 2;
rudderControlsSensitivityoef = 4;
elevatorCoef[] = {0.7,0.75,0.75,0.65,0.55,0.45,0.35};
aileronCoef[] = {0.6,0.85,0.88,0.92,0.95,0.97,1};
rudderCoef[] = {0.8,0.75,0.65,0.5,0.4,0.33,0.3};
elevatorCoef[] = {0.7, 0.75, 0.75, 0.65, 0.55, 0.45, 0.35};
aileronCoef[] = {0.6, 0.85, 0.88, 0.92, 0.95, 0.97, 1};
rudderCoef[] = {0.8, 0.75, 0.65, 0.5, 0.4, 0.33, 0.3};
flapsFrictionCoef = 0.35;
angleOfIndicence = 0.0523599;
draconicForceXCoef = 9.5;
@ -16,7 +15,7 @@ draconicForceYCoef = 0.56;
draconicForceZCoef = 0.1;
draconicTorqueXCoef = 0.58;
draconicTorqueYCoef = 0.00013;
envelope[] = {0,0,0.75,2.4,3.6,3.8,3.7,3.2,2.2,1.7,0.9};
thrustCoef[] = {1,1.2,1.3,1.25,1.06,1.01,1,0.92,0.75,0.65,0.5,0.25,0};
envelope[] = {0, 0, 0.75, 2.4, 3.6, 3.8, 3.7, 3.2, 2.2, 1.7, 0.9};
thrustCoef[] = {1, 1.2, 1.3, 1.25, 1.06, 1.01, 1, 0.92, 0.75, 0.65, 0.5, 0.25, 0};
acceleration = 265;
landingSpeed = 220;

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