mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' into mainMenuVersionHTML
This commit is contained in:
commit
0c31adab61
@ -36,6 +36,7 @@ Anthariel <Contact@storm-simulation.com>
|
||||
BlackQwar
|
||||
Brakoviejo
|
||||
Brisse <brisse@outlook.com>
|
||||
BullHorn <bullhorn7@gmail.com>
|
||||
Clon1998 <ps.patti1998@gmail.com>
|
||||
Codingboy
|
||||
Crusty
|
||||
@ -73,6 +74,7 @@ Raspu86
|
||||
Riccardo Petricca <petriccarcc@gmail.com>
|
||||
Robert Boklahánics <bokirobi@gmail.com>
|
||||
ramius86 <pasini86@hotmail.com>
|
||||
SilentSpike <SilentSpike100@gmail.com>
|
||||
simon84 <badguy360th@gmail.com>
|
||||
Sniperwolf572 <tenga6@gmail.com>
|
||||
Tachi <zaveruha007@gmail.com>
|
||||
@ -93,5 +95,7 @@ VyMajoris(W-Cephei)<vycanismajoriscsa@gmail.com>
|
||||
Bla1337
|
||||
nikolauska <nikolauska1@gmail.com>
|
||||
adam3adam <br.ada@seznam.cz>
|
||||
Professor <lukas.trneny@wo.cz>
|
||||
Professor <lukas.trneny@wo.cz>
|
||||
Winter <simon@agius-muscat.net>
|
||||
Dharma Bellamkonda <dharma.bellamkonda@gmail.com>
|
||||
legman <juicemelon@msn.com>
|
||||
|
12
README.md
12
README.md
@ -3,19 +3,21 @@
|
||||
height="112">
|
||||
</p>
|
||||
<p align="center">
|
||||
<a href="https://github.com/acemod/ACE3/releases">
|
||||
<img src="http://img.shields.io/badge/Version-3.0.0-blue.svg?style=flat"
|
||||
<!--<a href="https://github.com/acemod/ACE3/releases">
|
||||
v3.0.1
|
||||
<img src="http://img.shields.io/badge/Version-3.0.1-blue.svg?style=flat"
|
||||
alt="ACE version">
|
||||
</a>
|
||||
<a href="https://github.com/acemod/ACE3/archive/master.zip">
|
||||
<img src="http://img.shields.io/badge/Download-48.3_MB-green.svg?style=flat"
|
||||
40.9 Mb
|
||||
<img src="http://img.shields.io/badge/Download-40.9_MB-green.svg?style=flat"
|
||||
alt="ACE download">
|
||||
</a>
|
||||
<a href="https://github.com/acemod/ACE3/issues">
|
||||
<img src="http://img.shields.io/github/issues-raw/acemod/ACE3.svg?style=flat&label=Issues"
|
||||
alt="ACE issues">
|
||||
</a>
|
||||
<a href="http://forums.bistudio.com/showthread.php?190433-ACE3-A-collaborative-merger-between-AGM-CSE-and-ACE&p=2910796&viewfull=1#post2910796">
|
||||
</a>-->
|
||||
<a href="http://forums.bistudio.com/showthread.php?191716-ACE3-A-collaborative-merger-between-AGM-CSE-and-ACE&p=2935435&viewfull=1#post2935435">
|
||||
<img src="https://img.shields.io/badge/BIF-Thread-lightgrey.svg?style=flat"
|
||||
alt="BIF thread">
|
||||
</a>
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
ace_fcs.dll
BIN
ace_fcs.dll
Binary file not shown.
@ -5,23 +5,29 @@ class ACE_Settings {
|
||||
typeName = "BOOL";
|
||||
value = 0;
|
||||
};
|
||||
class GVAR(alwaysSimulateForSnipers) {
|
||||
displayName = "Always Enabled For Snipers";
|
||||
description = "Always enables advanced ballistics when high power optics are used";
|
||||
class GVAR(simulateForSnipers) {
|
||||
displayName = "Enabled For Snipers";
|
||||
description = "Enables advanced ballistics for non local snipers (when using high power optics)";
|
||||
typeName = "BOOL";
|
||||
value = 1;
|
||||
};
|
||||
class GVAR(disabledInFullAutoMode) {
|
||||
displayName = "Disabled In FullAuto Mode";
|
||||
description = "Disables the advanced ballistics during full auto fire";
|
||||
class GVAR(simulateForGroupMembers) {
|
||||
displayName = "Enabled For Group Members";
|
||||
description = "Enables advanced ballistics for non local group members";
|
||||
typeName = "BOOL";
|
||||
value = 0;
|
||||
};
|
||||
class GVAR(onlyActiveForLocalPlayers) {
|
||||
displayName = "Disabled For Non Local Players";
|
||||
description = "Disables the advanced ballistics for bullets coming from other players (enable this if you encounter frame drops during heavy firefights in multiplayer)";
|
||||
class GVAR(simulateForEveryone) {
|
||||
displayName = "Enabled For Everyone";
|
||||
description = "Enables advanced ballistics for all non local players (enabling this may degrade performance during heavy firefights in multiplayer)";
|
||||
typeName = "BOOL";
|
||||
value = 1;
|
||||
value = 0;
|
||||
};
|
||||
class GVAR(disabledInFullAutoMode) {
|
||||
displayName = "Disabled In FullAuto Mode";
|
||||
description = "Disables advanced ballistics during full auto fire";
|
||||
typeName = "BOOL";
|
||||
value = 0;
|
||||
};
|
||||
/* // TODO: We currently do not have firedEHs on vehicles
|
||||
class GVAR(vehicleGunnerEnabled) {
|
||||
|
@ -2,7 +2,7 @@ class CfgVehicles {
|
||||
class ACE_Module;
|
||||
class GVAR(ModuleSettings): ACE_Module {
|
||||
scope = 2;
|
||||
displayName = "Advanced Ballistics";
|
||||
displayName = "$STR_ACE_AdvancedBallistics_DisplayName";
|
||||
icon = QUOTE(PATHTOF(UI\Icon_Module_Wind_ca.paa));
|
||||
category = "ACE";
|
||||
function = QUOTE(DFUNC(initModuleSettings));
|
||||
@ -12,29 +12,35 @@ class CfgVehicles {
|
||||
author = "Ruthberg";
|
||||
class Arguments {
|
||||
class enabled {
|
||||
displayName = "Advanced Ballistics";
|
||||
description = "Enables advanced ballistics";
|
||||
displayName = "$STR_ACE_AdvancedBallistics_enabled_DisplayName";
|
||||
description = "$STR_ACE_AdvancedBallistics_enabled_Description";
|
||||
typeName = "BOOL";
|
||||
defaultValue = 0;
|
||||
};
|
||||
class alwaysSimulateForSnipers {
|
||||
displayName = "Always Enabled For Snipers";
|
||||
description = "Always enables advanced ballistics when high power optics are used";
|
||||
class simulateForSnipers {
|
||||
displayName = "$STR_ACE_AdvancedBallistics_simulateForSnipers_DisplayName";
|
||||
description = "$STR_ACE_AdvancedBallistics_simulateForSnipers_Description";
|
||||
typeName = "BOOL";
|
||||
defaultValue = 1;
|
||||
};
|
||||
class simulateForGroupMembers {
|
||||
displayName = "$STR_ACE_AdvancedBallistics_simulateForGroupMembers_DisplayName";
|
||||
description = "$STR_ACE_AdvancedBallistics_simulateForGroupMembers_Description";
|
||||
typeName = "BOOL";
|
||||
defaultValue = 0;
|
||||
};
|
||||
class simulateForEveryone {
|
||||
displayName = "$STR_ACE_AdvancedBallistics_simulateForEveryone_DisplayName";
|
||||
description = "$STR_ACE_AdvancedBallistics_simulateForEveryone_Description";
|
||||
typeName = "BOOL";
|
||||
defaultValue = 0;
|
||||
};
|
||||
class disabledInFullAutoMode {
|
||||
displayName = "Disabled In FullAuto Mode";
|
||||
description = "Disables the advanced ballistics during full auto fire";
|
||||
displayName = "$STR_ACE_AdvancedBallistics_disabledInFullAutoMod_DisplayName";
|
||||
description = "$STR_ACE_AdvancedBallistics_disabledInFullAutoMod_Description";
|
||||
typeName = "BOOL";
|
||||
defaultValue = 0;
|
||||
};
|
||||
class onlyActiveForLocalPlayers {
|
||||
displayName = "Disabled For Non Local Players";
|
||||
description = "Disables the advanced ballistics for bullets coming from other players (enable this if you encounter frame drops during heavy firefights in multiplayer)";
|
||||
typeName = "BOOL";
|
||||
defaultValue = 1;
|
||||
};
|
||||
/* // TODO: We currently do not have firedEHs on vehicles
|
||||
class vehicleGunnerEnabled {
|
||||
displayName = "Enabled For Vehicle Gunners";
|
||||
@ -44,35 +50,38 @@ class CfgVehicles {
|
||||
};
|
||||
*/
|
||||
class ammoTemperatureEnabled {
|
||||
displayName = "Enable Ammo Temperature Simulation";
|
||||
description = "Muzzle velocity varies with ammo temperature";
|
||||
displayName = "$STR_ACE_AdvancedBallistics_ammoTemperatureEnabled_DisplayName";
|
||||
description = "$STR_ACE_AdvancedBallistics_ammoTemperatureEnabled_Description";
|
||||
typeName = "BOOL";
|
||||
defaultValue = 1;
|
||||
};
|
||||
class barrelLengthInfluenceEnabled {
|
||||
displayName = "Enable Barrel Length Simulation";
|
||||
description = "Muzzle velocity varies with barrel length";
|
||||
displayName = "$STR_ACE_AdvancedBallistics_barrelLengthInfluenceEnabled_DisplayName";
|
||||
description = "$STR_ACE_AdvancedBallistics_barrelLengthInfluenceEnabled_Description";
|
||||
typeName = "BOOL";
|
||||
defaultValue = 1;
|
||||
};
|
||||
class bulletTraceEnabled {
|
||||
displayName = "Enable Bullet Trace Effect";
|
||||
description = "Enables a bullet trace effect to high caliber bullets (only visible when looking through high power optics)";
|
||||
displayName = "$STR_ACE_AdvancedBallistics_bulletTraceEnabled_DisplayName";
|
||||
description = "$STR_ACE_AdvancedBallistics_bulletTraceEnabled_Description";
|
||||
typeName = "BOOL";
|
||||
defaultValue = 1;
|
||||
};
|
||||
class simulationInterval {
|
||||
displayName = "Simulation Interval";
|
||||
description = "Defines the interval between every calculation step";
|
||||
displayName = "$STR_ACE_AdvancedBallistics_simulationInterval_DisplayName";
|
||||
description = "$STR_ACE_AdvancedBallistics_simulationInterval_Description";
|
||||
typeName = "NUMBER";
|
||||
defaultValue = 0.0;
|
||||
};
|
||||
class simulationRadius {
|
||||
displayName = "Simulation Radius";
|
||||
description = "Defines the radius around the player (in meters) at which advanced ballistics are applied to projectiles";
|
||||
displayName = "$STR_ACE_AdvancedBallistics_simulationRadius_DisplayName";
|
||||
description = "$STR_ACE_AdvancedBallistics_simulationRadius_Description";
|
||||
typeName = "NUMBER";
|
||||
defaultValue = 3000;
|
||||
};
|
||||
};
|
||||
class ModuleDescription {
|
||||
description = "$STR_ACE_AdvancedBallistics_Description";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
@ -5,7 +5,7 @@
|
||||
GVAR(currentbulletID) = -1;
|
||||
|
||||
GVAR(Protractor) = false;
|
||||
GVAR(ProtractorStart) = time;
|
||||
GVAR(ProtractorStart) = ACE_time;
|
||||
|
||||
GVAR(currentGrid) = 0;
|
||||
GVAR(initMessageEnabled) = false;
|
||||
|
@ -35,16 +35,18 @@ if (!([_unit] call EFUNC(common,isPlayer))) exitWith {};
|
||||
if (underwater _unit) exitWith {};
|
||||
if (!(_ammo isKindOf "BulletBase")) exitWith {};
|
||||
if (_unit distance ACE_player > GVAR(simulationRadius)) exitWith {};
|
||||
if (GVAR(onlyActiveForLocalPlayers) && !(local _unit)) then {
|
||||
if (GVAR(alwaysSimulateForSnipers)) then {
|
||||
// The shooter is non local
|
||||
if (!GVAR(simulateForEveryone) && !(local _unit)) then {
|
||||
// The shooter is non local
|
||||
_abort = true;
|
||||
if (GVAR(simulateForSnipers)) then {
|
||||
if (currentWeapon _unit == primaryWeapon _unit && count primaryWeaponItems _unit > 2) then {
|
||||
_opticsName = (primaryWeaponItems _unit) select 2;
|
||||
_opticType = getNumber(configFile >> "CfgWeapons" >> _opticsName >> "ItemInfo" >> "opticType");
|
||||
_abort = _opticType != 2; // We only abort if the non local shooter is not a sniper
|
||||
};
|
||||
} else {
|
||||
_abort = true;
|
||||
};
|
||||
if (GVAR(simulateForGroupMembers) && _abort) then {
|
||||
_abort = (group ACE_player) != (group _unit);
|
||||
};
|
||||
};
|
||||
//if (!GVAR(vehicleGunnerEnabled) && !(_unit isKindOf "Man")) then { _abort = true; }; // We currently do not have firedEHs on vehicles
|
||||
@ -76,7 +78,7 @@ if (GVAR(barrelLengthInfluenceEnabled)) then {
|
||||
};
|
||||
|
||||
if (GVAR(ammoTemperatureEnabled)) then {
|
||||
_temperature = GET_TEMPERATURE_AT_HEIGHT((getPosASL _unit) select 2);
|
||||
_temperature = ((getPosASL _unit) select 2) call EFUNC(weather,calculateTemperatureAtHeight);
|
||||
_muzzleVelocityShift = [_AmmoCacheEntry select 9, _temperature] call FUNC(calculateAmmoTemperatureVelocityShift);
|
||||
if (_muzzleVelocityShift != 0) then {
|
||||
_bulletVelocity = _bulletVelocity vectorAdd ((vectorNormalized _bulletVelocity) vectorMultiply (_muzzleVelocityShift));
|
||||
@ -105,14 +107,14 @@ _barrelTwist = _WeaponCacheEntry select 0;
|
||||
_stabilityFactor = 1.5;
|
||||
|
||||
if (_caliber > 0 && _bulletLength > 0 && _bulletMass > 0 && _barrelTwist > 0) then {
|
||||
_temperature = GET_TEMPERATURE_AT_HEIGHT((getPosASL _unit) select 2);
|
||||
_temperature = ((getPosASL _unit) select 2) call EFUNC(weather,calculateTemperatureAtHeight);
|
||||
_barometricPressure = ((getPosASL _bullet) select 2) call EFUNC(weather,calculateBarometricPressure);
|
||||
_stabilityFactor = [_caliber, _bulletLength, _bulletMass, _barrelTwist, _muzzleVelocity, _temperature, _barometricPressure] call FUNC(calculateStabilityFactor);
|
||||
};
|
||||
|
||||
GVAR(currentbulletID) = (GVAR(currentbulletID) + 1) % 10000;
|
||||
|
||||
"ace_advanced_ballistics" callExtension format["new:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:%11:%12:%13:%14:%15:%16:%17:%18", GVAR(currentbulletID), _AmmoCacheEntry select 0, _AmmoCacheEntry select 6, _AmmoCacheEntry select 7, _AmmoCacheEntry select 8, _AmmoCacheEntry select 5, _stabilityFactor, _WeaponCacheEntry select 1, _muzzleVelocity, _AmmoCacheEntry select 4, getPosASL _bullet, EGVAR(weather,Latitude), EGVAR(weather,currentTemperature), EGVAR(weather,Altitude), EGVAR(weather,currentHumidity), overcast, floor(time), time - floor(time)];
|
||||
"ace_advanced_ballistics" callExtension format["new:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:%11:%12:%13:%14:%15:%16:%17:%18", GVAR(currentbulletID), _AmmoCacheEntry select 0, _AmmoCacheEntry select 6, _AmmoCacheEntry select 7, _AmmoCacheEntry select 8, _AmmoCacheEntry select 5, _stabilityFactor, _WeaponCacheEntry select 1, _muzzleVelocity, _AmmoCacheEntry select 4, getPosASL _bullet, EGVAR(weather,Latitude), EGVAR(weather,currentTemperature), EGVAR(weather,Altitude), EGVAR(weather,currentHumidity), overcast, floor(ACE_time), ACE_time - floor(ACE_time)];
|
||||
|
||||
[{
|
||||
private ["_args", "_index", "_bullet", "_caliber", "_bulletTraceVisible", "_bulletVelocity", "_bulletPosition"];
|
||||
@ -132,9 +134,9 @@ GVAR(currentbulletID) = (GVAR(currentbulletID) + 1) % 10000;
|
||||
};
|
||||
|
||||
if (_bulletTraceVisible && _bulletSpeed > 600) then {
|
||||
drop ["\A3\data_f\ParticleEffects\Universal\Refract","","Billboard",1,0.1,getPos _bullet,[0,0,0],0,1.275,1,0,[0.0157480315*_caliber,0.00787401574*_caliber],[[0,0,0,0.6],[0,0,0,0.4]],[1,0],0,0,"","",""];
|
||||
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.6],[0,0,0,0.4]],[1,0],0,0,"","",""];
|
||||
};
|
||||
|
||||
call compile ("ace_advanced_ballistics" callExtension format["simulate:%1:%2:%3:%4:%5:%6:%7", _index, _bulletVelocity, _bulletPosition, ACE_wind, ASLToATL(_bulletPosition) select 2, floor(time), time - floor(time)]);
|
||||
call compile ("ace_advanced_ballistics" callExtension format["simulate:%1:%2:%3:%4:%5:%6:%7", _index, _bulletVelocity, _bulletPosition, ACE_wind, ASLToATL(_bulletPosition) select 2, floor(ACE_time), ACE_time - floor(ACE_time)]);
|
||||
|
||||
}, GVAR(simulationInterval), [_bullet, _caliber, _bulletTraceVisible, GVAR(currentbulletID)]] call CBA_fnc_addPerFrameHandler;
|
||||
|
@ -26,9 +26,10 @@ if !(_activated) exitWith {};
|
||||
[_logic, QGVAR(ammoTemperatureEnabled), "ammoTemperatureEnabled"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(barrelLengthInfluenceEnabled), "barrelLengthInfluenceEnabled"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(bulletTraceEnabled), "bulletTraceEnabled"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(onlyActiveForLocalPlayers), "onlyActiveForLocalPlayers"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(simulateForEveryone), "simulateForEveryone"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(disabledInFullAutoMode), "disabledInFullAutoMode"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(alwaysSimulateForSnipers), "alwaysSimulateForSnipers"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(simulateForSnipers), "simulateForSnipers"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(simulateForGroupMembers), "simulateForGroupMembers"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(simulationInterval), "simulationInterval"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(simulationRadius), "simulationRadius"] call EFUNC(common,readSettingFromModule);
|
||||
|
||||
|
@ -18,7 +18,7 @@ if (!GVAR(extensionAvailable)) exitWith {};
|
||||
|
||||
private ["_initStartTime", "_mapSize", "_mapGrids", "_gridCells", "_x", "_y", "_gridCenter", "_gridHeight", "_gridNumObjects", "_gridSurfaceIsWater"];
|
||||
|
||||
_initStartTime = time;
|
||||
_initStartTime = ACE_time;
|
||||
_mapSize = getNumber (configFile >> "CfgWorlds" >> worldName >> "MapSize");
|
||||
|
||||
if (("ace_advanced_ballistics" callExtension format["init:%1:%2", worldName, _mapSize]) == "Terrain already initialized") exitWith {
|
||||
@ -41,7 +41,7 @@ GVAR(currentGrid) = 0;
|
||||
|
||||
if (GVAR(currentGrid) >= _gridCells) exitWith {
|
||||
if (GVAR(initMessageEnabled)) then {
|
||||
systemChat format["AdvancedBallistics: Finished terrain initialization in %1 seconds", ceil(time - _initStartTime)];
|
||||
systemChat format["AdvancedBallistics: Finished terrain initialization in %1 seconds", ceil(ACE_time - _initStartTime)];
|
||||
};
|
||||
[_this select 1] call cba_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Reads the weapon class config and updates the config cache
|
||||
*
|
||||
* Arguments:
|
||||
* 0: ammo - classname <string>
|
||||
* 0: weapon - classname <string>
|
||||
*
|
||||
* Return Value:
|
||||
* 0: [_barrelTwist, _twistDirection, _barrelLength] <ARRAY>
|
||||
|
@ -21,6 +21,5 @@
|
||||
#define SPECIFIC_GAS_CONSTANT_DRY_AIR 287.058
|
||||
#define STD_AIR_DENSITY_ICAO 1.22498
|
||||
#define STD_AIR_DENSITY_ASM 1.20885
|
||||
#define GET_TEMPERATURE_AT_HEIGHT(h) (EGVAR(weather,currentTemperature) - 0.0065 * (h))
|
||||
|
||||
#define EXTENSION_REQUIRED_VERSION "1.0"
|
||||
|
@ -25,5 +25,118 @@
|
||||
<Czech>Zobrazit úhloměr</Czech>
|
||||
<Portuguese>Mostrar Transferidor</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_AdvancedBallistics_DisplayName">
|
||||
<English>Advanced Ballistics</English>
|
||||
<Polish>Zaawansowana balistyka</Polish>
|
||||
<Spanish>Balística avanzada</Spanish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_AdvancedBallistics_enabled_DisplayName">
|
||||
<English>Advanced Ballistics</English>
|
||||
<Polish>Zaawansowana balistyka</Polish>
|
||||
<Spanish>Balística avanzada</Spanish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_AdvancedBallistics_enabled_Description">
|
||||
<English>Enables advanced ballistics</English>
|
||||
<Polish>Aktywuje zaawansowaną balistykę</Polish>
|
||||
<Spanish>Activa la balística avanzada</Spanish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_AdvancedBallistics_simulateForSnipers_DisplayName">
|
||||
<English>Enabled For Snipers</English>
|
||||
<Spanish>Activada para francotiradores</Spanish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_AdvancedBallistics_simulateForSnipers_Description">
|
||||
<English>Enables advanced ballistics for non local snipers (when using high power optics)</English>
|
||||
<Spanish>Activa la balística avanzada para francotiradores no locales (cuando se usa una mira telescópica)</Spanish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_AdvancedBallistics_simulateForGroupMembers_DisplayName">
|
||||
<English>Enabled For Group Members</English>
|
||||
<Spanish>Activada para miembros de grupo</Spanish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_AdvancedBallistics_simulateForGroupMembers_Description">
|
||||
<English>Enables advanced ballistics for non local group members</English>
|
||||
<Spanish>Activada la balística avanzada para miembros de grupo no locales</Spanish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_AdvancedBallistics_simulateForEveryone_DisplayName">
|
||||
<English>Enabled For Everyone</English>
|
||||
<Spanish>Activada para todos</Spanish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_AdvancedBallistics_simulateForEveryone_Description">
|
||||
<English>Enables advanced ballistics for all non local players (enabling this may degrade performance during heavy firefights in multiplayer)</English>
|
||||
<Spanish>Activada la balística avanzada para todos los jugadores no locales (activarlo puede degradar el rendimiento durante grandes tiroteos en multijugador).</Spanish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_AdvancedBallistics_alwaysSimulateForGroupMembers_DisplayName">
|
||||
<English>Always Enabled For Group Members</English>
|
||||
<Polish>Zawsze akt. dla czł. grupy</Polish>
|
||||
<Spanish>Siempre activada para miembros de grupo</Spanish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_AdvancedBallistics_alwaysSimulateForGroupMembers_Description">
|
||||
<English>Always enables advanced ballistics when a group member fires</English>
|
||||
<Polish>Aktywuje zaawansowaną balistykę dla wszystkich członków grupy</Polish>
|
||||
<Spanish>Activada la balística avanzada siempre cuando miembros de grupo disparan</Spanish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_AdvancedBallistics_disabledInFullAutoMod_DisplayName">
|
||||
<English>Disabled In FullAuto Mode</English>
|
||||
<Polish>Wył. podczas ognia auto.</Polish>
|
||||
<Spanish>Desactivada en modo automático</Spanish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_AdvancedBallistics_disabledInFullAutoMod_Description">
|
||||
<English>Disables the advanced ballistics during full auto fire</English>
|
||||
<Polish>Dezaktywuje zaawansowaną balistykę podczas ognia automatycznego</Polish>
|
||||
<Spanish>Desactivada la balística avanzada durante el fuego automático</Spanish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_AdvancedBallistics_ammoTemperatureEnabled_DisplayName">
|
||||
<English>Enable Ammo Temperature Simulation</English>
|
||||
<Polish>Symulacja temp. amunicji</Polish>
|
||||
<Spanish>Activar simulación de temperatura de munición</Spanish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_AdvancedBallistics_ammoTemperatureEnabled_Description">
|
||||
<English>Muzzle velocity varies with ammo temperature</English>
|
||||
<Polish>Prędkość wylotowa pocisku jest zależna od temperatury amunicji</Polish>
|
||||
<Spanish>La velocidad de salida varía con la temperatura de la munición</Spanish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_AdvancedBallistics_barrelLengthInfluenceEnabled_DisplayName">
|
||||
<English>Enable Barrel Length Simulation</English>
|
||||
<Polish>Symulacja długości lufy</Polish>
|
||||
<Spanish>Habilitar la simulación de longitud del cañón</Spanish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_AdvancedBallistics_barrelLengthInfluenceEnabled_Description">
|
||||
<English>Muzzle velocity varies with barrel length</English>
|
||||
<Polish>Prędkość wylotowa pocisku jest zależna od długości lufy</Polish>
|
||||
<Spanish>La velocidad de salidal varía con la longitud del cañón</Spanish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_AdvancedBallistics_bulletTraceEnabled_DisplayName">
|
||||
<English>Enable Bullet Trace Effect</English>
|
||||
<Polish>Efekt smugi pocisku</Polish>
|
||||
<Spanish>Activar el efecto trazador de la bala</Spanish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_AdvancedBallistics_bulletTraceEnabled_Description">
|
||||
<English>Enables a bullet trace effect to high caliber bullets (only visible when looking through high power optics)</English>
|
||||
<Polish>Aktywuje efekt smugi pocisku dla pocisków wysokokalibrowych (widoczne tylko podczas patrzenia przez optykę)</Polish>
|
||||
<Spanish>Activa el efecto trazador de la balas de gran calibre (solo visible cuando se mira a través de una mira telescópica)</Spanish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_AdvancedBallistics_simulationInterval_DisplayName">
|
||||
<English>Simulation Interval</English>
|
||||
<Polish>Interwał symulacji</Polish>
|
||||
<Spanish>Intervalo de simulación</Spanish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_AdvancedBallistics_simulationInterval_Description">
|
||||
<English>Defines the interval between every calculation step</English>
|
||||
<Polish>Określa interwał pomiędzy każdym krokiem kalkulacji</Polish>
|
||||
<Spanish>Define el intervalo entre cada cálculo</Spanish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_AdvancedBallistics_simulationRadius_DisplayName">
|
||||
<English>Simulation Radius</English>
|
||||
<Polish>Zasięg symulacji</Polish>
|
||||
<Spanish>Radio de simulación</Spanish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_AdvancedBallistics_simulationRadius_Description">
|
||||
<English>Defines the radius around the player (in meters) at which advanced ballistics are applied to projectiles</English>
|
||||
<Polish>Określa obszar naokoło gracza (w metrach), na którym zaawansowana balistyka jest aplikowana dla pocisków</Polish>
|
||||
<Spanish>Define el radio alrededor del jugador (en metros) en el cual se aplica la balística avanzada a los proyectiles</Spanish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_AdvancedBallistics_Description">
|
||||
<English></English>
|
||||
<Polish>Moduł ten pozwala aktywować zaawansowaną balistykę biorącą przy obliczeniach trajektorii lotu pocisku pod uwagę takie rzeczy jak temperatura powietrza, ciśnienie atmosferyczne, wilgotność powietrza, siły Coriolisa i Eotvosa, grawitację a także broń z jakiej wykonywany jest strzał oraz rodzaj amunicji. Wszystko to sprowadza się na bardzo dokładne odwzorowanie balistyki.</Polish>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
</Project>
|
||||
|
@ -1,5 +1,5 @@
|
||||
#define COMPONENT ai
|
||||
#include "\z\ace\Addons\main\script_mod.hpp"
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
#ifdef DEBUG_ENABLED_AI
|
||||
#define DEBUG_MODE_FULL
|
||||
@ -9,4 +9,4 @@
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_AI
|
||||
#endif
|
||||
|
||||
#include "\z\ace\Addons\main\script_macros.hpp"
|
||||
#include "\z\ace\addons\main\script_macros.hpp"
|
@ -152,7 +152,7 @@ class ATragMX_Display {
|
||||
type=0;
|
||||
font="TahomaB";
|
||||
SizeEX=0.025;
|
||||
idc=-1;
|
||||
idc=720000;
|
||||
style=48;
|
||||
x=0.55*safezoneW+safezoneX-0.256;
|
||||
y=0.265*safezoneH+safezoneY-0.1;
|
||||
@ -160,7 +160,7 @@ class ATragMX_Display {
|
||||
h=1.024*4/3;
|
||||
colorBackground[]={1,1,1,1};
|
||||
colorText[]={1,1,1,1};
|
||||
text=PATHTOF(UI\atrag.paa);
|
||||
text=PATHTOF(UI\atrag_d.paa);
|
||||
};
|
||||
class POWER: ATragMX_RscButton {
|
||||
idc=-1;
|
||||
|
BIN
addons/atragmx/UI/ATRAG_N.paa
Normal file
BIN
addons/atragmx/UI/ATRAG_N.paa
Normal file
Binary file not shown.
@ -6,41 +6,41 @@ if ((profileNamespace getVariable ["ACE_ATragMX_profileNamespaceVersion", 0]) ==
|
||||
GVAR(gunList) = profileNamespace getVariable "ACE_ATragMX_gunList";
|
||||
} else {
|
||||
// Profile Name, Muzzle Velocity, Zero Range, Scope Base Angle, AirFriction, Bore Height, Scope Unit, Scope Click Unit, Scope Click Number, Maximum Elevation, Dialed Elevation, Dialed Windage, Mass, Bullet Diameter, Rifle Twist, BC, Drag Model, Atmosphere Model
|
||||
GVAR(gunList) = [["12.7x108mm" , 820, 100, 0.0657, -0.0006400, 3.81, 0, 2, 10, 120, 0, 0, 48.28, 12.7, 38.10, 0.630, 1, "ASM" ],
|
||||
GVAR(gunList) = [["12.7x108mm" , 820, 100, 0.0657, -0.0006469, 3.81, 0, 2, 10, 120, 0, 0, 48.28, 12.7, 38.10, 0.630, 1, "ASM" ],
|
||||
|
||||
["12.7x99mm AMAX" , 860, 100, 0.0612, -0.0003740, 3.81, 0, 2, 10, 120, 0, 0, 48.60, 12.7, 38.10, 1.050, 1, "ASM" ],
|
||||
["12.7x99mm" , 900, 100, 0.0623, -0.0006000, 3.81, 0, 2, 10, 120, 0, 0, 41.92, 12.7, 38.10, 0.670, 1, "ASM" ],
|
||||
["12.7x99mm AMAX" , 860, 100, 0.0612, -0.0003722, 3.81, 0, 2, 10, 120, 0, 0, 48.60, 12.7, 38.10, 1.050, 1, "ASM" ],
|
||||
["12.7x99mm" , 900, 100, 0.0623, -0.0005942, 3.81, 0, 2, 10, 120, 0, 0, 41.92, 12.7, 38.10, 0.670, 1, "ASM" ],
|
||||
|
||||
["12.7x54mm" , 300, 100, 0.3395, -0.0001400, 3.81, 0, 2, 10, 120, 0, 0, 48.60, 12.7, 24.13, 1.050, 1, "ASM" ],
|
||||
["12.7x54mm" , 300, 100, 0.3395, -0.0001877, 3.81, 0, 2, 10, 120, 0, 0, 48.60, 12.7, 24.13, 1.050, 1, "ASM" ],
|
||||
|
||||
[".408 Chey Tac" , 910, 100, 0.0571, -0.0003950, 3.81, 0, 2, 10, 120, 0, 0, 27.15, 10.4, 33.02, 0.970, 1, "ASM" ],
|
||||
[".408 Chey Tac" , 910, 100, 0.0571, -0.0003958, 3.81, 0, 2, 10, 120, 0, 0, 27.15, 10.4, 33.02, 0.970, 1, "ASM" ],
|
||||
|
||||
["9.3×64mm" , 870, 100, 0.0619, -0.0010600, 3.81, 0, 2, 10, 120, 0, 0, 14.90, 9.30, 35.56, 0.368, 1, "ASM" ],
|
||||
["9.3×64mm" , 870, 100, 0.0619, -0.0010921, 3.81, 0, 2, 10, 120, 0, 0, 14.90, 9.30, 35.56, 0.368, 1, "ASM" ],
|
||||
|
||||
[".338LM 250gr" , 880, 100, 0.0598, -0.0006060, 3.81, 0, 2, 10, 120, 0, 0, 16.20, 8.58, 25.40, 0.322, 7, "ICAO"],
|
||||
[".338LM 300gr" , 800, 100, 0.0677, -0.0005350, 3.81, 0, 2, 10, 120, 0, 0, 19.44, 8.58, 25.40, 0.381, 7, "ICAO"],
|
||||
[".338LM API526" , 895, 100, 0.0601, -0.0006730, 3.81, 0, 2, 10, 120, 0, 0, 16.39, 8.58, 25.40, 0.560, 1, "ASM" ],
|
||||
[".338LM 250gr" , 880, 100, 0.0598, -0.0006234, 3.81, 0, 2, 10, 120, 0, 0, 16.20, 8.58, 25.40, 0.322, 7, "ICAO"],
|
||||
[".338LM 300gr" , 800, 100, 0.0677, -0.0005397, 3.81, 0, 2, 10, 120, 0, 0, 19.44, 8.58, 25.40, 0.381, 7, "ICAO"],
|
||||
[".338LM API526" , 895, 100, 0.0601, -0.0007120, 3.81, 0, 2, 10, 120, 0, 0, 16.39, 8.58, 25.40, 0.560, 1, "ASM" ],
|
||||
|
||||
[".300WM Mk248 Mod 0", 900, 100, 0.0584, -0.0008300, 3.81, 0, 2, 10, 120, 0, 0, 13.31, 7.80, 25.40, 0.268, 7, "ICAO"],
|
||||
[".300WM Mk248 Mod 1", 867, 100, 0.0611, -0.0008150, 3.81, 0, 2, 10, 120, 0, 0, 14.26, 7.80, 25.40, 0.310, 7, "ICAO"],
|
||||
[".300WM Berger OTM" , 853, 100, 0.0622, -0.0007600, 3.81, 0, 2, 10, 120, 0, 0, 14.90, 7.80, 25.40, 0.368, 7, "ICAO"],
|
||||
[".300WM Mk248 Mod 0", 900, 100, 0.0584, -0.0007305, 3.81, 0, 2, 10, 120, 0, 0, 13.31, 7.80, 25.40, 0.268, 7, "ICAO"],
|
||||
[".300WM Mk248 Mod 1", 867, 100, 0.0611, -0.0006326, 3.81, 0, 2, 10, 120, 0, 0, 14.26, 7.80, 25.40, 0.310, 7, "ICAO"],
|
||||
[".300WM Berger OTM" , 853, 100, 0.0622, -0.0005271, 3.81, 0, 2, 10, 120, 0, 0, 14.90, 7.80, 25.40, 0.368, 7, "ICAO"],
|
||||
|
||||
["7.62x54mmR" , 800, 100, 0.0692, -0.0010230, 3.81, 0, 2, 10, 120, 0, 0, 9.849, 7.92, 24.13, 0.400, 1, "ICAO"],
|
||||
["7.62x54mmR" , 800, 100, 0.0692, -0.0010165, 3.81, 0, 2, 10, 120, 0, 0, 9.849, 7.92, 24.13, 0.400, 1, "ICAO"],
|
||||
|
||||
["7.62x51mm M80" , 810, 100, 0.0679, -0.0010350, 3.81, 0, 2, 10, 120, 0, 0, 9.525, 7.82, 25.40, 0.200, 7, "ICAO"],
|
||||
["7.62x51mm M118LR" , 780, 100, 0.0710, -0.0008525, 3.81, 0, 2, 10, 120, 0, 0, 11.34, 7.82, 25.40, 0.243, 7, "ICAO"],
|
||||
["7.62x51mm Mk319" , 910, 100, 0.0585, -0.0010300, 3.81, 0, 2, 10, 120, 0, 0, 8.424, 7.82, 25.40, 0.377, 1, "ICAO"],
|
||||
["7.62x51mm M993" , 930, 100, 0.0585, -0.0010300, 3.81, 0, 2, 10, 120, 0, 0, 8.230, 7.82, 25.40, 0.359, 1, "ICAO"],
|
||||
["7.62x51mm Subsonic", 320, 100, 0.3060, -0.0004910, 3.81, 0, 2, 10, 120, 0, 0, 12.96, 7.82, 25.40, 0.235, 7, "ICAO"],
|
||||
["7.62x51mm M80" , 810, 100, 0.0679, -0.0010319, 3.81, 0, 2, 10, 120, 0, 0, 9.525, 7.82, 25.40, 0.200, 7, "ICAO"],
|
||||
["7.62x51mm M118LR" , 780, 100, 0.0710, -0.0008497, 3.81, 0, 2, 10, 120, 0, 0, 11.34, 7.82, 25.40, 0.243, 7, "ICAO"],
|
||||
["7.62x51mm Mk319" , 910, 100, 0.0585, -0.0010435, 3.81, 0, 2, 10, 120, 0, 0, 8.424, 7.82, 25.40, 0.377, 1, "ICAO"],
|
||||
["7.62x51mm M993" , 930, 100, 0.0585, -0.0010914, 3.81, 0, 2, 10, 120, 0, 0, 8.230, 7.82, 25.40, 0.359, 1, "ICAO"],
|
||||
["7.62x51mm Subsonic", 320, 100, 0.3060, -0.0004145, 3.81, 0, 2, 10, 120, 0, 0, 12.96, 7.82, 25.40, 0.235, 7, "ICAO"],
|
||||
|
||||
["6.5x39mm" , 800, 100, 0.0683, -0.0007850, 3.81, 0, 2, 10, 120, 0, 0, 7.970, 6.71, 22.86, 0.263, 7, "ICAO"],
|
||||
["6.5x47mm Lapua" , 800, 100, 0.0682, -0.0007710, 3.81, 0, 2, 10, 120, 0, 0, 9.007, 6.71, 22.86, 0.290, 7, "ICAO"],
|
||||
["6.5mm Creedmor" , 840, 100, 0.0637, -0.0006510, 3.81, 0, 2, 10, 120, 0, 0, 9.072, 6.71, 22.86, 0.317, 7, "ICAO"],
|
||||
["6.5x39mm" , 800, 100, 0.0683, -0.0007728, 3.81, 0, 2, 10, 120, 0, 0, 7.970, 6.71, 22.86, 0.263, 7, "ICAO"],
|
||||
["6.5x47mm Lapua" , 800, 100, 0.0682, -0.0006977, 3.81, 0, 2, 10, 120, 0, 0, 9.007, 6.71, 22.86, 0.290, 7, "ICAO"],
|
||||
["6.5mm Creedmor" , 840, 100, 0.0637, -0.0006136, 3.81, 0, 2, 10, 120, 0, 0, 9.072, 6.71, 22.86, 0.317, 7, "ICAO"],
|
||||
|
||||
["5.56x45mm M855" , 870, 100, 0.0626, -0.0012650, 3.81, 0, 2, 10, 120, 0, 0, 4.018, 5.70, 17.78, 0.151, 7, "ASM" ],
|
||||
["5.56x45mm Mk262" , 820, 100, 0.0671, -0.0011250, 3.81, 0, 2, 10, 120, 0, 0, 4.990, 5.70, 17.78, 0.361, 1, "ASM" ],
|
||||
["5.56x45mm Mk318" , 880, 100, 0.0616, -0.0011200, 3.81, 0, 2, 10, 120, 0, 0, 4.018, 5.70, 17.78, 0.307, 1, "ASM" ],
|
||||
["5.56x45mm M995" , 869, 100, 0.0616, -0.0011200, 3.81, 0, 2, 10, 120, 0, 0, 4.536, 5.70, 17.78, 0.310, 1, "ASM" ]];
|
||||
["5.56x45mm M855" , 870, 100, 0.0626, -0.0013685, 3.81, 0, 2, 10, 120, 0, 0, 4.018, 5.70, 17.78, 0.151, 7, "ASM" ],
|
||||
["5.56x45mm Mk262" , 820, 100, 0.0671, -0.0011287, 3.81, 0, 2, 10, 120, 0, 0, 4.990, 5.70, 17.78, 0.361, 1, "ASM" ],
|
||||
["5.56x45mm Mk318" , 880, 100, 0.0616, -0.0013064, 3.81, 0, 2, 10, 120, 0, 0, 4.018, 5.70, 17.78, 0.307, 1, "ASM" ],
|
||||
["5.56x45mm M995" , 869, 100, 0.0616, -0.0012972, 3.81, 0, 2, 10, 120, 0, 0, 4.536, 5.70, 17.78, 0.310, 1, "ASM" ]];
|
||||
|
||||
[] call FUNC(clear_user_data);
|
||||
profileNamespace setVariable ["ACE_ATragMX_gunList", GVAR(gunList)];
|
||||
|
@ -4,7 +4,6 @@ ADDON = false;
|
||||
|
||||
PREP(add_new_gun);
|
||||
PREP(calculate_range_card);
|
||||
PREP(calculate_scope_base_angle);
|
||||
PREP(calculate_solution);
|
||||
PREP(calculate_target_range_assist);
|
||||
PREP(calculate_target_solution);
|
||||
|
@ -1,40 +0,0 @@
|
||||
/*
|
||||
* Author: Ruthberg
|
||||
* Calculates a new scope base angle
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Bullet mass <NUMBER>
|
||||
* 1: Bore height <NUMBER>
|
||||
* 2: air friction <NUMBER>
|
||||
* 3: muzzle velocity <NUMBER>
|
||||
* 4: zero range <NUMBER>
|
||||
*
|
||||
* Return Value:
|
||||
* scope base angle <NUMBER>
|
||||
*
|
||||
* Example:
|
||||
* call ace_atragmx_calculate_scope_base_angle
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_bulletMass", "_boreHeight", "_airFriction", "_muzzleVelocity", "_zeroRange"];
|
||||
_bulletMass = _this select 0;
|
||||
_boreHeight = _this select 1;
|
||||
_airFriction = _this select 2;
|
||||
_muzzleVelocity = _this select 3;
|
||||
_zeroRange = _this select 4;
|
||||
|
||||
private ["_scopeBaseAngle"];
|
||||
_scopeBaseAngle = 0;
|
||||
|
||||
private ["_temperature", "_barometricPressure", "_relativeHumidity"];
|
||||
_temperature = 15;
|
||||
_barometricPressure = 1013.25;
|
||||
_relativeHumidity = 0;
|
||||
|
||||
private ["_result"];
|
||||
_result = [_scopeBaseAngle, _bulletMass, _boreHeight, _airFriction, _muzzleVelocity, _temperature, _barometricPressure, _relativeHumidity, 1000, [0, 0], 0, 0, 0, _zeroRange, _airFriction, 1, "ICAO", false, 1.5, 0, 0, 0] call FUNC(calculate_solution);
|
||||
|
||||
_scopeBaseAngle + (_result select 0) / 60
|
@ -37,7 +37,7 @@
|
||||
* 8: Spin drift (MOA) <NUMBER>
|
||||
*
|
||||
* Example:
|
||||
* call ace_atragmx_calculate_target_range_assist
|
||||
* call ace_atragmx_calculate_solution
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
@ -15,6 +15,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
#define __dsp (uiNamespace getVariable "ATragMX_Display")
|
||||
#define __ctrlBackground (__dsp displayCtrl 720000)
|
||||
|
||||
if (GVAR(active)) exitWith { false };
|
||||
if (underwater ACE_player) exitWith { false };
|
||||
if (!("ACE_ATragMX" in (uniformItems ACE_player)) && !("ACE_ATragMX" in (vestItems ACE_player))) exitWith { false };
|
||||
@ -49,4 +52,11 @@ GVAR(showTargetSpeedAssistTimer) call FUNC(show_target_speed_assist_timer);
|
||||
|
||||
GVAR(active) = true;
|
||||
|
||||
GVAR(DialogPFH) = [{
|
||||
if (!GVAR(active)) exitWith {
|
||||
[_this select 1] call cba_fnc_removePerFrameHandler;
|
||||
};
|
||||
__ctrlBackground ctrlSetText format [QUOTE(PATHTOF(UI\ATRAG_%1.paa)), ["N", "D"] select (call EFUNC(common,ambientBrightness))];
|
||||
}, 60, []] call cba_fnc_addPerFrameHandler;
|
||||
|
||||
true
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
uiNamespace setVariable ['ATragMX_Display', nil];
|
||||
GVAR(active) = false;
|
||||
GVAR(active) = false;
|
||||
[GVAR(DialogPFH)] call cba_fnc_removePerFrameHandler;
|
@ -59,7 +59,7 @@ if (GVAR(currentUnit) == 1) then {
|
||||
private ["_boreHeight", "_bulletMass", "_bulletDiameter", "_airFriction", "_rifleTwist", "_muzzleVelocity", "_zeroRange"];
|
||||
_boreHeight = parseNumber(ctrlText 120000);
|
||||
_bulletMass = parseNumber(ctrlText 120010);
|
||||
_bulletDiameter = parseNumber(ctrlText 120020);
|
||||
_bulletDiameter = parseNumber(ctrlText 120020) * 10;
|
||||
if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
|
||||
_airFriction = 0.1 max parseNumber(ctrlText 120030) min 2;
|
||||
} else {
|
||||
@ -71,7 +71,7 @@ _zeroRange = parseNumber (ctrlText 120060);
|
||||
if (GVAR(currentUnit) != 2) then {
|
||||
_boreHeight = _boreHeight * 2.54;
|
||||
_bulletMass = _bulletMass * 0.06479891;
|
||||
_bulletDiameter = _bulletDiameter * 10 * 2.54;
|
||||
_bulletDiameter = _bulletDiameter * 2.54;
|
||||
_rifleTwist = _rifleTwist * 2.54;
|
||||
_muzzleVelocity = _muzzleVelocity / 3.2808399;
|
||||
};
|
||||
@ -95,36 +95,6 @@ if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) t
|
||||
GVAR(workingMemory) set [1, _muzzleVelocity];
|
||||
GVAR(workingMemory) set [2, _zeroRange];
|
||||
|
||||
private ["_elevationCur", "_windageCur", "_clickSize", "_clickNumber", "_clickInterval"];
|
||||
_elevationCur = GVAR(workingMemory) select 10;
|
||||
_windageCur = GVAR(workingMemory) select 11;
|
||||
|
||||
switch (GVAR(currentScopeUnit)) do {
|
||||
case 0: {
|
||||
_elevationCur = _elevationCur * 3.38;
|
||||
_windageCur = _windageCur * 3.38;
|
||||
};
|
||||
case 2: {
|
||||
_elevationCur = _elevationCur / 1.047;
|
||||
_windageCur = _windageCur / 1.047;
|
||||
};
|
||||
case 3: {
|
||||
switch (GVAR(workingMemory) select 7) do {
|
||||
case 0: { _clickSize = 1; };
|
||||
case 1: { _clickSize = 1 / 1.047; };
|
||||
case 2: { _clickSize = 3.38; };
|
||||
};
|
||||
_clickNumber = GVAR(workingMemory) select 8;
|
||||
_clickInterval = _clickSize / _clickNumber;
|
||||
|
||||
_elevationCur = Round(_elevationCur / _clickInterval);
|
||||
_windageCur = Round(_windageCur / _clickInterval);
|
||||
};
|
||||
};
|
||||
|
||||
GVAR(workingMemory) set [10, _elevationCur];
|
||||
GVAR(workingMemory) set [11, _windageCur];
|
||||
|
||||
[] call FUNC(update_gun);
|
||||
[] call FUNC(update_gun_ammo_data);
|
||||
[] call FUNC(update_atmosphere);
|
||||
|
@ -30,7 +30,7 @@ if !(ctrlVisible 9000) then {
|
||||
if (!(GVAR(speedAssistTimer))) exitWith {
|
||||
GVAR(speedAssistTimer) = true;
|
||||
|
||||
ctrlSetText [8006, Str(Round((time - _startTime) * 10) / 10)];
|
||||
ctrlSetText [8006, Str(Round((ACE_time - _startTime) * 10) / 10)];
|
||||
|
||||
[] call FUNC(calculate_target_speed_assist);
|
||||
|
||||
@ -40,7 +40,7 @@ if !(ctrlVisible 9000) then {
|
||||
[_this select 1] call cba_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
ctrlSetText [9001, Str(Round((time - _startTime) * 10) / 10)];
|
||||
ctrlSetText [9001, Str(Round((ACE_time - _startTime) * 10) / 10)];
|
||||
|
||||
}, 0.1, [time]] call CBA_fnc_addPerFrameHandler;
|
||||
}, 0.1, [ACE_time]] call CBA_fnc_addPerFrameHandler;
|
||||
};
|
||||
|
@ -30,7 +30,7 @@ if (GVAR(currentUnit) != 2) then {
|
||||
if (GVAR(currentUnit) != 2) then {
|
||||
ctrlSetText [120020, Str(Round((GVAR(workingMemory) select 13) / 10 / 2.54 * 1000) / 1000)];
|
||||
} else {
|
||||
ctrlSetText [120020, Str(Round((GVAR(workingMemory) select 13) * 1000) / 1000)];
|
||||
ctrlSetText [120020, Str(Round((GVAR(workingMemory) select 13) / 10 * 1000) / 1000)];
|
||||
};
|
||||
if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
|
||||
ctrlSetText [120030, Str(Round((GVAR(workingMemory) select 15) * 1000) / 1000)];
|
||||
|
@ -2,7 +2,10 @@
|
||||
{
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
if (GVAR(active)) exitWith {false};
|
||||
if (GVAR(active)) exitWith {
|
||||
closeDialog 0;
|
||||
false
|
||||
};
|
||||
// Statement
|
||||
[] call FUNC(create_dialog);
|
||||
false
|
||||
|
@ -11,4 +11,4 @@
|
||||
|
||||
#include "\z\ace\addons\main\script_macros.hpp"
|
||||
|
||||
#define ATRAGMX_PROFILE_NAMESPACE_VERSION 1.5
|
||||
#define ATRAGMX_PROFILE_NAMESPACE_VERSION 1.6
|
||||
|
@ -1 +1 @@
|
||||
z\ace\Addons\attach
|
||||
z\ace\addons\attach
|
@ -1,5 +1,5 @@
|
||||
#define COMPONENT attach
|
||||
#include "\z\ace\Addons\main\script_mod.hpp"
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
#ifdef DEBUG_ENABLED_ATTACH
|
||||
#define DEBUG_MODE_FULL
|
||||
@ -9,4 +9,4 @@
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_ATTACH
|
||||
#endif
|
||||
|
||||
#include "\z\ace\Addons\main\script_macros.hpp"
|
||||
#include "\z\ace\addons\main\script_macros.hpp"
|
@ -20,11 +20,11 @@ class CfgAmmo {
|
||||
};
|
||||
|
||||
class B_556x45_Ball : BulletBase {
|
||||
airFriction=-0.001265;
|
||||
airFriction=-0.0013685;
|
||||
hit=8;
|
||||
typicalSpeed=750;
|
||||
tracerStartTime = 0.073; //M856 tracer burns out to 800m
|
||||
tracerEndTime = 1.579; //Time in seconds calculated with ballistics calculator
|
||||
tracerStartTime=0.073; // M856 tracer burns out to 800m
|
||||
tracerEndTime=1.57123; // Time in seconds calculated with ballistics calculator
|
||||
ACE_caliber=5.69;
|
||||
ACE_bulletLength=23.012;
|
||||
ACE_bulletMass=4.0176;
|
||||
@ -37,7 +37,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={210.82, 238.76, 269.24, 299.72, 330.2, 360.68, 391.16, 419.1, 449.58, 480.06, 508.0, 609.6};
|
||||
};
|
||||
class ACE_556x45_Ball_Mk262 : B_556x45_Ball {
|
||||
airFriction=-0.001125;
|
||||
airFriction=-0.0011287;
|
||||
caliber=0.8;
|
||||
deflecting=18;
|
||||
hit=11;
|
||||
@ -54,7 +54,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={190.5, 368.3, 457.2, 508.0};
|
||||
};
|
||||
class ACE_556x45_Ball_Mk318 : B_556x45_Ball {
|
||||
airFriction=-0.001120;
|
||||
airFriction=-0.0013064;
|
||||
caliber=0.8;
|
||||
deflecting=18;
|
||||
hit=9;
|
||||
@ -71,7 +71,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={254.0, 393.7, 508.0};
|
||||
};
|
||||
class ACE_556x45_Ball_M995_AP : B_556x45_Ball {
|
||||
airFriction=-0.001120;
|
||||
airFriction=-0.0012972;
|
||||
caliber=1.6;
|
||||
deflecting=18;
|
||||
hit=6;
|
||||
@ -85,14 +85,14 @@ class CfgAmmo {
|
||||
ACE_standardAtmosphere="ASM";
|
||||
ACE_dragModel=1;
|
||||
ACE_muzzleVelocities[]={820, 865, 880};
|
||||
ACE_barrelLengths[]={254.0, 393.7, 508.0};
|
||||
ACE_barrelLengths[]={254.0, 368.3, 508.0};
|
||||
};
|
||||
class B_556x45_Ball_Tracer_Red;
|
||||
class ACE_B_556x45_Ball_Tracer_Dim: B_556x45_Ball_Tracer_Red {
|
||||
nvgOnly = 1;
|
||||
};
|
||||
class ACE_545x39_Ball_7N6M : B_556x45_Ball {
|
||||
airFriction=-0.001162;
|
||||
airFriction=-0.001222;
|
||||
caliber=0.6;
|
||||
deflecting=18;
|
||||
hit=7;
|
||||
@ -110,13 +110,13 @@ class CfgAmmo {
|
||||
};
|
||||
class B_556x45_Ball_Tracer_Green;
|
||||
class ACE_545x39_Ball_7T3M : B_556x45_Ball_Tracer_Green {
|
||||
airFriction=-0.001162;
|
||||
airFriction=-0.001222;
|
||||
caliber=0.6;
|
||||
deflecting=18;
|
||||
hit=7;
|
||||
typicalSpeed=883;
|
||||
tracerStartTime = 0.073; //7T3M tracer burns out to 850m
|
||||
tracerEndTime = 1.736; //Time in seconds calculated with ballistics calculator
|
||||
tracerStartTime=0.073; // 7T3M tracer burns out to 850m
|
||||
tracerEndTime=1.70236; // Time in seconds calculated with ballistics calculator
|
||||
ACE_caliber=5.588;
|
||||
ACE_bulletLength=21.59;
|
||||
ACE_bulletMass=3.22704;
|
||||
@ -129,7 +129,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={254.0, 414.02, 508.0};
|
||||
};
|
||||
class B_65x39_Caseless : BulletBase {
|
||||
airFriction=-0.000785;
|
||||
airFriction=-0.0007728;
|
||||
typicalSpeed=800;
|
||||
ACE_caliber=6.706;
|
||||
ACE_bulletLength=32.893;
|
||||
@ -151,7 +151,7 @@ class CfgAmmo {
|
||||
nvgOnly = 1;
|
||||
};
|
||||
class ACE_65x47_Ball_Scenar: B_65x39_Caseless {
|
||||
airFriction=-0.00078;
|
||||
airFriction=-0.0006977;
|
||||
typicalSpeed=820 ;
|
||||
caliber=0.9;
|
||||
ACE_caliber=6.706;
|
||||
@ -166,7 +166,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4};
|
||||
};
|
||||
class ACE_65_Creedmor_Ball: B_65x39_Caseless {
|
||||
airFriction=-0.000651;
|
||||
airFriction=-0.0006136;
|
||||
typicalSpeed=860 ;
|
||||
caliber=1.1;
|
||||
ACE_caliber=6.706;
|
||||
@ -181,11 +181,11 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4};
|
||||
};
|
||||
class B_762x51_Ball : BulletBase {
|
||||
airFriction=-0.001035;
|
||||
airFriction=-0.0010319;
|
||||
typicalSpeed=833;
|
||||
hit=9;
|
||||
tracerStartTime = 0.073; //Based on the British L5A1 which burns out to 1000m
|
||||
tracerEndTime = 2.058; //Time in seconds calculated with ballistics calculator
|
||||
tracerStartTime=0.073; // Based on the British L5A1 which burns out to 1000m
|
||||
tracerEndTime=2.15957; // Time in seconds calculated with ballistics calculator
|
||||
ACE_caliber=7.823;
|
||||
ACE_bulletLength=28.956;
|
||||
ACE_bulletMass=9.4608;
|
||||
@ -202,7 +202,7 @@ class CfgAmmo {
|
||||
nvgOnly = 1;
|
||||
};
|
||||
class ACE_762x51_Ball_M118LR : B_762x51_Ball {
|
||||
airFriction=-0.0008525;
|
||||
airFriction=-0.0008497;
|
||||
caliber=1.8;
|
||||
hit=16;
|
||||
typicalSpeed=790;
|
||||
@ -218,7 +218,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4};
|
||||
};
|
||||
class ACE_762x51_Ball_Mk316_Mod_0 : B_762x51_Ball {
|
||||
airFriction=-0.0008525;
|
||||
airFriction=-0.0008421;
|
||||
caliber=1.8;
|
||||
hit=16;
|
||||
typicalSpeed=790;
|
||||
@ -234,7 +234,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4};
|
||||
};
|
||||
class ACE_762x51_Ball_Mk319_Mod_0 : B_762x51_Ball {
|
||||
airFriction=-0.00103;
|
||||
airFriction=-0.0010435;
|
||||
caliber=1.5;
|
||||
hit=14;
|
||||
typicalSpeed=900;
|
||||
@ -250,7 +250,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={330.2, 406.4, 508.0};
|
||||
};
|
||||
class ACE_762x51_Ball_M993_AP : B_762x51_Ball {
|
||||
airFriction=-0.00103;
|
||||
airFriction=-0.0010914;
|
||||
caliber=2.2;
|
||||
hit=11;
|
||||
typicalSpeed=910;
|
||||
@ -266,7 +266,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={330.2, 406.4, 508.0};
|
||||
};
|
||||
class ACE_762x51_Ball_Subsonic : B_762x51_Ball {
|
||||
airFriction=-0.000535;
|
||||
airFriction=-0.0004145;
|
||||
caliber=1;
|
||||
hit=6;
|
||||
typicalSpeed=320;
|
||||
@ -282,7 +282,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4};
|
||||
};
|
||||
class ACE_30_06_M1_Ball : B_762x51_Ball {
|
||||
airFriction=-0.0009;
|
||||
airFriction=-0.0008290;
|
||||
typicalSpeed=800;
|
||||
caliber=2.0;
|
||||
hit=10;
|
||||
@ -298,7 +298,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4};
|
||||
};
|
||||
class ACE_7_Remington_Magnum_Ball : B_762x51_Ball {
|
||||
airFriction=-0.0008;
|
||||
airFriction=-0.0005809;
|
||||
typicalSpeed=820;
|
||||
caliber=2.1;
|
||||
hit=8;
|
||||
@ -314,7 +314,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4};
|
||||
};
|
||||
class ACE_243_Winchester_Ball : B_762x51_Ball {
|
||||
airFriction=-0.00095;
|
||||
airFriction=-0.0007010;
|
||||
typicalSpeed=915;
|
||||
caliber=2.3;
|
||||
hit=6;
|
||||
@ -330,7 +330,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4};
|
||||
};
|
||||
class ACE_762x67_Ball_Mk248_Mod_0 : B_762x51_Ball {
|
||||
airFriction=-0.000830;
|
||||
airFriction=-0.0007305;
|
||||
caliber=1.8;
|
||||
hit=17;
|
||||
typicalSpeed=900;
|
||||
@ -346,7 +346,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={508.0, 609.6, 660.4};
|
||||
};
|
||||
class ACE_762x67_Ball_Mk248_Mod_1 : B_762x51_Ball {
|
||||
airFriction=-0.000815;
|
||||
airFriction=-0.0006326;
|
||||
caliber=1.9;
|
||||
hit=18;
|
||||
typicalSpeed=867;
|
||||
@ -362,7 +362,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={508.0, 609.6, 660.4};
|
||||
};
|
||||
class ACE_762x67_Ball_Berger_Hybrid_OTM : B_762x51_Ball {
|
||||
airFriction=-0.00076;
|
||||
airFriction=-0.0005271;
|
||||
caliber=2.0;
|
||||
hit=19;
|
||||
typicalSpeed=853;
|
||||
@ -378,7 +378,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={508.0, 609.6, 660.4};
|
||||
};
|
||||
class B_762x54_Ball: B_762x51_Ball {
|
||||
airFriction=-0.001023;
|
||||
airFriction=-0.0010165;
|
||||
typicalSpeed=820;
|
||||
ACE_caliber=7.925;
|
||||
ACE_bulletLength=28.956;
|
||||
@ -392,7 +392,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4};
|
||||
};
|
||||
class ACE_762x54_Ball_7N14 : B_762x51_Ball {
|
||||
airFriction=-0.001023;
|
||||
airFriction=-0.0010165;
|
||||
caliber=1.5;
|
||||
hit=15;
|
||||
typicalSpeed=820;
|
||||
@ -409,12 +409,12 @@ class CfgAmmo {
|
||||
};
|
||||
class B_762x54_Tracer_Green;
|
||||
class ACE_762x54_Ball_7T2 : B_762x54_Tracer_Green {
|
||||
airFriction=-0.001023;
|
||||
airFriction=-0.0010369;
|
||||
caliber=1.5;
|
||||
hit=15;
|
||||
typicalSpeed=800;
|
||||
tracerStartTime = 0.073; //Based on the 7T2 which burns three seconds
|
||||
tracerEndTime = 3;
|
||||
tracerStartTime=0.073; // Based on the 7T2 which burns three seconds
|
||||
tracerEndTime=3;
|
||||
ACE_caliber=7.925;
|
||||
ACE_bulletLength=28.956;
|
||||
ACE_bulletMass=9.6552;
|
||||
@ -427,7 +427,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4};
|
||||
};
|
||||
class ACE_762x35_Ball : B_762x51_Ball {
|
||||
airFriction=-0.000821;
|
||||
airFriction=-0.0012406;
|
||||
caliber=1.5;
|
||||
hit=11;
|
||||
typicalSpeed=790;
|
||||
@ -443,7 +443,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={228.6, 406.4, 508.0};
|
||||
};
|
||||
class ACE_762x39_Ball : B_762x51_Ball {
|
||||
airFriction=-0.0015168;
|
||||
airFriction=-0.0014519;
|
||||
hit=12;
|
||||
caliber=1.5;
|
||||
typicalSpeed=716;
|
||||
@ -477,7 +477,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={254.0, 414.02, 508.0};
|
||||
};
|
||||
class B_9x21_Ball : BulletBase {
|
||||
airFriction=-0.00125;
|
||||
airFriction=-0.0021165;
|
||||
typicalSpeed=390;
|
||||
hit=6;
|
||||
ACE_caliber=9.042;
|
||||
@ -493,7 +493,7 @@ class CfgAmmo {
|
||||
};
|
||||
class ACE_9x18_Ball_57N181S : B_9x21_Ball {
|
||||
hit=5;
|
||||
airFriction=-0.001234;
|
||||
airFriction=-0.0015655;
|
||||
typicalSpeed=298;
|
||||
ACE_caliber=9.271;
|
||||
ACE_bulletLength=15.494;
|
||||
@ -507,7 +507,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={96.52, 127.0, 228.6};
|
||||
};
|
||||
class ACE_9x19_Ball : B_9x21_Ball {
|
||||
airFriction=-0.001234;
|
||||
airFriction=-0.0015833;
|
||||
typicalSpeed=370;
|
||||
hit=6;
|
||||
ACE_caliber=9.017;
|
||||
@ -537,7 +537,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={101.6, 117.094, 228.6};
|
||||
};
|
||||
class ACE_765x17_Ball: B_9x21_Ball {
|
||||
airFriction=-0.001213;
|
||||
airFriction=-0.001410;
|
||||
typicalSpeed=282;
|
||||
hit=7;
|
||||
ACE_caliber=7.938;
|
||||
@ -552,7 +552,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={101.6, 127.0, 228.6};
|
||||
};
|
||||
class ACE_303_Ball : ACE_762x51_Ball_M118LR {
|
||||
airFriction=-0.00083;
|
||||
airFriction=-0.0008410;
|
||||
typicalSpeed=761;
|
||||
caliber=2.0;
|
||||
ACE_caliber=7.899;
|
||||
@ -567,7 +567,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={508.0, 609.6, 660.4};
|
||||
};
|
||||
class B_93x64_Ball : BulletBase {
|
||||
airFriction=-0.00106;
|
||||
airFriction=-0.0010921;
|
||||
typicalSpeed=880;
|
||||
ACE_caliber=9.296;
|
||||
ACE_bulletLength=34.29;
|
||||
@ -582,7 +582,7 @@ class CfgAmmo {
|
||||
};
|
||||
class B_408_Ball : BulletBase {
|
||||
timeToLive=10;
|
||||
airFriction=-0.000395;
|
||||
airFriction=-0.0003958;
|
||||
typicalSpeed=910;
|
||||
ACE_caliber=10.363;
|
||||
ACE_bulletLength=54.0;
|
||||
@ -611,7 +611,7 @@ class CfgAmmo {
|
||||
};
|
||||
class B_338_Ball : BulletBase {
|
||||
timeToLive=10;
|
||||
airFriction=-0.000606;
|
||||
airFriction=-0.0006234;
|
||||
typicalSpeed=915;
|
||||
ACE_caliber=8.585;
|
||||
ACE_bulletLength=39.573;
|
||||
@ -625,7 +625,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={508.0, 660.4, 711.2};
|
||||
};
|
||||
class B_338_NM_Ball : BulletBase {
|
||||
airFriction=-0.000537;
|
||||
airFriction=-0.0005434;
|
||||
typicalSpeed=820;
|
||||
ACE_caliber=8.585;
|
||||
ACE_bulletLength=43.18;
|
||||
@ -640,7 +640,7 @@ class CfgAmmo {
|
||||
};
|
||||
class ACE_338_Ball : B_338_Ball {
|
||||
timeToLive=10;
|
||||
airFriction=-0.000535;
|
||||
airFriction=-0.0005397;
|
||||
typicalSpeed=826;
|
||||
ACE_caliber=8.585;
|
||||
ACE_bulletLength=43.18;
|
||||
@ -655,7 +655,7 @@ class CfgAmmo {
|
||||
};
|
||||
class ACE_338_Ball_API526 : B_338_Ball {
|
||||
timeToLive=10;
|
||||
airFriction=-0.000673;
|
||||
airFriction=-0.0007120;
|
||||
caliber=2.8;
|
||||
typicalSpeed=895;
|
||||
ACE_caliber=8.585;
|
||||
@ -670,7 +670,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={508.0, 660.4, 711.2};
|
||||
};
|
||||
class B_127x54_Ball : BulletBase {
|
||||
airFriction=-0.00014;
|
||||
airFriction=-0.0001877;
|
||||
typicalSpeed=300;
|
||||
ACE_caliber=12.954;
|
||||
ACE_bulletLength=64.516;
|
||||
@ -685,7 +685,7 @@ class CfgAmmo {
|
||||
};
|
||||
class B_127x99_Ball : BulletBase {
|
||||
timeToLive=10;
|
||||
airFriction=-0.0006;
|
||||
airFriction=-0.0005942;
|
||||
typicalSpeed=900;
|
||||
ACE_caliber=12.954;
|
||||
ACE_bulletLength=58.674;
|
||||
@ -700,7 +700,7 @@ class CfgAmmo {
|
||||
};
|
||||
class ACE_127x99_API : BulletBase {
|
||||
timeToLive=10;
|
||||
airFriction=-0.0006;
|
||||
airFriction=-0.0005886;
|
||||
typicalSpeed=900;
|
||||
hit=25;
|
||||
caliber=4.0;
|
||||
@ -717,7 +717,7 @@ class CfgAmmo {
|
||||
};
|
||||
class ACE_127x99_Ball_AMAX : B_127x99_Ball {
|
||||
timeToLive=10;
|
||||
airFriction=-0.000374;
|
||||
airFriction=-0.0003722;
|
||||
typicalSpeed=860;
|
||||
caliber=3.0;
|
||||
ACE_caliber=12.954;
|
||||
@ -733,7 +733,7 @@ class CfgAmmo {
|
||||
};
|
||||
class B_127x108_Ball : BulletBase {
|
||||
timeToLive=10;
|
||||
airFriction=-0.00064;
|
||||
airFriction=-0.0006469;
|
||||
typicalSpeed=820;
|
||||
ACE_caliber=12.979;
|
||||
ACE_bulletLength=64.008;
|
||||
@ -747,7 +747,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={728.98};
|
||||
};
|
||||
class B_45ACP_Ball : BulletBase {
|
||||
airFriction=-0.0007182;
|
||||
airFriction=-0.0007312;
|
||||
typicalSpeed=250;
|
||||
ACE_caliber=11.481;
|
||||
ACE_bulletLength=17.272;
|
||||
|
@ -55,7 +55,7 @@ class CfgMagazines {
|
||||
displayName = "$STR_ACE_30Rnd_556x45_Stanag_M995_AP_mag_Name";
|
||||
displayNameShort = "$STR_ACE_30Rnd_556x45_Stanag_M995_AP_mag_NameShort";
|
||||
descriptionShort = "$STR_ACE_30Rnd_556x45_Stanag_M995_AP_mag_Description";
|
||||
initSpeed = 1046;
|
||||
initSpeed = 865;
|
||||
};
|
||||
class ACE_30Rnd_556x45_Stanag_Mk262_mag: 30Rnd_556x45_Stanag {
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
|
@ -190,7 +190,7 @@ class CfgVehicles {
|
||||
class ACE_Box_Ammo: NATO_Box_Base {
|
||||
scope = 2;
|
||||
accuracy = 1000;
|
||||
displayName = "[ACE] Ammo Supply Crate";
|
||||
displayName = "$STR_ACE_AmmoSupplyCrate_DisplayName";
|
||||
model = "\A3\weapons_F\AmmoBoxes\AmmoBox_F";
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
class TransportMagazines {
|
||||
|
@ -552,7 +552,7 @@ class CfgWeapons {
|
||||
};
|
||||
initSpeed = -1.0;
|
||||
ACE_barrelTwist=381.0;
|
||||
ACE_barrelLength=929.64;
|
||||
ACE_barrelLength=730;
|
||||
};
|
||||
class srifle_DMR_02_F: DMR_02_base_F {
|
||||
magazines[] = {
|
||||
|
@ -1,12 +1,12 @@
|
||||
ace_ballistics
|
||||
==============
|
||||
|
||||
Changes to weapon and ammunition values.
|
||||
|
||||
Changes to weapon, magazine and ammunition values.
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [Ruthberg] (http://github.com/Ulteq)
|
||||
- [KoffeinFlummi](https://github.com/KoffeinFlummi)
|
||||
- [commy2](https://github.com/commy2)
|
||||
|
@ -1592,5 +1592,10 @@
|
||||
<Portuguese>Calibre: 12.7x99mm (AMAX)<br/>Cartuchos: 5</Portuguese>
|
||||
<Hungarian>Kaliber: 12,7x99mm (AMAX)<br />Lövedékek: 5</Hungarian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_AmmoSupplyCrate_DisplayName">
|
||||
<English>[ACE] Ammo Supply Crate</English>
|
||||
<Polish>[ACE] Skrzynka z amunicją</Polish>
|
||||
<Spanish>[ACE] Caja de suministros de munición</Spanish>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
@ -161,7 +161,7 @@ class CfgVehicles {
|
||||
class GVAR(ModuleSurrender): Module_F {
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
category = "ACE";
|
||||
displayName = "Make Unit Surrender";
|
||||
displayName = "$STR_ACE_Captives_ModuleSurrender_DisplayName"; //Make Unit Surrender
|
||||
function = QUOTE(DFUNC(moduleSurrender));
|
||||
scope = 2; //show in editor
|
||||
scopeCurator = 2; //show in zeus
|
||||
@ -172,8 +172,8 @@ class CfgVehicles {
|
||||
functionPriority = 0;
|
||||
class Arguments {};
|
||||
class ModuleDescription: ModuleDescription {
|
||||
description = "Sync a unit to make them surrender.<br/>Source: ace_captives";
|
||||
description = "$STR_ACE_Captives_ModuleSurrender_Description"; //Sync a unit to make them surrender.<br/>Source: ace_captives
|
||||
sync[] = {"AnyAI"};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
@ -17,8 +17,10 @@
|
||||
|
||||
PARAMS_1(_oldUnit);
|
||||
|
||||
if (!local _oldUnit) exitWith {};
|
||||
|
||||
if (_oldUnit getVariable [QGVAR(isHandcuffed), false]) then {
|
||||
[_oldUnit, false] call FUNC(setSurrendered);
|
||||
[_oldUnit, false] call FUNC(setHandcuffed);
|
||||
};
|
||||
|
||||
if (_oldUnit getVariable [QGVAR(isEscorting), false]) then {
|
||||
|
@ -89,7 +89,7 @@ if (_state) then {
|
||||
PARAMS_2(_args,_pfID);
|
||||
EXPLODE_2_PVT(_args,_unit,_maxTime);
|
||||
//If waited long enough or they re-surrendered or they are unconscious, exit loop
|
||||
if ((time > _maxTime) || {_unit getVariable [QGVAR(isSurrendering), false]} || {_unit getVariable ["ACE_isUnconscious", false]}) exitWith {
|
||||
if ((ACE_time > _maxTime) || {_unit getVariable [QGVAR(isSurrendering), false]} || {_unit getVariable ["ACE_isUnconscious", false]}) exitWith {
|
||||
[_pfID] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
//Only break animation if they are actualy the "hands up" animation (because we are using switchmove there won't be an transition)
|
||||
@ -98,6 +98,6 @@ if (_state) then {
|
||||
//Break out of hands up animation loop
|
||||
[_unit, "ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation);
|
||||
};
|
||||
}, 0, [_unit, (time + 20)]] call CBA_fnc_addPerFrameHandler;
|
||||
}, 0, [_unit, (ACE_time + 20)]] call CBA_fnc_addPerFrameHandler;
|
||||
};
|
||||
};
|
||||
|
@ -193,5 +193,15 @@
|
||||
<Hungarian>Semmi sincs az egér alatt</Hungarian>
|
||||
<Italian>Nessuna selezione</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_ModuleSurrender_DisplayName">
|
||||
<English>Make Unit Surrender</English>
|
||||
<Polish>Poddaj się!</Polish>
|
||||
<Spanish>Hacer que la unidad se rinda</Spanish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_ModuleSurrender_Description">
|
||||
<English>Sync a unit to make them surrender.<br />Source: ace_captives</English>
|
||||
<Polish>Zsynchronizuj z jednostką aby sprawić by się poddała<br />Źródło: ace_captives</Polish>
|
||||
<Spanish>Sincroniza una unidad para hacer que se rinda.<br />Fuente: ace_captives</Spanish>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
</Project>
|
@ -25,72 +25,72 @@ class CfgVehicles {
|
||||
// += needs a non inherited entry in that class, otherwise it simply overwrites
|
||||
//#include <DefaultItems.hpp>
|
||||
|
||||
class Module_F;
|
||||
class ACE_ModuleCheckPBOs: Module_F {
|
||||
class Logic;
|
||||
class Module_F: Logic {
|
||||
class ModuleDescription {};
|
||||
};
|
||||
class ACE_ModuleCheckPBOs: Module_F {
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
category = "ACE";
|
||||
displayName = "Check PBOs";
|
||||
displayName = "$STR_ACE_Common_CheckPBO_DisplayName";
|
||||
function = QFUNC(moduleCheckPBOs);
|
||||
scope = 2;
|
||||
isGlobal = 1;
|
||||
icon = QUOTE(PATHTOF(UI\Icon_Module_CheckPBO_ca.paa));
|
||||
class Arguments {
|
||||
class Action {
|
||||
displayName = "Action";
|
||||
description = "What to do with people who do not have the right PBOs?";
|
||||
displayName = "$STR_ACE_Common_CheckPBO_Action_DisplayName";
|
||||
description = "$STR_ACE_Common_CheckPBO_Action_Description";
|
||||
class values {
|
||||
class WarnOnce {
|
||||
default = 1;
|
||||
name = "Warn once";
|
||||
name = "$STR_ACE_Common_CheckPBO_Action_WarnOnce";
|
||||
value = 0;
|
||||
};
|
||||
class Warn {
|
||||
name = "Warn (permanent)";
|
||||
name = "$STR_ACE_Common_CheckPBO_Action_WarnPerm";
|
||||
value = 1;
|
||||
};
|
||||
class Kick {
|
||||
name = "Kick";
|
||||
name = "$STR_ACE_Common_CheckPBO_Action_Kick";
|
||||
value = 2;
|
||||
};
|
||||
};
|
||||
};
|
||||
class CheckAll {
|
||||
displayName = "Check all addons";
|
||||
description = "Check all addons instead of only those of ACE?";
|
||||
displayName = "$STR_ACE_Common_CheckPBO_CheckAll_DisplayName";
|
||||
description = "$STR_ACE_Common_CheckPBO_CheckAll_Description";
|
||||
typeName = "BOOL";
|
||||
class values {
|
||||
class WarnOnce {
|
||||
default = 1;
|
||||
name = "No";
|
||||
value = 0;
|
||||
};
|
||||
class Warn {
|
||||
name = "Yes";
|
||||
value = 1;
|
||||
};
|
||||
};
|
||||
defaultValue = 0;
|
||||
};
|
||||
class Whitelist {
|
||||
displayName = "Whitelist";
|
||||
description = "What addons are allowed regardless?";
|
||||
displayName = "$STR_ACE_Common_CheckPBO_Whitelist_DisplayName";
|
||||
description = "$STR_ACE_Common_CheckPBO_Whitelist_Description";
|
||||
typeName = "STRING";
|
||||
class values {
|
||||
default = "[]";
|
||||
};
|
||||
};
|
||||
};
|
||||
class ModuleDescription: ModuleDescription {
|
||||
description = "$STR_ACE_Common_CheckPBO_Description";
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_ModuleLSDVehicles: Module_F {
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
category = "ACE";
|
||||
displayName = "LSD Vehicles";
|
||||
displayName = "$STR_ACE_Common_LSDVehicles_DisplayName";
|
||||
function = "ACE_Common_fnc_moduleLSDVehicles";
|
||||
scope = 2;
|
||||
icon = QUOTE(PATHTOF(UI\Icon_Module_LSD_ca.paa));
|
||||
isGlobal = 1;
|
||||
class Arguments {
|
||||
};
|
||||
class ModuleDescription: ModuleDescription {
|
||||
description = "$STR_ACE_Common_LSDVehicles_Description";
|
||||
sync[] = {"AnyVehicle"};
|
||||
};
|
||||
};
|
||||
|
||||
class Box_NATO_Support_F;
|
||||
|
@ -1,18 +1,13 @@
|
||||
// ACE - Common
|
||||
#include "script_component.hpp"
|
||||
|
||||
// Load settings from profile
|
||||
if (hasInterface) then {
|
||||
call FUNC(loadSettingsFromProfile);
|
||||
call FUNC(loadSettingsLocalizedText);
|
||||
};
|
||||
//IGNORE_PRIVATE_WARNING("_handleNetEvent", "_handleRequestAllSyncedEvents", "_handleRequestSyncedEvent", "_handleSyncedEvent");
|
||||
|
||||
// Listens for global "SettingChanged" events, to update the force status locally
|
||||
["SettingChanged", {
|
||||
|
||||
PARAMS_2(_name,_value);
|
||||
if !(count _this > 2) exitWith {};
|
||||
|
||||
private ["_force", "_settingData"];
|
||||
_force = _this select 2;
|
||||
if (_force) then {
|
||||
_settingData = [_name] call FUNC(getSettingData);
|
||||
@ -40,7 +35,7 @@ if (hasInterface) then {
|
||||
|
||||
// hack to get PFH to work in briefing
|
||||
[QGVAR(onBriefingPFH), "onEachFrame", {
|
||||
if (time > 0) exitWith {
|
||||
if (ACE_time > 0) exitWith {
|
||||
[QGVAR(onBriefingPFH), "onEachFrame"] call BIS_fnc_removeStackedEventHandler;
|
||||
};
|
||||
|
||||
@ -54,6 +49,7 @@ QGVAR(remoteFnc) addPublicVariableEventHandler {
|
||||
|
||||
[missionNamespace] call FUNC(executePersistent);
|
||||
|
||||
private ["_currentVersion", "_previousVersion"];
|
||||
// check previous version number from profile
|
||||
_currentVersion = getText (configFile >> "CfgPatches" >> QUOTE(ADDON) >> "version");
|
||||
_previousVersion = profileNamespace getVariable ["ACE_VersionNumberString", ""];
|
||||
@ -131,6 +127,7 @@ GVAR(OldPlayerWeapon) = currentWeapon ACE_player;
|
||||
|
||||
// PFH to raise varios events
|
||||
[{
|
||||
private ["_newCameraView", "_newInventoryDisplayIsOpen", "_newPlayerInventory", "_newPlayerTurret", "_newPlayerVehicle", "_newPlayerVisionMode", "_newPlayerWeapon", "_newZeusDisplayIsOpen"];
|
||||
// "playerInventoryChanged" event
|
||||
_newPlayerInventory = [ACE_player] call FUNC(getAllGear);
|
||||
if !(_newPlayerInventory isEqualTo GVAR(OldPlayerInventory)) then {
|
||||
@ -212,6 +209,7 @@ GVAR(OldIsCamera) = false;
|
||||
[{
|
||||
|
||||
// "activeCameraChanged" event
|
||||
private ["_isCamera"];
|
||||
_isCamera = {!isNull _x} count ALL_CAMERAS > 0;
|
||||
if !(_isCamera isEqualTo GVAR(OldIsCamera)) then {
|
||||
// Raise ACE event locally
|
||||
@ -219,7 +217,7 @@ GVAR(OldIsCamera) = false;
|
||||
["activeCameraChanged", [ACE_player, _isCamera]] call FUNC(localEvent);
|
||||
};
|
||||
|
||||
}, 1, []] call cba_fnc_addPerFrameHandler; // feel free to decrease the sleep time if you need it.
|
||||
}, 1, []] call cba_fnc_addPerFrameHandler; // feel free to decrease the sleep ACE_time if you need it.
|
||||
|
||||
|
||||
[QGVAR(StateArrested),false,true,QUOTE(ADDON)] call FUNC(defineVariable);
|
||||
@ -240,7 +238,7 @@ GVAR(OldIsCamera) = false;
|
||||
|
||||
// Lastly, do JIP events
|
||||
// JIP Detection and event trigger. Run this at the very end, just in case anything uses it
|
||||
if(isMultiplayer && { time > 0 || isNull player } ) then {
|
||||
if(isMultiplayer && { ACE_time > 0 || isNull player } ) then {
|
||||
// We are jipping! Get ready and wait, and throw the event
|
||||
[{
|
||||
if(!(isNull player)) then {
|
||||
@ -249,3 +247,19 @@ if(isMultiplayer && { time > 0 || isNull player } ) then {
|
||||
};
|
||||
}, 0, []] call cba_fnc_addPerFrameHandler;
|
||||
};
|
||||
|
||||
GVAR(commonPostInited) = true;
|
||||
|
||||
// Create a pfh to wait until all postinits are ready and settings are initialized
|
||||
[{
|
||||
// If post inits are not ready then wait
|
||||
if !(SLX_XEH_MACHINE select 8) exitWith {};
|
||||
// If settings are not initialized then wait
|
||||
if !(GVAR(SettingsInitialized)) exitWith {};
|
||||
|
||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||
|
||||
diag_log text format["[ACE] Settings initialized"];
|
||||
["SettingsInitialized", []] call FUNC(localEvent);
|
||||
|
||||
}, 0, []] call cba_fnc_addPerFrameHandler;
|
||||
|
@ -1,6 +1,8 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
//IGNORE_PRIVATE_WARNING("_handleNetEvent", "_handleRequestAllSyncedEvents", "_handleRequestSyncedEvent", "_handleSyncedEvent");
|
||||
|
||||
ADDON = false;
|
||||
|
||||
// ACE Common Function
|
||||
@ -170,7 +172,6 @@ PREP(sortAlphabeticallyBy);
|
||||
PREP(stringCompare);
|
||||
PREP(stringToColoredText);
|
||||
PREP(stringRemoveWhiteSpace);
|
||||
PREP(subString);
|
||||
PREP(switchToGroupSide);
|
||||
PREP(throttledPublicVariable);
|
||||
PREP(toBin);
|
||||
@ -179,6 +180,7 @@ PREP(toHex);
|
||||
PREP(toNumber);
|
||||
PREP(uniqueElementsOnly);
|
||||
PREP(unloadPerson);
|
||||
PREP(unloadPersonLocal);
|
||||
PREP(unmuteUnit);
|
||||
PREP(useItem);
|
||||
PREP(useMagazine);
|
||||
@ -285,15 +287,30 @@ PREP(_handleRequestSyncedEvent);
|
||||
PREP(_handleRequestAllSyncedEvents);
|
||||
|
||||
GVAR(syncedEvents) = HASH_CREATE;
|
||||
GVAR(waitAndExecArray) = [];
|
||||
|
||||
// @TODO: Generic local-managed global-synced objects (createVehicleLocal)
|
||||
|
||||
//Debug
|
||||
ACE_COUNTERS = [];
|
||||
|
||||
// Load settings
|
||||
// Wait for server settings to arrive
|
||||
GVAR(SettingsInitialized) = false;
|
||||
["ServerSettingsReceived", {
|
||||
diag_log text format["[ACE] Settings received from server"];
|
||||
// Load user settings from profile
|
||||
if (hasInterface) then {
|
||||
call FUNC(loadSettingsFromProfile);
|
||||
call FUNC(loadSettingsLocalizedText);
|
||||
};
|
||||
GVAR(SettingsInitialized) = true;
|
||||
}] call FUNC(addEventhandler);
|
||||
|
||||
// Load settings on the server and broadcast them
|
||||
if (isServer) then {
|
||||
call FUNC(loadSettingsOnServer);
|
||||
// Raise a local event for other modules to listen too
|
||||
["ServerSettingsReceived", []] call FUNC(localEvent);
|
||||
};
|
||||
|
||||
ACE_player = player;
|
||||
@ -302,6 +319,7 @@ if (hasInterface) then {
|
||||
// PFH to update the ACE_player variable
|
||||
[{
|
||||
if !(ACE_player isEqualTo (call FUNC(player))) then {
|
||||
private ["_oldPlayer"];
|
||||
_oldPlayer = ACE_player;
|
||||
|
||||
ACE_player = call FUNC(player);
|
||||
@ -319,6 +337,8 @@ ACE_realTime = diag_tickTime;
|
||||
ACE_virtualTime = diag_tickTime;
|
||||
ACE_diagTime = diag_tickTime;
|
||||
ACE_gameTime = time;
|
||||
ACE_pausedTime = 0;
|
||||
ACE_virtualPausedTime = 0;
|
||||
|
||||
PREP(timePFH);
|
||||
[FUNC(timePFH), 0, []] call cba_fnc_addPerFrameHandler;
|
||||
|
@ -101,7 +101,7 @@ class ACE_Settings {
|
||||
isClientSettable = 1;
|
||||
displayName = "$STR_ACE_Common_SettingFeedbackIconsName";
|
||||
description = "$STR_ACE_Common_SettingFeedbackIconsDesc";
|
||||
values[] = {"Hide", "Top right, downwards", "Top right, to the left", "Top left, downwards", "Top left, to the right"};
|
||||
values[] = {"$STR_ACE_Common_Hide", "$STR_ACE_Common_TopRightDown", "$STR_ACE_Common_TopRightLeft", "$STR_ACE_Common_TopLeftDown", "$STR_ACE_Common_TopLeftRight"};
|
||||
};
|
||||
class GVAR(SettingProgressBarLocation) {
|
||||
value = 0;
|
||||
@ -110,7 +110,7 @@ class ACE_Settings {
|
||||
isClientSettable = 1;
|
||||
displayName = "$STR_ACE_Common_SettingProgressbarLocationName";
|
||||
description = "$STR_ACE_Common_SettingProgressbarLocationDesc";
|
||||
values[] = {"Top", "Bottom"};
|
||||
values[] = {"$STR_ACE_Common_Top", "$STR_ACE_Common_Bottom"};
|
||||
};
|
||||
class GVAR(displayTextColor) {
|
||||
value[] = {0,0,0,0.1};
|
||||
|
@ -2,18 +2,19 @@
|
||||
// internal handler for net events
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_eventType", "_event", "_eventName", "_eventArgs", "_eventNames", "_eventIndex", "_eventTargets", "_sentEvents", "_owner", "_serverFlagged"];
|
||||
private ["_eventName", "_eventArgs", "_eventNames", "_eventIndex", "_eventTargets", "_sentEvents", "_owner", "_serverFlagged", "_events"];
|
||||
//IGNORE_PRIVATE_WARNING("_handleNetEvent");
|
||||
|
||||
_eventType = _this select 0;
|
||||
_event = _this select 1;
|
||||
|
||||
if(_eventType == "ACEg") then {
|
||||
PARAMS_2(_eventType,_event);
|
||||
|
||||
if (_eventType == "ACEg") then {
|
||||
_eventName = _event select 0;
|
||||
_eventArgs = _event select 1;
|
||||
|
||||
_eventNames = GVAR(events) select 0;
|
||||
_eventIndex = _eventNames find _eventName;
|
||||
if(_eventIndex != -1) then {
|
||||
if (_eventIndex != -1) then {
|
||||
_events = (GVAR(events) select 1) select _eventIndex;
|
||||
|
||||
#ifdef DEBUG_EVENTS
|
||||
@ -22,7 +23,7 @@ if(_eventType == "ACEg") then {
|
||||
#endif
|
||||
|
||||
{
|
||||
if(!isNil "_x") then {
|
||||
if (!isNil "_x") then {
|
||||
_eventArgs call CALLSTACK_NAMED(_x, format[ARR_3("Net Event %1 ID: %2",_eventName,_forEachIndex)]);
|
||||
#ifdef DEBUG_EVENTS_CALLSTACK
|
||||
diag_log text format[ARR_2(" ID: %1",_forEachIndex)];
|
||||
@ -32,14 +33,14 @@ if(_eventType == "ACEg") then {
|
||||
};
|
||||
};
|
||||
|
||||
if(_eventType == "ACEc") then {
|
||||
if(isServer) then {
|
||||
if (_eventType == "ACEc") then {
|
||||
if (isServer) then {
|
||||
_eventName = _event select 0;
|
||||
_eventTargets = _event select 1;
|
||||
_eventArgs = _event select 2;
|
||||
|
||||
_sentEvents = [];
|
||||
if(!IS_ARRAY(_eventTargets)) then {
|
||||
if (!IS_ARRAY(_eventTargets)) then {
|
||||
_eventTargets = [_eventTargets];
|
||||
};
|
||||
|
||||
@ -52,14 +53,14 @@ if(_eventType == "ACEc") then {
|
||||
_serverFlagged = false;
|
||||
{
|
||||
_owner = _x;
|
||||
if(IS_OBJECT(_x)) then {
|
||||
if (IS_OBJECT(_x)) then {
|
||||
_owner = owner _x;
|
||||
};
|
||||
if(!(_owner in _sentEvents)) then {
|
||||
if (!(_owner in _sentEvents)) then {
|
||||
PUSH(_sentEvents, _owner);
|
||||
ACEg = [_eventName, _eventArgs];
|
||||
if(isDedicated || {_x != ACE_player}) then {
|
||||
if(isDedicated && {local _x} && {!_serverFlagged}) then {
|
||||
if (isDedicated || {_x != ACE_player}) then {
|
||||
if (isDedicated && {local _x} && {!_serverFlagged}) then {
|
||||
_serverFlagged = true;
|
||||
["ACEg", ACEg] call FUNC(_handleNetEvent);
|
||||
} else {
|
||||
|
@ -17,6 +17,8 @@
|
||||
//#define DEBUG_MODE_FULL
|
||||
#include "script_component.hpp"
|
||||
|
||||
//IGNORE_PRIVATE_WARNING("_handleSyncedEvent");
|
||||
|
||||
//SEH_s
|
||||
if(isServer) then {
|
||||
// Find the event name, and shovel out the events to the client
|
||||
@ -33,6 +35,7 @@ if(isServer) then {
|
||||
["SEH_s", _client, [_eventName, _eventLog] ] call FUNC(targetEvent);
|
||||
} else {
|
||||
PARAMS_2(_eventName,_eventLog);
|
||||
private ["_eventArgs"];
|
||||
// This is the client handling the response from the server
|
||||
// Start running the events
|
||||
{
|
||||
|
@ -28,7 +28,7 @@ if(isServer) then {
|
||||
if(_ttl > -1) then {
|
||||
_internalData = HASH_GET(GVAR(syncedEvents),_name);
|
||||
_eventLog = _internalData select 1;
|
||||
_eventLog pushback [diag_tickTime, _args, _ttl];
|
||||
_eventLog pushback [ACE_diagTime, _args, _ttl];
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_action", "_condition", "_statement", "_name", "_actionsVar", "_actionID", "_actions", "_id", "_actionIDs"];
|
||||
//IGNORE_PRIVATE_WARNING("_count", "_index", "_return", "_target");
|
||||
|
||||
_unit = _this select 0;
|
||||
_action = _this select 1;
|
||||
|
@ -18,33 +18,27 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_displayName", "_action", "_condition", "_statement", "_condition2", "_statement2", "_priority", "_name", "_actionsVar", "_id", "_actionIDs", "_actions", "_nameVar", "_addAction", "_actionID"];
|
||||
private ["_name", "_actionsVar", "_id", "_actionIDs", "_actions", "_nameVar", "_addAction", "_actionID"];
|
||||
//IGNORE_PRIVATE_WARNING("_target");
|
||||
|
||||
_unit = _this select 0;
|
||||
_displayName = _this select 1;
|
||||
_action = _this select 2;
|
||||
_condition = _this select 3;
|
||||
_statement = _this select 4;
|
||||
_condition2 = _this select 5;
|
||||
_statement2 = _this select 6;
|
||||
_priority = _this select 7;
|
||||
PARAMS_8(_unit,_displayName,_action,_condition,_statement,_condition2,_statement2,_priority);
|
||||
|
||||
if (isNil "_priority") then {_priority = 0};
|
||||
|
||||
if (typeName _condition == "STRING") then {
|
||||
_condition = compile _condition;
|
||||
_condition = compile _condition;
|
||||
};
|
||||
|
||||
if (typeName _statement == "STRING") then {
|
||||
_statement = compile _statement;
|
||||
_statement = compile _statement;
|
||||
};
|
||||
|
||||
if (typeName _condition2 == "STRING") then {
|
||||
_condition2 = compile _condition2;
|
||||
_condition2 = compile _condition2;
|
||||
};
|
||||
|
||||
if (typeName _statement2 == "STRING") then {
|
||||
_statement2 = compile _statement2;
|
||||
_statement2 = compile _statement2;
|
||||
};
|
||||
|
||||
_name = format ["ACE_ActionMenu_%1", _action];
|
||||
@ -61,20 +55,20 @@ missionNamespace setVariable [_nameVar, [_condition, _statement, _condition2, _s
|
||||
_actionIDs pushBack _id;
|
||||
|
||||
_addAction = call compile format [
|
||||
"[
|
||||
'%2',
|
||||
{if (inputAction '%1' == 0) then {if (_this call (%3 select 2)) then {_this call (%3 select 3)}} else {_this call (%3 select 1)}},
|
||||
nil,
|
||||
%4,
|
||||
false,
|
||||
true,
|
||||
'%1',
|
||||
""if (_this != ACE_player || {vehicle _this != _target}) exitWith {false}; [_target, _this] call (%3 select 0)""
|
||||
]",
|
||||
_action,
|
||||
_displayName,
|
||||
_nameVar,
|
||||
_priority
|
||||
"[
|
||||
'%2',
|
||||
{if (inputAction '%1' == 0) then {if (_this call (%3 select 2)) then {_this call (%3 select 3)}} else {_this call (%3 select 1)}},
|
||||
nil,
|
||||
%4,
|
||||
false,
|
||||
true,
|
||||
'%1',
|
||||
""if (_this != ACE_player || {vehicle _this != _target}) exitWith {false}; [_target, _this] call (%3 select 0)""
|
||||
]",
|
||||
_action,
|
||||
_displayName,
|
||||
_nameVar,
|
||||
_priority
|
||||
];
|
||||
|
||||
_actionID = _unit addAction _addAction;
|
||||
|
@ -14,6 +14,8 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_conditionName", "_conditionFunc"];
|
||||
//IGNORE_PRIVATE_WARNING("_player", "_target");
|
||||
|
||||
|
||||
_conditionName = toLower (_this select 0);
|
||||
_conditionFunc = _this select 1;
|
||||
|
@ -7,7 +7,7 @@ disableSerialization;
|
||||
_dlg = ctrlParent _this;
|
||||
|
||||
_dlg displayAddEventHandler ["unload", {
|
||||
if (_this select 1 == 1) then {
|
||||
[missionnamespace getvariable ["BIS_fnc_initCuratorAttributes_target", objNull]] call FUNC(fixCrateContent);
|
||||
};
|
||||
if (_this select 1 == 1) then {
|
||||
[missionnamespace getvariable ["BIS_fnc_initCuratorAttributes_target", objNull]] call FUNC(fixCrateContent);
|
||||
};
|
||||
}];
|
||||
|
@ -11,14 +11,15 @@
|
||||
* Event handler ID number (for use with fnc_removeEventHandler)
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
private ["_eventName", "_eventCode", "_eventNames", "_eventFunctions", "_eventNameCount", "_eventIndex", "_eventFunctionCount"];
|
||||
_eventName = _this select 0;
|
||||
_eventCode = _this select 1;
|
||||
|
||||
private ["_eventNames", "_eventFunctions", "_eventNameCount", "_eventIndex", "_eventFunctionCount"];
|
||||
|
||||
PARAMS_2(_eventName,_eventCode);
|
||||
|
||||
_eventNames = GVAR(events) select 0;
|
||||
_eventFunctions = [];
|
||||
_eventIndex = _eventNames find _eventName;
|
||||
if(_eventIndex != -1) then {
|
||||
if (_eventIndex != -1) then {
|
||||
_eventFunctions = (GVAR(events) select 1) select _eventIndex;
|
||||
} else {
|
||||
_eventNameCount = count _eventNames;
|
||||
@ -27,6 +28,6 @@ if(_eventIndex != -1) then {
|
||||
};
|
||||
|
||||
_eventFunctionCount = count _eventFunctions;
|
||||
_eventFunctions set[_eventFunctionCount, _eventCode];
|
||||
_eventFunctions set [_eventFunctionCount, _eventCode];
|
||||
|
||||
_eventFunctionCount;
|
@ -11,12 +11,12 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_statement", "_actionsVar", "_id", "_actionIDs", "_actions"];
|
||||
private ["_actionsVar", "_id", "_actionIDs", "_actions"];
|
||||
|
||||
_statement = _this select 0;
|
||||
PARAMS_1(_statement);
|
||||
|
||||
if (typeName _statement == "STRING") then {
|
||||
_statement = compile _statement;
|
||||
_statement = compile _statement;
|
||||
};
|
||||
|
||||
_actionsVar = missionNamespace getVariable ["ACE_EventHandler_MapMarker", [-1, [], []]];
|
||||
@ -26,8 +26,8 @@ _actionIDs = _actionsVar select 1;
|
||||
_actions = _actionsVar select 2;
|
||||
|
||||
if (_id == 0) then {
|
||||
uiNamespace setVariable ["ACE_EventHandler_MapMarker", count allMapMarkers];
|
||||
("ACE_EventHandlerHelper2" call BIS_fnc_rscLayer) cutRsc ["ACE_EventHandlerHelper2", "PLAIN"];
|
||||
uiNamespace setVariable ["ACE_EventHandler_MapMarker", count allMapMarkers];
|
||||
("ACE_EventHandlerHelper2" call BIS_fnc_rscLayer) cutRsc ["ACE_EventHandlerHelper2", "PLAIN"];
|
||||
};
|
||||
|
||||
_actionIDs pushBack _id;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
*
|
||||
* Add an event handler that executes every time the scroll wheel is used. This is needed, because adding a MouseZ display event handler to display 46 will break in save games. Argument will be [Interval] where 'Interval' is a number.
|
||||
* Add an event handler that executes every ACE_time the scroll wheel is used. This is needed, because adding a MouseZ display event handler to display 46 will break in save games. Argument will be [Interval] where 'Interval' is a number.
|
||||
*
|
||||
* Argument:
|
||||
* 0: Code to execute (Code or String)
|
||||
@ -11,9 +11,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_statement", "_actionsVar", "_id", "_actionIDs", "_actions"];
|
||||
private ["_actionsVar", "_id", "_actionIDs", "_actions"];
|
||||
|
||||
_statement = _this select 0;
|
||||
PARAMS_1(_statement);
|
||||
|
||||
if (typeName _statement == "STRING") then {
|
||||
_statement = compile _statement;
|
||||
|
@ -4,14 +4,14 @@
|
||||
* If has only local effects.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: _name (String)
|
||||
* 1: _typeName (String)
|
||||
* 2: _isClientSetable (Bool)
|
||||
* 3: _localizedName (String)
|
||||
* 4: _localizedDescription (String)
|
||||
* 5: _possibleValues (Array)
|
||||
* 6: _isForced (Bool)
|
||||
* 7: _defaultValue (Any)
|
||||
* 0: name <STRING>
|
||||
* 1: typeName <STRING>
|
||||
* 2: isClientSetable <BOOL>
|
||||
* 3: localizedName <STRING>
|
||||
* 4: localizedDescription <STRING>
|
||||
* 5: possibleValues <ARRAY>
|
||||
* 6: isForced <BOOL>
|
||||
* 7: defaultValue (Any)
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
@ -20,7 +20,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
EXPLODE_8_PVT(_this,_name,_typeName,_isClientSetable,_localizedName,_localizedDescription,_possibleValues,_isForced,_value);
|
||||
PARAMS_8(_name,_typeName,_isClientSetable,_localizedName,_localizedDescription,_possibleValues,_isForced,_value);
|
||||
|
||||
private ["_settingData"];
|
||||
|
||||
_settingData = [_name] call FUNC(getSettingData);
|
||||
|
||||
|
@ -13,6 +13,8 @@
|
||||
*/
|
||||
//#define DEBUG_MODE_FULL
|
||||
#include "script_component.hpp"
|
||||
//IGNORE_PRIVATE_WARNING("_handleSyncedEvent");
|
||||
|
||||
PARAMS_2(_name,_handler);
|
||||
|
||||
private["_ttl", "_eventId", "_data"];
|
||||
|
@ -19,13 +19,11 @@
|
||||
//#define DEBUG_MODE_FULL
|
||||
#include "script_component.hpp"
|
||||
|
||||
EXPLODE_2_PVT(_this,_unit,_classname);
|
||||
PARAMS_2(_unit,_classname);
|
||||
DEFAULT_PARAM(2,_container,"");
|
||||
DEFAULT_PARAM(3,_ammoCount,-1);
|
||||
|
||||
private "_addedToPlayer";
|
||||
private "_canAdd";
|
||||
private "_type";
|
||||
private ["_addedToPlayer", "_canAdd", "_type", "_pos"];
|
||||
|
||||
_canAdd = false;
|
||||
_addedToPlayer = true;
|
||||
|
@ -17,9 +17,9 @@ Example:
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_forceWalkNumber"];
|
||||
private ["_forceWalkNumber"];
|
||||
|
||||
_unit = _this select 0;
|
||||
PARAMS_1(_unit);
|
||||
_forceWalkNumber = _unit getVariable ["ACE_forceWalkStatusNumber", 0];
|
||||
|
||||
_unit forceWalk (_forceWalkNumber > 0);
|
||||
|
@ -23,16 +23,16 @@ _array = [];
|
||||
_array resize _minLength;
|
||||
|
||||
for "_index" from 0 to (_minLength - 1) do {
|
||||
_array set [_index, false];
|
||||
_array set [_index, false];
|
||||
};
|
||||
|
||||
_index = 0;
|
||||
|
||||
while {_number > 0} do {
|
||||
_rest = _number mod 2;
|
||||
_number = floor (_number / 2);
|
||||
_rest = _number mod 2;
|
||||
_number = floor (_number / 2);
|
||||
|
||||
_array set [_index, _rest == 1];
|
||||
_index = _index + 1;
|
||||
_array set [_index, _rest == 1];
|
||||
_index = _index + 1;
|
||||
};
|
||||
_array
|
||||
|
@ -10,11 +10,11 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_id", "_show"];
|
||||
_id = _this select 0;
|
||||
private ["_show"];
|
||||
PARAMS_1(_id);
|
||||
_show = if (count _this > 1) then {_this select 1} else {false};
|
||||
|
||||
if (isnil QGVAR(SHOW_BLUR_SCREEN_COLLECTION)) then {
|
||||
if (isNil QGVAR(SHOW_BLUR_SCREEN_COLLECTION)) then {
|
||||
GVAR(SHOW_BLUR_SCREEN_COLLECTION) = [];
|
||||
};
|
||||
if (typeName _show == typeName 0) then {
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Author: esteldunedain and Jaynus
|
||||
* Returns the result of the function and caches it up to a given time or event
|
||||
* Returns the result of the function and caches it up to a given ACE_time or event
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Parameters <ARRAY>
|
||||
@ -17,10 +17,12 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
EXPLODE_5_PVT(_this,_params,_function,_namespace,_uid,_duration);
|
||||
PARAMS_5(_params,_function,_namespace,_uid,_duration);
|
||||
|
||||
if (((_namespace getVariable [_uid, [-99999]]) select 0) < diag_tickTime) then {
|
||||
_namespace setVariable [_uid, [diag_tickTime + _duration, _params call _function]];
|
||||
//IGNORE_PRIVATE_WARNING("_eventName");
|
||||
|
||||
if (((_namespace getVariable [_uid, [-99999]]) select 0) < ACE_diagTime) then {
|
||||
_namespace setVariable [_uid, [ACE_diagTime + _duration, _params call _function]];
|
||||
|
||||
// Does the cache needs to be cleared on an event?
|
||||
if (count _this > 5) then {
|
||||
|
@ -19,12 +19,11 @@
|
||||
#define CANGETINDRIVER (isNull (driver _vehicle) || {!alive driver _vehicle}) && {!lockedDriver _vehicle} && {getNumber (_config >> "isUav") != 1}
|
||||
#define CANGETINTURRETINDEX (isNull (_vehicle turretUnit _turret) || {!alive (_vehicle turretUnit _turret)}) && {!(_vehicle lockedTurret _turret)} && {getNumber (_config >> "isUav") != 1}
|
||||
|
||||
private ["_unit", "_vehicle", "_position", "_checkDistance", "_index"];
|
||||
private ["_position", "_checkDistance", "_index"];
|
||||
|
||||
_this resize 5;
|
||||
|
||||
_unit = _this select 0;
|
||||
_vehicle = _this select 1;
|
||||
PARAMS_2(_unit,_vehicle);
|
||||
_position = toLower (_this select 2);
|
||||
_checkDistance = _this select 3;
|
||||
_index = _this select 4; // optional, please don't use
|
||||
@ -44,218 +43,217 @@ _radius = 0;
|
||||
|
||||
_enemiesInVehicle = false; //Possible Side Restriction
|
||||
{
|
||||
if (side _unit getFriend side _x < 0.6) exitWith {_enemiesInVehicle = true};
|
||||
if (side _unit getFriend side _x < 0.6) exitWith {_enemiesInVehicle = true};
|
||||
} forEach crew _vehicle;
|
||||
|
||||
_return = false;
|
||||
switch (_position) do {
|
||||
case "driver" : {
|
||||
_radius = getNumber (_config >> "getInRadius");
|
||||
_selectionPosition = _vehicle selectionPosition (getText (_config >> "memoryPointsGetInDriver"));
|
||||
|
||||
if (_vehicle isKindOf "Tank") then {
|
||||
_selectionPosition2 = [-(_selectionPosition select 0), _selectionPosition select 1, _selectionPosition select 2];
|
||||
};
|
||||
|
||||
_return = CANGETINDRIVER;
|
||||
};
|
||||
|
||||
case "pilot" : {
|
||||
_radius = getNumber (_config >> "getInRadius");
|
||||
_selectionPosition = _vehicle selectionPosition (getText (_config >> "memoryPointsGetInDriver"));
|
||||
|
||||
_return = CANGETINDRIVER;
|
||||
};
|
||||
|
||||
case "gunner" : {
|
||||
private "_turretConfig";
|
||||
_turret = [_vehicle] call FUNC(getTurretGunner);
|
||||
if (_turret isEqualTo []) exitWith {false};
|
||||
|
||||
_turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
||||
|
||||
_radius = getNumber (_config >> "getInRadius");
|
||||
_selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner"));
|
||||
|
||||
_return = CANGETINTURRETINDEX
|
||||
};
|
||||
|
||||
case "commander" : {
|
||||
private "_turretConfig";
|
||||
_turret = [_vehicle] call FUNC(getTurretCommander);
|
||||
if (_turret isEqualTo []) exitWith {false};
|
||||
|
||||
_turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
||||
|
||||
_radius = getNumber (_config >> "getInRadius");
|
||||
_selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner"));
|
||||
|
||||
_return = CANGETINTURRETINDEX
|
||||
};
|
||||
|
||||
case "copilot" : {
|
||||
private "_turretConfig";
|
||||
_turret = [_vehicle] call FUNC(getTurretCopilot);
|
||||
if (_turret isEqualTo []) exitWith {false};
|
||||
|
||||
_turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
||||
|
||||
_radius = getNumber (_config >> "getInRadius");
|
||||
_selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner"));
|
||||
|
||||
_return = CANGETINTURRETINDEX
|
||||
};
|
||||
|
||||
case "turret" : {
|
||||
private ["_turrets", "_turretConfig"];
|
||||
_turrets = [_vehicle] call FUNC(getTurretsOther);
|
||||
|
||||
if (_index != -1 && {_turret = _turrets select _index;
|
||||
CANGETINTURRETINDEX
|
||||
}) then {
|
||||
_turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
||||
|
||||
_radius = getNumber (_config >> "getInRadius");
|
||||
_selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner"));
|
||||
|
||||
_return = true
|
||||
} else {
|
||||
for "_index" from 0 to (count _turrets - 1) do {
|
||||
_turret = _turrets select _index;
|
||||
if (CANGETINTURRETINDEX) exitWith {
|
||||
_turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
||||
|
||||
_radius = getNumber (_config >> "getInRadius");
|
||||
_selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner"));
|
||||
|
||||
_return = true
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
case "ffv" : {
|
||||
private ["_turrets", "_turretConfig"];
|
||||
_turrets = [_vehicle] call FUNC(getTurretsFFV);
|
||||
|
||||
if (_index != -1 && {_turret = _turrets select _index;
|
||||
CANGETINTURRETINDEX
|
||||
}) then {
|
||||
_turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
||||
|
||||
_radius = getNumber (_config >> "getInRadius");
|
||||
_selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner"));
|
||||
|
||||
_return = true
|
||||
} else {
|
||||
for "_index" from 0 to (count _turrets - 1) do {
|
||||
_turret = _turrets select _index;
|
||||
if (CANGETINTURRETINDEX) exitWith {
|
||||
_turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
||||
|
||||
_radius = getNumber (_config >> "getInRadius");
|
||||
_selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner"));
|
||||
|
||||
_return = true
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
case "codriver" : {
|
||||
private "_positions";
|
||||
_positions = [typeOf _vehicle] call FUNC(getVehicleCodriver);
|
||||
|
||||
{
|
||||
if (alive _x) then {_positions deleteAt (_positions find (_vehicle getCargoIndex _x))};
|
||||
} forEach crew _vehicle;
|
||||
|
||||
if (_index != -1 && {_index in _positions}) then {
|
||||
_radius = getNumber (_config >> "getInRadius");
|
||||
_selectionPosition = _vehicle selectionPosition (getText (_config >> "memoryPointsGetInCargo"));
|
||||
|
||||
if (_vehicle isKindOf "Car" && {!(_vehicle isKindOf "Wheeled_APC_F")}) then {
|
||||
_selectionPosition2 = _vehicle selectionPosition (getText (_config >> "memoryPointsGetInDriver"));
|
||||
_selectionPosition2 set [0, -(_selectionPosition2 select 0)];
|
||||
};
|
||||
|
||||
_return = true
|
||||
} else {
|
||||
|
||||
_index = _positions select 0;
|
||||
if (!isNil "_index") then {
|
||||
case "driver" : {
|
||||
_radius = getNumber (_config >> "getInRadius");
|
||||
_selectionPosition = _vehicle selectionPosition (getText (_config >> "memoryPointsGetInCargo"));
|
||||
_selectionPosition = _vehicle selectionPosition (getText (_config >> "memoryPointsGetInDriver"));
|
||||
|
||||
if (_vehicle isKindOf "Car" && {!(_vehicle isKindOf "Wheeled_APC_F")}) then {
|
||||
_selectionPosition2 = _vehicle selectionPosition (getText (_config >> "memoryPointsGetInDriver"));
|
||||
_selectionPosition2 set [0, -(_selectionPosition2 select 0)];
|
||||
if (_vehicle isKindOf "Tank") then {
|
||||
_selectionPosition2 = [-(_selectionPosition select 0), _selectionPosition select 1, _selectionPosition select 2];
|
||||
};
|
||||
|
||||
_return = true
|
||||
};
|
||||
_return = CANGETINDRIVER;
|
||||
};
|
||||
};
|
||||
|
||||
case "cargo" : {
|
||||
private "_positions";
|
||||
_positions = [typeOf _vehicle] call FUNC(getVehicleCargo);
|
||||
|
||||
{
|
||||
if (alive _x) then {_positions deleteAt (_positions find (_vehicle getCargoIndex _x))};
|
||||
} forEach crew _vehicle;
|
||||
|
||||
if (_index != -1 && {_index in _positions}) then {
|
||||
_radius = getNumber (_config >> "getInRadius");
|
||||
_selectionPosition = _vehicle selectionPosition (getText (_config >> "memoryPointsGetInCargo"));
|
||||
|
||||
if (_vehicle isKindOf "Car" && {!(_vehicle isKindOf "Wheeled_APC_F")}) then {
|
||||
_selectionPosition2 = _vehicle selectionPosition (getText (_config >> "memoryPointsGetInDriver"));
|
||||
_selectionPosition2 set [0, -(_selectionPosition2 select 0)];
|
||||
};
|
||||
|
||||
_return = true
|
||||
} else {
|
||||
|
||||
_index = _positions select 0;
|
||||
if (!isNil "_index") then {
|
||||
case "pilot" : {
|
||||
_radius = getNumber (_config >> "getInRadius");
|
||||
_selectionPosition = _vehicle selectionPosition (getText (_config >> "memoryPointsGetInCargo"));
|
||||
_selectionPosition = _vehicle selectionPosition (getText (_config >> "memoryPointsGetInDriver"));
|
||||
|
||||
if (_vehicle isKindOf "Car" && {!(_vehicle isKindOf "Wheeled_APC_F")}) then {
|
||||
_selectionPosition2 = _vehicle selectionPosition (getText (_config >> "memoryPointsGetInDriver"));
|
||||
_selectionPosition2 set [0, -(_selectionPosition2 select 0)];
|
||||
};
|
||||
|
||||
_return = true
|
||||
};
|
||||
_return = CANGETINDRIVER;
|
||||
};
|
||||
};
|
||||
|
||||
default {};
|
||||
case "gunner" : {
|
||||
private "_turretConfig";
|
||||
_turret = [_vehicle] call FUNC(getTurretGunner);
|
||||
if (_turret isEqualTo []) exitWith {false};
|
||||
|
||||
_turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
||||
|
||||
_radius = getNumber (_config >> "getInRadius");
|
||||
_selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner"));
|
||||
|
||||
_return = CANGETINTURRETINDEX
|
||||
};
|
||||
|
||||
case "commander" : {
|
||||
private "_turretConfig";
|
||||
_turret = [_vehicle] call FUNC(getTurretCommander);
|
||||
if (_turret isEqualTo []) exitWith {false};
|
||||
|
||||
_turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
||||
|
||||
_radius = getNumber (_config >> "getInRadius");
|
||||
_selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner"));
|
||||
|
||||
_return = CANGETINTURRETINDEX
|
||||
};
|
||||
|
||||
case "copilot" : {
|
||||
private "_turretConfig";
|
||||
_turret = [_vehicle] call FUNC(getTurretCopilot);
|
||||
if (_turret isEqualTo []) exitWith {false};
|
||||
|
||||
_turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
||||
|
||||
_radius = getNumber (_config >> "getInRadius");
|
||||
_selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner"));
|
||||
|
||||
_return = CANGETINTURRETINDEX
|
||||
};
|
||||
|
||||
case "turret" : {
|
||||
private ["_turrets", "_turretConfig"];
|
||||
_turrets = [_vehicle] call FUNC(getTurretsOther);
|
||||
|
||||
if (_index != -1 && {_turret = _turrets select _index;
|
||||
CANGETINTURRETINDEX
|
||||
}) then {
|
||||
_turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
||||
|
||||
_radius = getNumber (_config >> "getInRadius");
|
||||
_selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner"));
|
||||
|
||||
_return = true
|
||||
} else {
|
||||
for "_index" from 0 to (count _turrets - 1) do {
|
||||
_turret = _turrets select _index;
|
||||
if (CANGETINTURRETINDEX) exitWith {
|
||||
_turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
||||
|
||||
_radius = getNumber (_config >> "getInRadius");
|
||||
_selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner"));
|
||||
|
||||
_return = true
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
case "ffv" : {
|
||||
private ["_turrets", "_turretConfig"];
|
||||
_turrets = [_vehicle] call FUNC(getTurretsFFV);
|
||||
|
||||
if (_index != -1 && {_turret = _turrets select _index;
|
||||
CANGETINTURRETINDEX
|
||||
}) then {
|
||||
_turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
||||
|
||||
_radius = getNumber (_config >> "getInRadius");
|
||||
_selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner"));
|
||||
|
||||
_return = true
|
||||
} else {
|
||||
for "_index" from 0 to (count _turrets - 1) do {
|
||||
_turret = _turrets select _index;
|
||||
if (CANGETINTURRETINDEX) exitWith {
|
||||
_turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
||||
|
||||
_radius = getNumber (_config >> "getInRadius");
|
||||
_selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner"));
|
||||
|
||||
_return = true
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
case "codriver" : {
|
||||
private "_positions";
|
||||
_positions = [typeOf _vehicle] call FUNC(getVehicleCodriver);
|
||||
|
||||
{
|
||||
if (alive _x) then {_positions deleteAt (_positions find (_vehicle getCargoIndex _x))};
|
||||
} forEach crew _vehicle;
|
||||
|
||||
if (_index != -1 && {_index in _positions}) then {
|
||||
_radius = getNumber (_config >> "getInRadius");
|
||||
_selectionPosition = _vehicle selectionPosition (getText (_config >> "memoryPointsGetInCargo"));
|
||||
|
||||
if (_vehicle isKindOf "Car" && {!(_vehicle isKindOf "Wheeled_APC_F")}) then {
|
||||
_selectionPosition2 = _vehicle selectionPosition (getText (_config >> "memoryPointsGetInDriver"));
|
||||
_selectionPosition2 set [0, -(_selectionPosition2 select 0)];
|
||||
};
|
||||
|
||||
_return = true
|
||||
} else {
|
||||
_index = _positions select 0;
|
||||
if (!isNil "_index") then {
|
||||
_radius = getNumber (_config >> "getInRadius");
|
||||
_selectionPosition = _vehicle selectionPosition (getText (_config >> "memoryPointsGetInCargo"));
|
||||
|
||||
if (_vehicle isKindOf "Car" && {!(_vehicle isKindOf "Wheeled_APC_F")}) then {
|
||||
_selectionPosition2 = _vehicle selectionPosition (getText (_config >> "memoryPointsGetInDriver"));
|
||||
_selectionPosition2 set [0, -(_selectionPosition2 select 0)];
|
||||
};
|
||||
|
||||
_return = true
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
case "cargo" : {
|
||||
private "_positions";
|
||||
_positions = [typeOf _vehicle] call FUNC(getVehicleCargo);
|
||||
|
||||
{
|
||||
if (alive _x) then {_positions deleteAt (_positions find (_vehicle getCargoIndex _x))};
|
||||
} forEach crew _vehicle;
|
||||
|
||||
if (_index != -1 && {_index in _positions}) then {
|
||||
_radius = getNumber (_config >> "getInRadius");
|
||||
_selectionPosition = _vehicle selectionPosition (getText (_config >> "memoryPointsGetInCargo"));
|
||||
|
||||
if (_vehicle isKindOf "Car" && {!(_vehicle isKindOf "Wheeled_APC_F")}) then {
|
||||
_selectionPosition2 = _vehicle selectionPosition (getText (_config >> "memoryPointsGetInDriver"));
|
||||
_selectionPosition2 set [0, -(_selectionPosition2 select 0)];
|
||||
};
|
||||
|
||||
_return = true
|
||||
} else {
|
||||
|
||||
_index = _positions select 0;
|
||||
if (!isNil "_index") then {
|
||||
_radius = getNumber (_config >> "getInRadius");
|
||||
_selectionPosition = _vehicle selectionPosition (getText (_config >> "memoryPointsGetInCargo"));
|
||||
|
||||
if (_vehicle isKindOf "Car" && {!(_vehicle isKindOf "Wheeled_APC_F")}) then {
|
||||
_selectionPosition2 = _vehicle selectionPosition (getText (_config >> "memoryPointsGetInDriver"));
|
||||
_selectionPosition2 set [0, -(_selectionPosition2 select 0)];
|
||||
};
|
||||
|
||||
_return = true
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
default {};
|
||||
};
|
||||
|
||||
private "_fnc_isInRange";
|
||||
_fnc_isInRange = {
|
||||
if (_radius == 0) exitWith {true};
|
||||
if (_radius == 0) exitWith {true};
|
||||
|
||||
private ["_unitPosition", "_distance"];
|
||||
_unitPosition = getPos _unit;
|
||||
private ["_unitPosition", "_distance"];
|
||||
_unitPosition = getPos _unit;
|
||||
|
||||
_distance = _unitPosition distance (_vehicle modelToWorldVisual _selectionPosition);
|
||||
_distance = _unitPosition distance (_vehicle modelToWorldVisual _selectionPosition);
|
||||
|
||||
if (!isNil "_selectionPosition2") then {
|
||||
_distance = _distance min (_unitPosition distance (_vehicle modelToWorldVisual _selectionPosition2));
|
||||
};
|
||||
if (!isNil "_selectionPosition2") then {
|
||||
_distance = _distance min (_unitPosition distance (_vehicle modelToWorldVisual _selectionPosition2));
|
||||
};
|
||||
|
||||
_distance < _radius
|
||||
_distance < _radius
|
||||
};
|
||||
|
||||
// if you want into the cargo and you can't, then check ffv turrets aswell
|
||||
if (_position == "cargo") exitWith {
|
||||
if (_return && {!_checkDistance || {_vehicle == vehicle _unit} || _fnc_isInRange}) then {true} else {
|
||||
[_unit, _vehicle, "ffv", _checkDistance] call FUNC(canGetInPosition);
|
||||
}
|
||||
if (_return && {!_checkDistance || {_vehicle == vehicle _unit} || _fnc_isInRange}) then {true} else {
|
||||
[_unit, _vehicle, "ffv", _checkDistance] call FUNC(canGetInPosition);
|
||||
};
|
||||
};
|
||||
|
||||
_return && {!_checkDistance || {_vehicle == vehicle _unit} || _fnc_isInRange}
|
||||
|
@ -8,6 +8,7 @@
|
||||
* @PublicAPI: true
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
private ["_unit","_return"];
|
||||
_unit = _this select 0;
|
||||
|
||||
PARAMS_1(_unit);
|
||||
|
||||
(((_unit getvariable [QGVAR(canInteract),0]) < 1) && ([_unit] call FUNC(isAwake)) && !([_unit] call FUNC(isArrested)))
|
@ -14,10 +14,10 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_target", "_exceptions"];
|
||||
private ["_exceptions"];
|
||||
|
||||
PARAMS_2(_unit,_target);
|
||||
|
||||
_unit = _this select 0;
|
||||
_target = _this select 1;
|
||||
_exceptions = if (count _this > 2) then {
|
||||
_this select 2;
|
||||
} else {
|
||||
|
@ -3,9 +3,9 @@
|
||||
|
||||
// returns true if the unit is on foot or in a ffv position
|
||||
|
||||
private ["_unit", "_config"];
|
||||
private ["_config"];
|
||||
|
||||
_unit = _this select 0;
|
||||
PARAMS_1(_unit);
|
||||
|
||||
if (_unit == vehicle _unit) exitWith {true};
|
||||
|
||||
|
@ -14,11 +14,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_projectile", "_adjustDir", "_adjustUp", "_adjustSpeed", "_vdir", "_dir", "_up", "_l", "_r", "_vup", "_vel"];
|
||||
private ["_adjustSpeed", "_vdir", "_dir", "_up", "_vup", "_vel", "_vlat"];
|
||||
|
||||
_projectile = _this select 0;
|
||||
_adjustDir = _this select 1;
|
||||
_adjustUp = _this select 2;
|
||||
PARAMS_3(_projectile,_adjustDir,_adjustUp);
|
||||
|
||||
_adjustSpeed = if (count _this > 3) then {
|
||||
_this select 3
|
||||
|
@ -49,6 +49,9 @@ _addons = [_addons, {_this find "ace_" == 0}] call FUNC(filter);
|
||||
if (hasInterface) then {
|
||||
["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);
|
||||
};
|
||||
} else {
|
||||
// Print the current extension version
|
||||
diag_log text format ["[ACE] Extension version: %1: %2", _x, (_x callExtension "version")];
|
||||
};
|
||||
} forEach getArray (configFile >> "ACE_Extensions" >> "extensions");
|
||||
|
||||
|
@ -16,13 +16,11 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_mode", "_checkAll", "_whitelist", "_logic"];
|
||||
private ["_logic"];
|
||||
|
||||
_this resize 3;
|
||||
|
||||
_mode = _this select 0;
|
||||
_checkAll = _this select 1;
|
||||
_whitelist = _this select 2;
|
||||
PARAMS_3(_mode,_checkAll,_whitelist);
|
||||
|
||||
if (isNil "_checkAll") then {
|
||||
_checkAll = false;
|
||||
|
@ -13,12 +13,8 @@
|
||||
*
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_target", "_lockTarget"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_target = _this select 1;
|
||||
_lockTarget = _this select 2;
|
||||
|
||||
PARAMS_3(_unit,_target,_lockTarget);
|
||||
|
||||
if (isNil "_lockTarget") then {_lockTarget = false};
|
||||
|
||||
@ -26,7 +22,7 @@ private "_owner";
|
||||
_owner = _target getVariable [QGVAR(owner), objNull];
|
||||
|
||||
if (!isNull _owner && {!isNull _unit} && {_unit != _owner}) then {
|
||||
diag_log text "[ACE] ERROR: Claiming already owned object.";
|
||||
diag_log text "[ACE] ERROR: Claiming already owned object.";
|
||||
};
|
||||
|
||||
// transfer this immediately
|
||||
|
@ -13,36 +13,37 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
_this spawn {
|
||||
_target = _this select 0;
|
||||
_ignoreDead = _this select 1;
|
||||
if (isNil "_ignoreDead") then {_ignoreDead = false};
|
||||
PARAMS_2(_target,_ignoreDead);
|
||||
private["_inVehicle", "_position", "_vehiclePlayer", "_vehicleTarget"];
|
||||
|
||||
if (isNil "_ignoreDead") then {_ignoreDead = false};
|
||||
|
||||
_vehicleTarget = vehicle _target;
|
||||
_vehiclePlayer = vehicle ACE_player;
|
||||
_inVehicle = _target != _vehicleTarget;
|
||||
_vehicleTarget = vehicle _target;
|
||||
_vehiclePlayer = vehicle ACE_player;
|
||||
_inVehicle = _target != _vehicleTarget;
|
||||
|
||||
_position = getPosASL _target;
|
||||
_position = getPosASL _target;
|
||||
|
||||
_fnc_check = {
|
||||
// either unit changed vehicles
|
||||
if (_vehiclePlayer != vehicle ACE_player) exitWith {True};
|
||||
if (_vehicleTarget != vehicle _target) exitWith {True};
|
||||
_fnc_check = {
|
||||
// either unit changed vehicles
|
||||
if (_vehiclePlayer != vehicle ACE_player) exitWith {True};
|
||||
if (_vehicleTarget != vehicle _target) exitWith {True};
|
||||
|
||||
// target died
|
||||
if (!alive _target && {!_ignoreDead}) exitWith {True};
|
||||
// target died
|
||||
if (!alive _target && {!_ignoreDead}) exitWith {True};
|
||||
|
||||
// player fell unconscious
|
||||
if (ACE_player getVariable ["ACE_isUnconscious", False]) exitWith {True};
|
||||
// player fell unconscious
|
||||
if (ACE_player getVariable ["ACE_isUnconscious", False]) exitWith {True};
|
||||
|
||||
// target moved (outside of vehicle)
|
||||
(!_inVehicle && {getPosASL _target distanceSqr _position > 1})
|
||||
};
|
||||
|
||||
waitUntil {
|
||||
if (call _fnc_check) then {
|
||||
closeDialog 0;
|
||||
call EFUNC(interaction,hideMenu);
|
||||
// target moved (outside of vehicle)
|
||||
(!_inVehicle && {getPosASL _target distanceSqr _position > 1})
|
||||
};
|
||||
|
||||
waitUntil {
|
||||
if (call _fnc_check) then {
|
||||
closeDialog 0;
|
||||
call EFUNC(interaction,hideMenu);
|
||||
};
|
||||
(isNil QEGVAR(interaction,MainButton) && !dialog) || {!isNull (uiNamespace getVariable [QGVAR(dlgDisableMouse), displayNull])} //Exit loop if DisableMouse dialog open
|
||||
};
|
||||
(isNil QEGVAR(interaction,MainButton) && !dialog) || {!isNull (uiNamespace getVariable [QGVAR(dlgDisableMouse), displayNull])} //Exit loop if DisableMouse dialog open
|
||||
};
|
||||
};
|
||||
|
@ -11,9 +11,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private "_function";
|
||||
|
||||
_function = _this select 0;
|
||||
PARAMS_1(_function);
|
||||
|
||||
if (typeName _function == "STRING") exitWith {_function};
|
||||
|
||||
|
@ -16,9 +16,7 @@
|
||||
|
||||
#define KEY_MODIFIERS [42, 54, 29, 157, 56, 184]
|
||||
|
||||
private "_key";
|
||||
|
||||
_key = _this select 0;
|
||||
PARAMS_1(_key);
|
||||
|
||||
if (_key in KEY_MODIFIERS) exitWith {_key};
|
||||
|
||||
|
@ -12,8 +12,8 @@
|
||||
#define DEFAULT_LOGGING_LEVEL -1
|
||||
#define DEFAULT_TEXT_DISPLAY -1
|
||||
|
||||
private ["_msg", "_level", "_prefix", "_defaultLoglevel","_defaultLogDisplayLevel", "_message", "_from"];
|
||||
_msg = _this select 0;
|
||||
private ["_level", "_prefix", "_defaultLoglevel","_defaultLogDisplayLevel", "_message"];
|
||||
PARAMS_1(_msg);
|
||||
_level = if (count _this > 1) then {_this select 1} else { 2 };
|
||||
|
||||
if (typeName _level != "NUMBER") then {
|
||||
|
@ -7,9 +7,10 @@
|
||||
* @Return:
|
||||
* @PublicAPI: false
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
private ["_entity"];
|
||||
_entity = _this select 0;
|
||||
|
||||
PARAMS_1(_entity);
|
||||
|
||||
GVAR(LOGDISPLAY_LEVEL) = call compile (_entity getvariable ["logDisplayLevel","4"]);
|
||||
GVAR(LOGLEVEL) = call compile (_entity getvariable ["logLevel","4"]);
|
||||
|
@ -9,11 +9,10 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_name","_value","_defaultGlobal","_catagory","_code","_persistent"];
|
||||
_name = _this select 0;
|
||||
_value = _this select 1;
|
||||
_defaultGlobal = _this select 2;
|
||||
_catagory = _this select 3;
|
||||
private ["_code","_persistent"];
|
||||
|
||||
PARAMS_4(_name,_value,_defaultGlobal,_catagory);
|
||||
|
||||
_code = 0;
|
||||
_persistent = false;
|
||||
|
||||
|
@ -13,9 +13,9 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_state", "_dlg"];
|
||||
private ["_dlg"];
|
||||
|
||||
_state = _this select 0;
|
||||
PARAMS_1(_state);
|
||||
|
||||
if (_state) then {
|
||||
disableSerialization;
|
||||
@ -37,6 +37,7 @@ if (_state) then {
|
||||
_dlg = uiNamespace getVariable QGVAR(dlgDisableMouse);
|
||||
|
||||
_dlg displayAddEventHandler ["KeyDown", {
|
||||
private ["_key", "_dlg", "_ctrl", "_config", "_acc", "_index"];
|
||||
_key = _this select 1;
|
||||
|
||||
if (_key == 1 && {alive player}) then {
|
||||
|
@ -2,7 +2,7 @@
|
||||
* Author: Glowbal
|
||||
*
|
||||
* Draw progress bar and execute given function if succesful.
|
||||
* Finish/Failure/Conditional are all passed [_args, _elapsedTime, _totalTime, _errorCode]
|
||||
* Finish/Failure/Conditional are all passed [args, elapsedTime, totalTime, errorCode]
|
||||
*
|
||||
* Argument:
|
||||
* 0: icon ID <STRING>
|
||||
@ -42,11 +42,10 @@
|
||||
// other constants
|
||||
#define DEFAULT_TIME 6
|
||||
|
||||
private ["_iconId", "_show", "_icon", "_allControls", "_refresh", "_timeAlive", "_list", "_color"];
|
||||
_iconId = _this select 0;
|
||||
_show = _this select 1;
|
||||
_icon = _this select 2;
|
||||
_color = _this select 3;
|
||||
private ["_allControls", "_refresh", "_timeAlive", "_list"];
|
||||
|
||||
PARAMS_4(_iconId,_show,_icon,_color);
|
||||
|
||||
_timeAlive = if (count _this > 4) then {_this select 4} else {DEFAULT_TIME};
|
||||
|
||||
disableSerialization;
|
||||
@ -62,7 +61,7 @@ _refresh = {
|
||||
|
||||
_allControls = [];
|
||||
|
||||
private ["_ctrl", "_setting"];
|
||||
private ["_ctrl", "_setting", "_position"];
|
||||
_setting = missionNamespace getvariable[QGVAR(settingFeedbackIcons), 0];
|
||||
if (_setting > 0) then {
|
||||
{
|
||||
@ -87,13 +86,13 @@ _refresh = {
|
||||
|
||||
if (_show) then {
|
||||
if ({(_x select 0 == _iconId)} count _list == 0) then {
|
||||
_list pushback [_iconId, _icon, _color, time];
|
||||
_list pushback [_iconId, _icon, _color, ACE_time];
|
||||
} else {
|
||||
{
|
||||
if (_x select 0 == _iconId) exitwith {
|
||||
_list set [_foreachIndex, [_iconId, _icon, _color, time]];
|
||||
_list set [_foreachIndex, [_iconId, _icon, _color, ACE_time]];
|
||||
};
|
||||
}foreach _list;
|
||||
} forEach _list;
|
||||
};
|
||||
missionNamespace setvariable [QGVAR(displayIconList), _list];
|
||||
call _refresh;
|
||||
@ -112,7 +111,7 @@ if (_show) then {
|
||||
if (_x select 0 != _iconId) then {
|
||||
_newList pushback _x;
|
||||
};
|
||||
}foreach _list;
|
||||
} forEach _list;
|
||||
|
||||
missionNamespace setvariable [QGVAR(displayIconList), _newList];
|
||||
call _refresh;
|
||||
|
@ -20,11 +20,9 @@
|
||||
|
||||
_this resize 4;
|
||||
|
||||
private ["_text", "_sound", "_delay", "_priority", "_lastHintTime", "_lastHintPriority", "_time"];
|
||||
_text = _this select 0;
|
||||
_sound = _this select 1;
|
||||
_delay = _this select 2;
|
||||
_priority = _this select 3;
|
||||
private ["_lastHintTime", "_lastHintPriority", "_time"];
|
||||
|
||||
PARAMS_4(_text,_sound,_delay,_priority);
|
||||
|
||||
if (isNil QGVAR(lastHint)) then {
|
||||
GVAR(lastHint) = [0, 0];
|
||||
@ -38,7 +36,7 @@ if (isNil "_sound") then {_sound = DEFAULT_PLAY_SOUND};
|
||||
if (isNil "_delay") then {_delay = DEFAULT_DELAY};
|
||||
if (isNil "_priority") then {_priority = DEFAULT_PRIORITY};
|
||||
|
||||
_time = time;
|
||||
_time = ACE_time;
|
||||
if (_time > _lastHintTime + _delay || {_priority >= _lastHintPriority}) then {
|
||||
hintSilent _text;
|
||||
if (_sound) then {playSound "ACE_Sound_Click"};
|
||||
|
@ -15,9 +15,8 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_text", "_image", "_imageColor", "_target"];
|
||||
_text = _this select 0;
|
||||
_image = _this select 1;
|
||||
private ["_imageColor", "_target"];
|
||||
PARAMS_2(_text,_image);
|
||||
_imageColor = if (count _this > 2) then {_this select 2} else {[1,1,1]};
|
||||
_imageColor resize 3;
|
||||
_target = if (count _this > 3) then {_this select 3} else {ACE_player};
|
||||
|
@ -16,23 +16,21 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_animation", "_priority", "_force"];
|
||||
private ["_force"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_animation = _this select 1;
|
||||
_priority = _this select 2;
|
||||
PARAMS_3(_unit,_animation,_priority);
|
||||
_force = False;
|
||||
|
||||
// no animation given
|
||||
if (isNil "_animation") exitWith {
|
||||
diag_log format ["[ACE] ERROR: No animation specified in %1", _fnc_scriptNameParent];
|
||||
diag_log format ["[ACE] ERROR: No animation specified in %1", _fnc_scriptNameParent];
|
||||
};
|
||||
|
||||
if (isNil "_priority") then {
|
||||
_priority = 0;
|
||||
_priority = 0;
|
||||
};
|
||||
if (count _this > 3) then {
|
||||
_force = _this select 3;
|
||||
_force = _this select 3;
|
||||
};
|
||||
|
||||
// don't overwrite more important animations
|
||||
@ -43,31 +41,31 @@ if (_animation == "Unconscious" && {!((_unit getVariable ["ACE_isUnconscious", f
|
||||
|
||||
// switchMove "" no longer works in dev 1.37
|
||||
if (_animation == "") then {
|
||||
_animation = [_unit] call FUNC(getDefaultAnim);
|
||||
_animation = [_unit] call FUNC(getDefaultAnim);
|
||||
};
|
||||
|
||||
switch (_priority) do {
|
||||
case 0 : {
|
||||
if (_unit == vehicle _unit) then {
|
||||
[_unit, format ["{_this playMove '%1'}", _animation], _unit] call FUNC(execRemoteFnc);
|
||||
} else {
|
||||
// Execute on all machines. PlayMove and PlayMoveNow are bugged: They have no global effects when executed on remote machines inside vehicles.
|
||||
[_unit, format ["{_this playMove '%1'}", _animation]] call FUNC(execRemoteFnc);
|
||||
case 0 : {
|
||||
if (_unit == vehicle _unit) then {
|
||||
[_unit, format ["{_this playMove '%1'}", _animation], _unit] call FUNC(execRemoteFnc);
|
||||
} else {
|
||||
// Execute on all machines. PlayMove and PlayMoveNow are bugged: They have no global effects when executed on remote machines inside vehicles.
|
||||
[_unit, format ["{_this playMove '%1'}", _animation]] call FUNC(execRemoteFnc);
|
||||
};
|
||||
};
|
||||
};
|
||||
case 1 : {
|
||||
if (_unit == vehicle _unit) then {
|
||||
[_unit, format ["{_this playMoveNow '%1'}", _animation], _unit] call FUNC(execRemoteFnc);
|
||||
} else {
|
||||
// Execute on all machines. PlayMove and PlayMoveNow are bugged: They have no global effects when executed on remote machines inside vehicles.
|
||||
[_unit, format ["{_this playMoveNow '%1'}", _animation]] call FUNC(execRemoteFnc);
|
||||
case 1 : {
|
||||
if (_unit == vehicle _unit) then {
|
||||
[_unit, format ["{_this playMoveNow '%1'}", _animation], _unit] call FUNC(execRemoteFnc);
|
||||
} else {
|
||||
// Execute on all machines. PlayMove and PlayMoveNow are bugged: They have no global effects when executed on remote machines inside vehicles.
|
||||
[_unit, format ["{_this playMoveNow '%1'}", _animation]] call FUNC(execRemoteFnc);
|
||||
};
|
||||
};
|
||||
};
|
||||
case 2 : {
|
||||
// Execute on all machines. SwitchMove has local effects.
|
||||
[_unit, format ["{_this switchMove '%1'}", _animation]] call FUNC(execRemoteFnc);
|
||||
};
|
||||
default {};
|
||||
case 2 : {
|
||||
// Execute on all machines. SwitchMove has local effects.
|
||||
[_unit, format ["{_this switchMove '%1'}", _animation]] call FUNC(execRemoteFnc);
|
||||
};
|
||||
default {};
|
||||
};
|
||||
|
||||
["Anim", [_priority, _animation]] call FUNC(log);
|
||||
|
@ -12,17 +12,13 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private "_unit";
|
||||
PARAMS_1(_unit);
|
||||
|
||||
_unit = _this select 0;
|
||||
private ["_backpackObject","_holder"];
|
||||
|
||||
private "_backpackObject";
|
||||
_backpackObject = backpackContainer _unit;
|
||||
|
||||
_unit addBackpack "Bag_Base";
|
||||
removeBackpack _unit;
|
||||
|
||||
private "_holder";
|
||||
_holder = objNull;
|
||||
|
||||
{
|
||||
|
@ -1,17 +1,20 @@
|
||||
//fnc_dumpArray.sqf
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_var", "_depth", "_pad", "_i", "_x"];
|
||||
private ["_pad", "_i", "_x"];
|
||||
|
||||
PARAMS_2(_var,_depth);
|
||||
|
||||
_var = _this select 0;
|
||||
_depth = _this select 1;
|
||||
_pad = "";
|
||||
|
||||
for "_i" from 0 to _depth do {
|
||||
_pad = _pad + toString [9];
|
||||
};
|
||||
|
||||
_depth = _depth + 1;
|
||||
if(IS_ARRAY(_var)) then {
|
||||
if((count _var) > 0) then {
|
||||
|
||||
if (IS_ARRAY(_var)) then {
|
||||
if ((count _var) > 0) then {
|
||||
diag_log text format["%1[", _pad];
|
||||
{
|
||||
[_x, _depth] call FUNC(dumpArray);
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
diag_log text format["REGISTERED ACE PFH HANDLERS"];
|
||||
diag_log text format["-------------------------------------------"];
|
||||
if(!isNil "ACE_PFH_COUNTER") then {
|
||||
if (!isNil "ACE_PFH_COUNTER") then {
|
||||
{
|
||||
private["_pfh"];
|
||||
_pfh = _x select 0;
|
||||
@ -16,7 +16,7 @@ if(!isNil "ACE_PFH_COUNTER") then {
|
||||
diag_log text format["ACE COUNTER RESULTS"];
|
||||
diag_log text format["-------------------------------------------"];
|
||||
{
|
||||
private["_counterEntry", "_iter", "_total", "_count", "_delta", "_averageResult"];
|
||||
private ["_counterEntry", "_iter", "_total", "_count", "_delta", "_averageResult"];
|
||||
_counterEntry = _x;
|
||||
_iter = 0;
|
||||
_total = 0;
|
||||
|
@ -13,6 +13,6 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
EXPLODE_2_PVT(_this,_namespace,_uid);
|
||||
PARAMS_2(_namespace,_uid);
|
||||
|
||||
_namespace setVariable [_uid, nil];
|
||||
|
@ -15,7 +15,6 @@
|
||||
disableSerialization;
|
||||
endLoadingScreen;
|
||||
|
||||
|
||||
// no message without player possible
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
@ -30,10 +29,9 @@ if (isNull (call BIS_fnc_displayMission)) exitWith {
|
||||
}, 1, _this] call CBA_fnc_addPerFrameHandler;
|
||||
};
|
||||
|
||||
private ["_textHeader", "_textMessage", "_onOK", "_onCancel"];
|
||||
private ["_onOK", "_onCancel"];
|
||||
|
||||
_textHeader = _this select 0;
|
||||
_textMessage = _this select 1;
|
||||
PARAMS_2(_textHeader,_textMessage);
|
||||
_onOK = ARR_SELECT(_this,2,{});
|
||||
_onCancel = ARR_SELECT(_this,3,{});
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
EXPLODE_2_PVT(_this,_func,_params);
|
||||
PARAMS_2(_func,_params);
|
||||
|
||||
[
|
||||
{
|
||||
|
@ -36,9 +36,9 @@ _persistentFunctions = _unit getVariable ["ACE_PersistentFunctions", []];
|
||||
// find index to overwrite function with the same name, add to end otherwise
|
||||
_index = count _persistentFunctions;
|
||||
{
|
||||
if (_x select 2 == _name) exitWith {
|
||||
_index = _forEachIndex;
|
||||
};
|
||||
if (_x select 2 == _name) exitWith {
|
||||
_index = _forEachIndex;
|
||||
};
|
||||
} forEach _persistentFunctions;
|
||||
|
||||
// set new value
|
||||
@ -46,8 +46,8 @@ _persistentFunctions set [_index, [_arguments, _function, _name]];
|
||||
|
||||
// broadcast variable
|
||||
if (typeName _unit == "NAMESPACE") then {
|
||||
ACE_PersistentFunctions = _persistentFunctions;
|
||||
publicVariable "ACE_PersistentFunctions";
|
||||
ACE_PersistentFunctions = _persistentFunctions;
|
||||
publicVariable "ACE_PersistentFunctions";
|
||||
} else {
|
||||
_unit setVariable ["ACE_PersistentFunctions", _persistentFunctions, true];
|
||||
_unit setVariable ["ACE_PersistentFunctions", _persistentFunctions, true];
|
||||
};
|
||||
|
@ -26,46 +26,46 @@ _function = call compile (_this select 1);
|
||||
_unit = _this select 2;
|
||||
|
||||
if (isNil "_unit") then {
|
||||
_unit = 2;
|
||||
_unit = 2;
|
||||
};
|
||||
|
||||
["Remote", [_arguments, _this select 1, _unit], {format ["%1 call %2 to: %3", _this select 0, _this select 1, _this select 2]}, false] call FUNC(log);
|
||||
|
||||
if (typeName _unit == "SCALAR") exitWith {
|
||||
switch (_unit) do {
|
||||
case 0 : {
|
||||
_arguments call _function;
|
||||
};
|
||||
case 1 : {
|
||||
if (isServer) then {
|
||||
_arguments call _function;
|
||||
} else {
|
||||
publicVariableServer QGVAR(remoteFnc);
|
||||
};
|
||||
};
|
||||
case 2 : {
|
||||
_arguments call _function;
|
||||
switch (_unit) do {
|
||||
case 0 : {
|
||||
_arguments call _function;
|
||||
};
|
||||
case 1 : {
|
||||
if (isServer) then {
|
||||
_arguments call _function;
|
||||
} else {
|
||||
publicVariableServer QGVAR(remoteFnc);
|
||||
};
|
||||
};
|
||||
case 2 : {
|
||||
_arguments call _function;
|
||||
|
||||
GVAR(remoteFnc) set [2, 0];
|
||||
publicVariable QGVAR(remoteFnc);
|
||||
GVAR(remoteFnc) set [2, 0];
|
||||
publicVariable QGVAR(remoteFnc);
|
||||
};
|
||||
case 3 : {
|
||||
if (isDedicated) then {
|
||||
_arguments call _function;
|
||||
} else {
|
||||
if (!isServer) then {publicVariableServer QGVAR(remoteFnc)};
|
||||
};
|
||||
};
|
||||
};
|
||||
case 3 : {
|
||||
if (isDedicated) then {
|
||||
_arguments call _function;
|
||||
} else {
|
||||
if (!isServer) then {publicVariableServer QGVAR(remoteFnc)};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
if (local _unit) then {
|
||||
_arguments call _function;
|
||||
_arguments call _function;
|
||||
} else {
|
||||
if (isServer) then {
|
||||
_id = owner _unit;
|
||||
_id publicVariableClient QGVAR(remoteFnc);
|
||||
} else {
|
||||
publicVariableServer QGVAR(remoteFnc);
|
||||
};
|
||||
if (isServer) then {
|
||||
_id = owner _unit;
|
||||
_id publicVariableClient QGVAR(remoteFnc);
|
||||
} else {
|
||||
publicVariableServer QGVAR(remoteFnc);
|
||||
};
|
||||
};
|
||||
|
@ -1,16 +1,14 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
private "_target";
|
||||
|
||||
_target = _this select 0;
|
||||
PARAMS_1(_target);
|
||||
|
||||
{
|
||||
if (isNil "_x") then {
|
||||
diag_log text format ["[ACE] ERROR: No argument and function for remote function. ID: %1", _forEachIndex];
|
||||
} else {
|
||||
if (typeName _x == "ARRAY") then {
|
||||
[_x select 0, _target] call (_x select 1);
|
||||
if (isNil "_x") then {
|
||||
diag_log text format ["[ACE] ERROR: No argument and function for remote function. ID: %1", _forEachIndex];
|
||||
} else {
|
||||
if (typeName _x == "ARRAY") then {
|
||||
[_x select 0, _target] call (_x select 1);
|
||||
};
|
||||
};
|
||||
};
|
||||
} forEach (_target getVariable ["ACE_PersistentFunctions", []]);
|
||||
|
@ -9,61 +9,59 @@
|
||||
private "_fnc_logEntries";
|
||||
|
||||
_fnc_logEntries = {
|
||||
private ["_c", "_d", "_p", "_t", "_e"];
|
||||
private ["_p", "_t", "_e", "_a", "_i"];
|
||||
|
||||
_c = _this select 0;
|
||||
_d = _this select 1;
|
||||
PARAMS_2(_c,_d);
|
||||
|
||||
_p = inheritsFrom _c;
|
||||
_p = inheritsFrom _c;
|
||||
|
||||
_t = format [["class %1: %2 {", "class %1 {"] select (configName _p == ""), configName _c, configName _p];
|
||||
for "_a" from 1 to _d do {
|
||||
_t = " " + _t;
|
||||
};
|
||||
diag_log text _t;
|
||||
|
||||
_e = [];
|
||||
for "_i" from 0 to (count _c - 1) do {
|
||||
private ["_e1, _e2"];
|
||||
_e1 = _c select _i;
|
||||
|
||||
_e2 = switch (true) do {
|
||||
case (isNumber _e1): {getNumber _e1};
|
||||
case (isText _e1): {getText _e1};
|
||||
case (isArray _e1): {getArray _e1};
|
||||
case (isClass _e1): {[_e1, _d + 1] call _fnc_logEntries; false};
|
||||
};
|
||||
|
||||
if (typeName _e2 != "BOOL") then {
|
||||
if (typeName _e2 == "ARRAY") then {
|
||||
_e2 = toArray str _e2;
|
||||
{
|
||||
if (_x == toArray "[" select 0) then {
|
||||
_e2 set [_forEachIndex, toArray "{" select 0];
|
||||
};
|
||||
if (_x == toArray "]" select 0) then {
|
||||
_e2 set [_forEachIndex, toArray "}" select 0];
|
||||
};
|
||||
} forEach _e2;
|
||||
_e2 = toString _e2;
|
||||
_t = format ["%1[] = %2;", configName _e1, _e2];
|
||||
} else {
|
||||
_t = format ["%1 = %2;", configName _e1, str _e2];
|
||||
};
|
||||
for "_a" from 0 to _d do {
|
||||
_t = format [["class %1: %2 {", "class %1 {"] select (configName _p == ""), configName _c, configName _p];
|
||||
for "_a" from 1 to _d do {
|
||||
_t = " " + _t;
|
||||
};
|
||||
diag_log text _t;
|
||||
};
|
||||
};
|
||||
diag_log text _t;
|
||||
|
||||
_t = "};";
|
||||
for "_a" from 1 to _d do {
|
||||
_t = " " + _t;
|
||||
};
|
||||
diag_log text _t;
|
||||
diag_log text "";
|
||||
_e = [];
|
||||
for "_i" from 0 to (count _c - 1) do {
|
||||
private ["_e1, _e2"];
|
||||
_e1 = _c select _i;
|
||||
|
||||
_e2 = switch (true) do {
|
||||
case (isNumber _e1): {getNumber _e1};
|
||||
case (isText _e1): {getText _e1};
|
||||
case (isArray _e1): {getArray _e1};
|
||||
case (isClass _e1): {[_e1, _d + 1] call _fnc_logEntries; false};
|
||||
};
|
||||
|
||||
if (typeName _e2 != "BOOL") then {
|
||||
if (typeName _e2 == "ARRAY") then {
|
||||
_e2 = toArray str _e2;
|
||||
{
|
||||
if (_x == toArray "[" select 0) then {
|
||||
_e2 set [_forEachIndex, toArray "{" select 0];
|
||||
};
|
||||
if (_x == toArray "]" select 0) then {
|
||||
_e2 set [_forEachIndex, toArray "}" select 0];
|
||||
};
|
||||
} forEach _e2;
|
||||
_e2 = toString _e2;
|
||||
_t = format ["%1[] = %2;", configName _e1, _e2];
|
||||
} else {
|
||||
_t = format ["%1 = %2;", configName _e1, str _e2];
|
||||
};
|
||||
for "_a" from 0 to _d do {
|
||||
_t = " " + _t;
|
||||
};
|
||||
diag_log text _t;
|
||||
};
|
||||
};
|
||||
|
||||
_t = "};";
|
||||
for "_a" from 1 to _d do {
|
||||
_t = " " + _t;
|
||||
};
|
||||
diag_log text _t;
|
||||
diag_log text "";
|
||||
};
|
||||
|
||||
[_this, 0] call _fnc_logEntries;
|
||||
|
@ -15,10 +15,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_array", "_code", "_newArray", "_index"];
|
||||
private ["_newArray", "_index"];
|
||||
|
||||
_array = _this select 0;
|
||||
_code = _this select 1;
|
||||
PARAMS_2(_array,_code);
|
||||
|
||||
if (isNil "_array") exitWith {
|
||||
diag_log text format ["[ACE] ERROR: No array for function filter in %1", _fnc_scriptNameParent];
|
||||
@ -27,8 +26,8 @@ if (isNil "_array") exitWith {
|
||||
|
||||
_newArray = [];
|
||||
for "_index" from 0 to (count _array - 1) do {
|
||||
if ((_array select _index) call _code) then {
|
||||
_newArray pushBack (_array select _index);
|
||||
};
|
||||
if ((_array select _index) call _code) then {
|
||||
_newArray pushBack (_array select _index);
|
||||
};
|
||||
};
|
||||
_newArray
|
||||
|
@ -1,9 +1,9 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_crate", "_weapons", "_items"];
|
||||
private ["_weapons", "_items"];
|
||||
|
||||
_crate = _this select 0;
|
||||
PARAMS_1(_crate);
|
||||
|
||||
// get all weapons inside the crate
|
||||
_weapons = weaponCargo _crate;
|
||||
|
@ -9,7 +9,7 @@
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [_player] call ace_common_fnc_fixLoweredRifleAnimation
|
||||
* [ACE_player] call ace_common_fnc_fixLoweredRifleAnimation
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
@ -18,5 +18,5 @@
|
||||
PARAMS_1(_unit);
|
||||
|
||||
if (currentWeapon _unit != "" && {currentWeapon _unit == primaryWeapon _unit} && {weaponLowered _unit} && {stance _unit == "STAND"} && {(vehicle _unit) == _unit}) then {
|
||||
[_unit, "amovpercmstpsraswrfldnon", 0] call FUNC(doAnimation);
|
||||
[_unit, "amovpercmstpsraswrfldnon", 0] call FUNC(doAnimation);
|
||||
};
|
||||
|
@ -10,8 +10,8 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_object", "_return", "_val", "_category"];
|
||||
_object = _this select 0;
|
||||
private ["_return", "_val", "_category"];
|
||||
PARAMS_1(_object);
|
||||
_category = if (count _this > 1) then { _this select 1 } else { "" };
|
||||
|
||||
if (isnil QGVAR(OBJECT_VARIABLES_STORAGE)) exitwith {
|
||||
|
@ -22,7 +22,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
EXPLODE_1_PVT(_this,_unit);
|
||||
PARAMS_1(_unit);
|
||||
|
||||
if (isNull _unit) exitWith {[
|
||||
"",
|
||||
|
@ -11,9 +11,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_captivityReasons", "_unitCaptivityStatus", "_unitCaptivityReasons"];
|
||||
private ["_captivityReasons", "_unitCaptivityStatus", "_unitCaptivityReasons"];
|
||||
|
||||
_unit = _this select 0;
|
||||
PARAMS_1(_unit);
|
||||
|
||||
_captivityReasons = missionNamespace getVariable ["ACE_captivityReasons", []];
|
||||
|
||||
@ -21,9 +21,9 @@ _unitCaptivityStatus = [captiveNum _unit, count _captivityReasons] call FUNC(bin
|
||||
|
||||
_unitCaptivityReasons = [];
|
||||
{
|
||||
if (_unitCaptivityStatus select _forEachIndex) then {
|
||||
_unitCaptivityReasons pushBack _x;
|
||||
};
|
||||
if (_unitCaptivityStatus select _forEachIndex) then {
|
||||
_unitCaptivityReasons pushBack _x;
|
||||
};
|
||||
} forEach _captivityReasons;
|
||||
|
||||
_unitCaptivityReasons
|
||||
|
@ -1,10 +1,9 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_name", "_cfgClass", "_classes"];
|
||||
private ["_classes"];
|
||||
|
||||
_name = _this select 0;
|
||||
_cfgClass = _this select 1;
|
||||
PARAMS_2(_name,_cfgClass);
|
||||
|
||||
_classes = format ["configName inheritsFrom _x == '%1'", _name] configClasses (configFile >> _cfgClass);
|
||||
_classes = [_classes, {configName _this}] call FUNC(map);
|
||||
|
@ -11,9 +11,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_vehicle", "_config", "_turret"];
|
||||
private ["_config", "_turret"];
|
||||
|
||||
_vehicle = _this select 0;
|
||||
PARAMS_1(_vehicle);
|
||||
|
||||
_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
_turret = [_vehicle] call FUNC(getTurretCommander);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user