Merge remote-tracking branch 'origin' into module-translations-2

Conflicts:
	addons/viewdistance/ACE_Settings.hpp
	addons/viewdistance/functions/fnc_changeViewDistance.sqf
This commit is contained in:
gienkov 2015-05-23 17:55:06 +02:00
commit 00c5abecc2
437 changed files with 4833 additions and 1119 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,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) {

View File

@ -17,24 +17,30 @@ 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 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 = "$STR_ACE_AdvancedBallistics_disabledInFullAutoMod_DisplayName";
description = "$STR_ACE_AdvancedBallistics_disabledInFullAutoMod_Description";
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,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 {
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
@ -112,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"];
@ -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;

View File

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

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,31 @@
<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>
<Polish>Zawsze akt. dla czł. grupy</Polish>
</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>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_disabledInFullAutoMod_DisplayName">
<English>Disabled In FullAuto Mode</English>
@ -53,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

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

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

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

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

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

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

@ -75,7 +75,7 @@ class CfgAmmo {
triggerWhenDestroyed = 1;
soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.562341, 1, 40};
};
class IEDLandBig_Remote_Ammo: IEDUrbanBig_Remote_Ammo {
class IEDLandBig_Remote_Ammo: PipeBombBase {
mineTrigger = "RangeTrigger";
triggerWhenDestroyed = 1;
soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.562341, 1, 40};
@ -85,7 +85,7 @@ class CfgAmmo {
triggerWhenDestroyed = 1;
soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.562341, 1, 40};
};
class IEDLandSmall_Remote_Ammo: IEDUrbanSmall_Remote_Ammo {
class IEDLandSmall_Remote_Ammo: PipeBombBase {
mineTrigger = "RangeTrigger";
triggerWhenDestroyed = 1;
soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.562341, 1, 40};

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

@ -25,6 +25,8 @@ private ["_ammo", "_explosive", "_attachedTo", "_expPos", "_magazineTrigger"];
EXPLODE_6_PVT(_this,_unit,_pos,_dir,_magazineClass,_triggerConfig,_triggerSpecificVars);
DEFAULT_PARAM(6,_setupPlaceholderObject,objNull);
_unit playActionNow "PutDown";
_attachedTo = objNull;
if (!isNull _setupPlaceholderObject) then {
_attachedTo = attachedTo _setupPlaceholderObject;

View File

@ -42,5 +42,5 @@ _player setVariable [QGVAR(PlantingExplosive), true];
[{_this setVariable [QGVAR(PlantingExplosive), false]}, _player, 1.5, 0.5] call EFUNC(common,waitAndExecute);
_setup addEventHandler ["EpeContactStart", FUNC(onLanded)];
_setup enableSimulationGlobal true;
_player playActionNow "MedicOther";
_player playActionNow "PutDown";
_player removeMagazine (_setup getVariable [QGVAR(Class), ""]);

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.

Binary file not shown.

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