This commit is contained in:
SzwedzikPL 2015-05-26 12:44:38 +02:00
commit a416c8c798
398 changed files with 4255 additions and 947 deletions

View File

@ -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>

View File

@ -5,30 +5,30 @@ 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(alwaysSimulateForGroupMembers) {
displayName = "Always Enabled For Group Members";
description = "Always enables advanced ballistics when a group member fires";
class GVAR(simulateForGroupMembers) {
displayName = "Enabled For Group Members";
description = "Enables advanced ballistics for non local group members";
typeName = "BOOL";
value = 0;
};
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 = 0;
};
class GVAR(disabledInFullAutoMode) {
displayName = "Disabled In FullAuto Mode";
description = "Disables the advanced ballistics during full auto fire";
description = "Disables advanced ballistics during full auto fire";
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)";
typeName = "BOOL";
value = 1;
};
/* // TODO: We currently do not have firedEHs on vehicles
class GVAR(vehicleGunnerEnabled) {
displayName = "Enabled For Vehicle Gunners";

View File

@ -17,15 +17,21 @@ class CfgVehicles {
typeName = "BOOL";
defaultValue = 0;
};
class alwaysSimulateForSnipers {
displayName = "$STR_ACE_AdvancedBallistics_alwaysSimulateForSnipers_DisplayName";
description = "$STR_ACE_AdvancedBallistics_alwaysSimulateForSnipers_Description";
class simulateForSnipers {
displayName = "$STR_ACE_AdvancedBallistics_simulateForSnipers_DisplayName";
description = "$STR_ACE_AdvancedBallistics_simulateForSnipers_Description";
typeName = "BOOL";
defaultValue = 1;
};
class alwaysSimulateForGroupMembers {
displayName = "$STR_ACE_AdvancedBallistics_alwaysSimulateForGroupMembers_DisplayName";
description = "$STR_ACE_AdvancedBallistics_alwaysSimulateForGroupMembers_Description";
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;
};
@ -35,12 +41,6 @@ class CfgVehicles {
typeName = "BOOL";
defaultValue = 0;
};
class onlyActiveForLocalPlayers {
displayName = "$STR_ACE_AdvancedBallistics_onlyActiveForLocalPlayers_DisplayName";
description = "$STR_ACE_AdvancedBallistics_onlyActiveForLocalPlayers_Description";
typeName = "BOOL";
defaultValue = 1;
};
/* // TODO: We currently do not have firedEHs on vehicles
class vehicleGunnerEnabled {
displayName = "Enabled For Vehicle Gunners";

View File

@ -5,7 +5,7 @@
GVAR(currentbulletID) = -1;
GVAR(Protractor) = false;
GVAR(ProtractorStart) = time;
GVAR(ProtractorStart) = ACE_time;
GVAR(currentGrid) = 0;
GVAR(initMessageEnabled) = false;

View File

@ -35,17 +35,17 @@ 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(simulateForEveryone) && !(local _unit)) then {
// The shooter is non local
_abort = true;
if (GVAR(alwaysSimulateForSnipers)) then {
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
};
};
if (GVAR(alwaysSimulateForGroupMembers) && _abort) then {
if (GVAR(simulateForGroupMembers) && _abort) then {
_abort = (group ACE_player) != (group _unit);
};
};
@ -114,7 +114,7 @@ if (_caliber > 0 && _bulletLength > 0 && _bulletMass > 0 && _barrelTwist > 0) th
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"];
@ -134,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;

View File

@ -26,10 +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(alwaysSimulateForGroupMembers), "alwaysSimulateForGroupMembers"] 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);

View File

@ -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;
};

View File

@ -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>

View File

@ -37,13 +37,23 @@
<English>Enables advanced ballistics</English>
<Polish>Aktywuje zaawansowaną balistykę</Polish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_alwaysSimulateForSnipers_DisplayName">
<English>Always Enabled For Snipers</English>
<Polish>Zawsze akt. dla snajp.</Polish>
<Key ID="STR_ACE_AdvancedBallistics_simulateForSnipers_DisplayName">
<English>Enabled For Snipers</English>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_alwaysSimulateForSnipers_Description">
<English>Always enables advanced ballistics when high power optics are used</English>
<Polish>Aktywuje zaawansowaną balistykę zawsze, kiedy używana jest optyka</Polish>
<Key ID="STR_ACE_AdvancedBallistics_simulateForSnipers_Description">
<English>Enables advanced ballistics for non local snipers (when using high power optics)</English>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_simulateForGroupMembers_DisplayName">
<English>Enabled For Group Members</English>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_simulateForGroupMembers_Description">
<English>Enables advanced ballistics for non local group members</English>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_simulateForEveryone_DisplayName">
<English>Enabled For Everyone</English>
</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>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_alwaysSimulateForGroupMembers_DisplayName">
<English>Always Enabled For Group Members</English>
@ -61,14 +71,6 @@
<English>Disables the advanced ballistics during full auto fire</English>
<Polish>Dezaktywuje zaawansowaną balistykę podczas ognia automatycznego</Polish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_onlyActiveForLocalPlayers_DisplayName">
<English>Disabled For Non Local Players</English>
<Polish>Wyłącz dla nielok. graczy</Polish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_onlyActiveForLocalPlayers_Description">
<English>Disables the advanced ballistics for bullets coming from other players (enable this if you encounter frame drops during heavy firefights in multiplayer)</English>
<Polish>Dezaktywuje zaawansowaną balistykę dla pocisków pochodzących od innych graczy(aktywuj tą opcję jeżeli odczuwasz spadki FPS podczas sporych strzelanin w MP)</Polish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_ammoTemperatureEnabled_DisplayName">
<English>Enable Ammo Temperature Simulation</English>
<Polish>Symulacja temp. amunicji</Polish>

View File

@ -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"

View File

@ -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;

Binary file not shown.

View File

@ -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)];

View File

@ -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);

View File

@ -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

View File

@ -37,7 +37,7 @@
* 8: Spin drift (MOA) <NUMBER>
*
* Example:
* call ace_atragmx_calculate_target_range_assist
* call ace_atragmx_calculate_solution
*
* Public: No
*/

View File

@ -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

View File

@ -2,3 +2,4 @@
uiNamespace setVariable ['ATragMX_Display', nil];
GVAR(active) = false;
[GVAR(DialogPFH)] call removePerFrameHandler;

View File

@ -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;
};

View File

@ -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

View File

@ -1 +1 @@
z\ace\Addons\attach
z\ace\addons\attach

View File

@ -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"

View File

@ -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
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
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
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,7 +409,7 @@ 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;
@ -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;

View File

@ -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";

View File

@ -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[] = {

View File

@ -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;
};
};

View File

@ -41,7 +41,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;
};
@ -223,7 +223,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);
@ -244,7 +244,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 {

View File

@ -321,6 +321,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;

View File

@ -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];
};
};

View File

@ -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)

View File

@ -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>
@ -21,8 +21,8 @@ PARAMS_5(_params,_function,_namespace,_uid,_duration);
//IGNORE_PRIVATE_WARNING("_eventName");
if (((_namespace getVariable [_uid, [-99999]]) select 0) < diag_tickTime) then {
_namespace setVariable [_uid, [diag_tickTime + _duration, _params call _function]];
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 {

View File

@ -86,11 +86,11 @@ _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;
};

View File

@ -36,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"};

View File

@ -1,6 +1,6 @@
/*
* Author: Glowbal, PabstMirror
* Get the death animation for the unit at current time
* Get the death animation for the unit at current ACE_time
*
* Arguments:
* 0: unit <OBJECT>

View File

@ -2,7 +2,7 @@
#include "script_component.hpp"
private ["_val", "_index"];
// diag_log text format["%1 HASH GET: %2", diag_tickTime, _this];
// diag_log text format["%1 HASH GET: %2", ACE_diagTime, _this];
PARAMS_2(_hash,_key);

View File

@ -2,7 +2,7 @@
#include "script_component.hpp"
private ["_val", "_index"];
// diag_log text format["%1 HASH HAS KEY: %2", diag_tickTime, _this];
// diag_log text format["%1 HASH HAS KEY: %2", ACE_diagTime, _this];
PARAMS_2(_hash,_key);

View File

@ -2,7 +2,7 @@
#include "script_component.hpp"
private ["_index"];
// diag_log text format["%1 HASH SET: %2", diag_tickTime, _this];
// diag_log text format["%1 HASH SET: %2", ACE_diagTime, _this];
PARAMS_3(_hash,_key,_val);

View File

@ -5,7 +5,7 @@
* Finish/Failure/Conditional are all passed [_args, _elapsedTime, _totalTime, _errorCode]
*
* Argument:
* 0: NUMBER - Total Time (in game "time" seconds)
* 0: NUMBER - Total Time (in game "ACE_time" seconds)
* 1: ARRAY - Arguments, passed to condition, fail and finish
* 2: CODE or STRING - On Finish: Code called or STRING raised as event.
* 3: CODE or STRING - On Failure: Code called or STRING raised as event.
@ -53,7 +53,7 @@ _perFrameFunction = {
EXPLODE_8_PVT(_parameters,_args,_onFinish,_onFail,_condition,_player,_startTime,_totalTime,_exceptions);
private ["_elapsedTime", "_errorCode"];
_elapsedTime = time - _startTime;
_elapsedTime = ACE_time - _startTime;
_errorCode = -1;
// this does not check: target fell unconscious, target died, target moved inside vehicle / left vehicle, target moved outside of players range, target moves at all.
@ -105,4 +105,4 @@ _perFrameFunction = {
};
};
[_perFrameFunction, 0, [_args, _onFinish, _onFail, _condition, _player, time, _totalTime, _exceptions]] call CBA_fnc_addPerFrameHandler;
[_perFrameFunction, 0, [_args, _onFinish, _onFail, _condition, _player, ACE_time, _totalTime, _exceptions]] call CBA_fnc_addPerFrameHandler;

View File

@ -41,7 +41,7 @@ GVAR(RECIEVE_REQUEST_ADD_ACTION_DECLINE) = _target addAction ["Decline", compile
GVAR(RECIEVE_REQUEST_ID_KEY_BINDING) = _requestID;
GVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT) = [time, _target, _requestID] spawn {
GVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT) = [ACE_time, _target, _requestID] spawn {
private["_id", "_t", "_requestID", "_target"];
_t = (_this select 0) + 40;
_target = _this select 1;
@ -50,7 +50,7 @@ GVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT) = [time, _target, _requestID] spawn {
waituntil {
_id = _target getvariable _requestID;
(time > _t || isnil "_id")};
(ACE_time > _t || isnil "_id")};
_target setvariable [_requestID, nil];
GVAR(RECIEVE_REQUEST_ID_KEY_BINDING) = nil;
if (!isnil QGVAR(RECIEVE_REQUEST_ADD_ACTION_ACCEPT)) then {

View File

@ -1,13 +1,13 @@
/*
* Author: commy2
*
* Sets a public variable, but wait a certain amount of time to transfer the value over the network. Changing the value by calling this function again resets the windup timer.
* Sets a public variable, but wait a certain amount of ACE_time to transfer the value over the network. Changing the value by calling this function again resets the windup timer.
*
* Argument:
* 0: Object the variable should be assigned to (Object)
* 1: Name of the variable (String)
* 2: Value of the variable (Any)
* 3: Windup time (Number, optional. Default: 1)
* 3: Windup ACE_time (Number, optional. Default: 1)
*
* Return value:
* Nothing.
@ -38,12 +38,12 @@ if (_idName in _allIdNames) exitWith {};
// when to push the value
private "_syncTime";
_syncTime = diag_tickTime + _sync;
_syncTime = ACE_diagTime + _sync;
// add eventhandler
[_idName, "onEachFrame", {
// wait to sync the variable
if (diag_tickTime > _this select 2) then {
if (ACE_diagTime > _this select 2) then {
// set value public
(_this select 0) setVariable [_this select 1, (_this select 0) getVariable (_this select 1), true];

View File

@ -24,7 +24,7 @@ private["_data"];
if(typeName _globalEventTTL == "CODE") then {
_ttlReturn = [(_data select 0),_eventEntry] call _globalEventTTL;
} else {
_ttlReturn = call { _globalEventTTL < 1 || {diag_tickTime < (_eventEntry select 0) + _globalEventTTL} };
_ttlReturn = call { _globalEventTTL < 1 || {ACE_diagTime < (_eventEntry select 0) + _globalEventTTL} };
};
if(_ttlReturn) then {
@ -35,7 +35,7 @@ private["_data"];
if(typeName _eventTTL == "CODE") then {
_ttlReturn = [(_data select 0),_eventEntry] call _eventTTL;
} else {
_ttlReturn = call { _eventTTL < 1 || {diag_tickTime < (_eventEntry select 0) + _eventTTL} };
_ttlReturn = call { _eventTTL < 1 || {ACE_diagTime < (_eventEntry select 0) + _eventTTL} };
};
};

View File

@ -19,7 +19,7 @@
PARAMS_3(_unit,_varName,_maxDelay);
// Create the publish scheduler PFH the first time
// Create the publish scheduler PFH the first ACE_time
if (isNil QGVAR(publishSchedId)) then {
GVAR(publishVarNames) = [];
@ -27,7 +27,7 @@ if (isNil QGVAR(publishSchedId)) then {
GVAR(publishSchedId) = [{
if (diag_tickTime > GVAR(publishNextTime)) then {
if (ACE_diagTime > GVAR(publishNextTime)) then {
{
EXPLODE_2_PVT(_x,_unit,_varName);
_unit setVariable [_varName, (_unit getVariable _varName), true];
@ -42,8 +42,8 @@ if (isNil QGVAR(publishSchedId)) then {
// If the variable is not on the list
if (GVAR(publishVarNames) find [_unit,_varName] == -1) exitWith {
GVAR(publishVarNames) pushBack [_unit,_varName];
GVAR(publishNextTime) = GVAR(publishNextTime) min (diag_tickTime + _maxDelay);
GVAR(publishNextTime) = GVAR(publishNextTime) min (ACE_diagTime + _maxDelay);
};
// If the variable is on the list
GVAR(publishNextTime) = GVAR(publishNextTime) min (diag_tickTime + _maxDelay);
GVAR(publishNextTime) = GVAR(publishNextTime) min (ACE_diagTime + _maxDelay);

View File

@ -1,25 +1,26 @@
//#define DEBUG_MODE_FULL
#include "script_component.hpp"
private["_lastRealTime", "_lastGameTime", "_delta"];
private["_lastTickTime", "_lastGameTime", "_delta"];
_lastRealTime = ACE_realTime;
_lastTickTime = ACE_diagTime;
_lastGameTime = ACE_gameTime;
ACE_gameTime = time;
ACE_diagTime = diag_tickTime;
_delta = ACE_diagTime - _lastRealTime;
_delta = ACE_diagTime - _lastTickTime;
if(ACE_gameTime <= _lastGameTime) then {
TRACE_1("paused",_delta);
ACE_paused = true;
// Game is paused or not running
ACE_pausedTime = ACE_pausedTime + _delta;
ACE_virtualPausedTime = ACE_pausedTime + (_delta * accTime);
} else {
TRACE_1("live",_delta);
ACE_paused = false;
// Time is updating
ACE_realTime = ACE_realTime + _delta;
ACE_virtualTime = ACE_virtualTime + (_delta * accTime);
ACE_time = ACE_virtualTime;
};

View File

@ -1,13 +1,13 @@
/*
* Author: esteldunedain
*
* Executes a code once with a given game time delay, using a PFH
* Executes a code once with a given game ACE_time delay, using a PFH
*
* Argument:
* 0: Code to execute (Code)
* 1: Parameters to run the code with (Array)
* 2: Delay in seconds before executing the code (Number)
* 3: Interval of time in which the execution is evaluated, 0 means every frame (Number)
* 3: Interval of ACE_time in which the execution is evaluated, 0 means every frame (Number)
*
* Return value:
* PFH handler ID
@ -22,8 +22,8 @@ PARAMS_4(_func,_params,_delay,_interval);
EXPLODE_2_PVT(_params,_delayedExecParams,_startTime);
EXPLODE_3_PVT(_delayedExecParams,_func,_funcParams,_delay);
// Exit if the time was not reached yet
if (time < _startTime + _delay) exitWith {};
// Exit if the ACE_time was not reached yet
if (ACE_time < _startTime + _delay) exitWith {};
// Remove the PFH
[_pfhId] call cba_fnc_removePerFrameHandler;
@ -32,5 +32,5 @@ PARAMS_4(_func,_params,_delay,_interval);
_funcParams call _func;
},
_interval,
[_this, time]
[_this, ACE_time]
] call CBA_fnc_addPerFrameHandler

View File

@ -64,7 +64,7 @@ if (isNull _holder) then {
if (isNull _holder) exitWith {
[_caller, _target, "Debug: Null Holder"] call FUNC(eventTargetFinish);
};
//Make sure only one drop operation at a time (using PFEH system as a queue)
//Make sure only one drop operation at a ACE_time (using PFEH system as a queue)
if (_holder getVariable [QGVAR(holderInUse), false]) exitWith {
[{
_this call FUNC(disarmDropItems);
@ -178,7 +178,7 @@ if (_holderIsEmpty) then {
_needToRemoveVest = ((vest _target) != "") && {(vest _target) in _listOfItemsToRemove};
_needToRemoveUniform = ((uniform _target) != "") && {(uniform _target) in _listOfItemsToRemove};
if ((time < _maxWaitTime) && {[_target] call FUNC(canBeDisarmed)} && {_needToRemoveWeapon || _needToRemoveMagazines || _needToRemoveBackpack}) then {
if ((ACE_time < _maxWaitTime) && {[_target] call FUNC(canBeDisarmed)} && {_needToRemoveWeapon || _needToRemoveMagazines || _needToRemoveBackpack}) then {
//action drop weapons (keeps loaded magazine and attachements)
{
if (_x in _listOfItemsToRemove) then {
@ -234,7 +234,7 @@ if (_holderIsEmpty) then {
clearItemCargoGlobal _holder;
};
//Verify we didn't timeout waiting on drop action
if (time >= _maxWaitTime) exitWith {
if (ACE_time >= _maxWaitTime) exitWith {
_holder setVariable [QGVAR(holderInUse), false];
[_caller, _target, "Debug: Drop Actions Timeout"] call FUNC(eventTargetFinish);
};
@ -264,4 +264,4 @@ if (_holderIsEmpty) then {
[_caller, _target, ""] call FUNC(eventTargetFinish);
};
}, 0.0, [_caller,_target, _listOfItemsToRemove, _holder, _holderIsEmpty, (time + TIME_MAX_WAIT), _doNotDropAmmo, _targetMagazinesEnd]] call CBA_fnc_addPerFrameHandler;
}, 0.0, [_caller,_target, _listOfItemsToRemove, _holder, _holderIsEmpty, (ACE_time + TIME_MAX_WAIT), _doNotDropAmmo, _targetMagazinesEnd]] call CBA_fnc_addPerFrameHandler;

View File

@ -22,4 +22,4 @@ PARAMS_3(_caller,_target,_errorMsg);
if (_caller != ACE_player) exitWith {};
systemChat format ["Debug-Caller: Disarm finished from [%1] with code [%2]", _target, _errorMsg];
diag_log text format ["[ACE_Disarming] %1 - eventCallerFinish: %2", time, _this];
diag_log text format ["[ACE_Disarming] %1 - eventCallerFinish: %2", ACE_time, _this];

View File

@ -21,6 +21,6 @@
PARAMS_3(_caller,_target,_errorMsg);
if (_errorMsg != "") then {
diag_log text format ["[ACE_Disarming] %1 - eventTargetFinish: %2", time, _this];
diag_log text format ["[ACE_Disarming] %1 - eventTargetFinish: %2", ACE_time, _this];
["DisarmDebugCallback", [_caller], [_caller, _target, _errorMsg]] call EFUNC(common,targetEvent);
};

View File

@ -1,5 +1,5 @@
#define COMPONENT disposable
#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"

View File

@ -2,7 +2,7 @@
#include "script_component.hpp"
#ifdef DEBUG_ENABLED_DRAGGING
systemChat format ["%1 carryObjectPFH running", time];
systemChat format ["%1 carryObjectPFH running", ACE_time];
#endif
private ["_unit", "_target"];

View File

@ -2,7 +2,7 @@
#include "script_component.hpp"
#ifdef DEBUG_ENABLED_DRAGGING
systemChat format ["%1 dragObjectPFH running", time];
systemChat format ["%1 dragObjectPFH running", ACE_time];
#endif
private ["_unit", "_target"];

View File

@ -26,7 +26,7 @@ if (_weight > GETMVAR(ACE_maxWeightCarry,1E11)) exitWith {
};
private "_timer";
_timer = time + 5;
_timer = ACE_time + 5;
// handle objects vs persons
if (_target isKindOf "CAManBase") then {
@ -46,7 +46,7 @@ if (_target isKindOf "CAManBase") then {
[_unit, "AcinPknlMstpSnonWnonDnon_AcinPercMrunSnonWnonDnon", 2, true] call EFUNC(common,doAnimation);
[_target, "AinjPfalMstpSnonWrflDnon_carried_Up", 2, true] call EFUNC(common,doAnimation);
_timer = time + 15;
_timer = ACE_time + 15;
} else {
@ -62,7 +62,7 @@ if (_target isKindOf "CAManBase") then {
[_unit, _target, true] call EFUNC(common,claim);
// prevents draging and carrying at the same time
// prevents draging and carrying at the same ACE_time
_unit setVariable [QGVAR(isCarrying), true, true];
// required for aborting animation

View File

@ -2,7 +2,7 @@
#include "script_component.hpp"
#ifdef DEBUG_ENABLED_DRAGGING
systemChat format ["%1 startCarryPFH running", time];
systemChat format ["%1 startCarryPFH running", ACE_time];
#endif
private ["_unit", "_target", "_timeOut"];
@ -24,13 +24,13 @@ if ((!([_target] call EFUNC(common,isAlive))) || {(_unit distance _target) > 10}
// handle persons vs objects
if (_target isKindOf "CAManBase") then {
if (time > _timeOut) exitWith {
if (ACE_time > _timeOut) exitWith {
[_unit, _target] call FUNC(carryObject);
[_this select 1] call CBA_fnc_removePerFrameHandler;
};
} else {
if (time > _timeOut) exitWith {
if (ACE_time > _timeOut) exitWith {
[_this select 1] call CBA_fnc_removePerFrameHandler;
// drop if in timeout

View File

@ -48,7 +48,7 @@ if (_target isKindOf "CAManBase") then {
[_target, "AinjPpneMrunSnonWnonDb_grab", 2, true] call EFUNC(common,doAnimation);
};
// prevents draging and carrying at the same time
// prevents draging and carrying at the same ACE_time
_unit setVariable [QGVAR(isDragging), true, true];
[FUNC(startDragPFH), 0.2, [_unit, _target, time + 5]] call CBA_fnc_addPerFrameHandler;
[FUNC(startDragPFH), 0.2, [_unit, _target, ACE_time + 5]] call CBA_fnc_addPerFrameHandler;

View File

@ -2,7 +2,7 @@
#include "script_component.hpp"
#ifdef DEBUG_ENABLED_DRAGGING
systemChat format ["%1 startDragPFH running", time];
systemChat format ["%1 startDragPFH running", ACE_time];
#endif
private ["_unit", "_target", "_timeOut"];
@ -22,8 +22,8 @@ if ((!([_target] call EFUNC(common,isAlive))) || {(_unit distance _target) > 10}
[_this select 1] call CBA_fnc_removePerFrameHandler;
};
// timeout. Do nothing. Quit. time, because anim length is linked to ingame time.
if (time > _timeOut) exitWith {
// timeout. Do nothing. Quit. ACE_time, because anim length is linked to ingame ACE_time.
if (ACE_time > _timeOut) exitWith {
[_this select 1] call CBA_fnc_removePerFrameHandler;
// drop if in timeout

View File

@ -14,6 +14,28 @@
* Public: No
*/
#include "script_component.hpp"
//Start up a PFEH that scans all mines/explosives without defuseObjects attached and adds them
//Handles Editor Placed / Zeus / Scripted
if (isServer) then {
[{
private ["_explosive", "_helpers", "_defuseHelper"];
{
_explosive = _x;
_helpers = {
((typeOf _x) == "ACE_DefuseObject") && {(_x getVariable [QGVAR(Explosive), objNull]) == _explosive}
} count (attachedObjects _explosive);
if (_helpers == 0) then {
TRACE_3("Explosive without helper",_explosive,(getPosAsl _explosive),(typeOf _explosive));
_defuseHelper = createVehicle ["ACE_DefuseObject", (getPos _explosive), [], 0, "NONE"];
_defuseHelper attachTo [_explosive, [0,0,0], ""];
_defuseHelper setVariable [QGVAR(Explosive),_explosive,true];
};
} forEach allMines;
}, 5, []] call CBA_fnc_addPerFrameHandler;
};
if !(hasInterface) exitWith {};
GVAR(PlacedCount) = 0;
GVAR(Setup) = objNull;

View File

@ -7,7 +7,7 @@
* 1: Max range (-1 to ignore) <NUMBER>
* 2: Explosive <ARRAY>
* 0: Explosive <OBJECT>
* 1: Fuse time <NUMBER>
* 1: Fuse ACE_time <NUMBER>
*
* Return Value:
* None

View File

@ -1,7 +1,7 @@
#include "script_component.hpp"
GVAR(enabled) = false;
GVAR(time) = 0;
GVAR(ACE_time) = 0;
GVAR(position) = [0,0,0];
if (!hasInterface) exitWith {};

View File

@ -19,7 +19,7 @@
#include "script_component.hpp"
#define PRECISION 0.1
private ["_distance","_angleTarget","_maxElev","_initSpeed","_airFriction","_timeToLive","_timeToLive","_simulationStep","_angle","_posTargetX","_posTargetY","_posX","_posY","_velocityX","_velocityY","_velocityMagnitude"];
private ["_distance", "_angleTarget", "_maxElev", "_initSpeed", "_airFriction", "_timeToLive", "_simulationStep", "_angle1", "_angle2", "_it2", "_f1", "_f2", "_temp", "_it1", "_angle"];
_distance = _this select 0;
_angleTarget = _this select 1;
@ -32,7 +32,7 @@ _simulationStep = _this select 6;
if (_simulationStep == 0) exitWith {_angleTarget};
FUNC(traceBullet) = {
private ["_distance", "_angleTarget", "_maxElev", "_initSpeed", "_airFriction", "_timeToLive", "_simulationStep", "_angle", "_posTargetX", "_posTargetY", "_posX", "_posY", "_velocityX", "_velocityY", "_velocityMagnitude"];
private ["_distance", "_angleTarget", "_maxElev", "_initSpeed", "_airFriction", "_timeToLive", "_simulationStep", "_angle", "_posTargetX", "_posTargetY", "_posX", "_posY", "_velocityX", "_velocityY", "_velocityMagnitude", "_i"];
_distance = _this select 0;
_angleTarget = _this select 1;

View File

@ -1,4 +1,7 @@
// by commy2
#include "script_component.hpp"
private ["_vehicle", "_projectile", "_zeroing", "_position", "_subMunition"];
_vehicle = _this select 0 select 0;
_projectile = _this select 0 select 1;

View File

@ -22,7 +22,7 @@ _distance = call FUNC(getRange);
if !(!GVAR(enabled) && FUNC(canUseFCS)) exitWith {};
GVAR(Enabled) = true;
GVAR(Time) = time;
GVAR(Time) = ACE_time;
if (_distance == 0) then {
_distance = [5, 5000, 0] call EFUNC(common,getTargetDistance); // maximum distance: 5000m, 5m precision

View File

@ -12,7 +12,7 @@
#include "script_component.hpp"
private ["_vehicle", "_turret", "_turretConfig", "_distance", "_weapons", "_magazines", "_showHint", "_playSound"];
private ["_vehicle", "_turret", "_turretConfig", "_distance", "_weapons", "_magazines", "_showHint", "_playSound", "_i"];
_vehicle = _this select 0;
_turret = _this select 1;
@ -60,7 +60,7 @@ private ["_movingAzimuth", "_posTarget", "_velocityTarget"];
// MOVING TARGETS
_movingAzimuth = 0;
if (time - GVAR(time) > 1 and GVAR(time) != -1 and count _this < 3) then {
if (ACE_time - GVAR(ACE_time) > 1 and GVAR(ACE_time) != -1 and count _this < 3) then {
// calculate speed of target
_posTarget = [
(getPos _vehicle select 0) + _distance * (_weaponDirection select 0),
@ -68,14 +68,14 @@ if (time - GVAR(time) > 1 and GVAR(time) != -1 and count _this < 3) then {
(getPos _vehicle select 2) + _distance * (_weaponDirection select 2)
];
_velocityTarget = [
((_posTarget select 0) - (GVAR(position) select 0)) / (time - GVAR(time)),
((_posTarget select 1) - (GVAR(position) select 1)) / (time - GVAR(time)),
((_posTarget select 2) - (GVAR(position) select 2)) / (time - GVAR(time))
((_posTarget select 0) - (GVAR(position) select 0)) / (ACE_time - GVAR(ACE_time)),
((_posTarget select 1) - (GVAR(position) select 1)) / (ACE_time - GVAR(ACE_time)),
((_posTarget select 2) - (GVAR(position) select 2)) / (ACE_time - GVAR(ACE_time))
];
private ["_magazineType", "_ammoType", "_initSpeed", "_airFriction", "_timeToLive", "_simulationStep", "_initSpeedCoef", "_velocityMagnitude"];
// estimate time to target
// estimate ACE_time to target
_magazineType = _vehicle currentMagazineTurret _turret;
_ammoType = getText (configFile >> "CfgMagazines" >> _magazineType >> "ammo");
_initSpeed = getNumber (configFile >> "CfgMagazines" >> _magazineType >> "initSpeed");
@ -130,7 +130,7 @@ if (time - GVAR(time) > 1 and GVAR(time) != -1 and count _this < 3) then {
};
};
GVAR(enabled) = false;
GVAR(time) = -1;
GVAR(ACE_time) = -1;
private ["_viewDiff", "_FCSAzimuth", "_FCSMagazines", "_FCSElevation"];

View File

@ -1,5 +1,5 @@
#define COMPONENT fcs
#include "\z\ace\Addons\main\script_mod.hpp"
#include "\z\ace\addons\main\script_mod.hpp"
#ifdef DEBUG_ENABLED_FCS
#define DEBUG_MODE_FULL
@ -9,4 +9,4 @@
#define DEBUG_SETTINGS DEBUG_SETTINGS_FCS
#endif
#include "\z\ace\Addons\main\script_macros.hpp"
#include "\z\ace\addons\main\script_macros.hpp"

View File

@ -1,5 +1,5 @@
#define COMPONENT fcs
#include "\z\ace\Addons\main\script_mod.hpp"
#include "\z\ace\addons\main\script_mod.hpp"
#ifdef DEBUG_ENABLED_FCS
#define DEBUG_MODE_FULL
@ -9,4 +9,4 @@
#define DEBUG_SETTINGS DEBUG_SETTINGS_FCS
#endif
#include "\z\ace\Addons\main\script_macros.hpp"
#include "\z\ace\addons\main\script_macros.hpp"

0
addons/fonts/$NOBIN$ Normal file
View File

1
addons/fonts/$PBOPREFIX$ Normal file
View File

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

View File

@ -0,0 +1,39 @@
class CfgFontFamilies
{
class PixelSplitterBold
{
fonts[] = { PATHTOF(PixelSplitterBold\PixelSplitterBold6),
PATHTOF(PixelSplitterBold\PixelSplitterBold7),
PATHTOF(PixelSplitterBold\PixelSplitterBold8),
PATHTOF(PixelSplitterBold\PixelSplitterBold9),
PATHTOF(PixelSplitterBold\PixelSplitterBold10),
PATHTOF(PixelSplitterBold\PixelSplitterBold11),
PATHTOF(PixelSplitterBold\PixelSplitterBold12),
PATHTOF(PixelSplitterBold\PixelSplitterBold13),
PATHTOF(PixelSplitterBold\PixelSplitterBold14),
PATHTOF(PixelSplitterBold\PixelSplitterBold15),
PATHTOF(PixelSplitterBold\PixelSplitterBold16),
PATHTOF(PixelSplitterBold\PixelSplitterBold17),
PATHTOF(PixelSplitterBold\PixelSplitterBold18),
PATHTOF(PixelSplitterBold\PixelSplitterBold19),
PATHTOF(PixelSplitterBold\PixelSplitterBold20),
PATHTOF(PixelSplitterBold\PixelSplitterBold21),
PATHTOF(PixelSplitterBold\PixelSplitterBold22),
PATHTOF(PixelSplitterBold\PixelSplitterBold23),
PATHTOF(PixelSplitterBold\PixelSplitterBold24),
PATHTOF(PixelSplitterBold\PixelSplitterBold25),
PATHTOF(PixelSplitterBold\PixelSplitterBold26),
PATHTOF(PixelSplitterBold\PixelSplitterBold27),
PATHTOF(PixelSplitterBold\PixelSplitterBold28),
PATHTOF(PixelSplitterBold\PixelSplitterBold29),
PATHTOF(PixelSplitterBold\PixelSplitterBold30),
PATHTOF(PixelSplitterBold\PixelSplitterBold31),
PATHTOF(PixelSplitterBold\PixelSplitterBold34),
PATHTOF(PixelSplitterBold\PixelSplitterBold35),
PATHTOF(PixelSplitterBold\PixelSplitterBold37),
PATHTOF(PixelSplitterBold\PixelSplitterBold46)
};
spaceWidth = 0.5;
spacing = 0.065;
};
};

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

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