mirror of
https://github.com/acemod/ACE3.git
synced 2025-07-25 21:02:48 +00:00
Merge branch 'master' of https://github.com/acemod/ACE3.git into arsenal_rewrite
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/acemod/ACE3/releases/latest">
|
||||
<img src="https://img.shields.io/badge/Version-3.10.2-blue.svg?style=flat-square" alt="ACE3 Version">
|
||||
<img src="https://img.shields.io/badge/Version-3.11.0-blue.svg?style=flat-square" alt="ACE3 Version">
|
||||
</a>
|
||||
<a href="https://github.com/acemod/ACE3/issues">
|
||||
<img src="https://img.shields.io/github/issues-raw/acemod/ACE3.svg?style=flat-square&label=Issues" alt="ACE3 Issues">
|
||||
@ -126,4 +126,4 @@ To help us test the latest development changes, download our master branch ([dir
|
||||
|
||||
## License
|
||||
|
||||
ACE3 is licensed under the GNU General Public License ([GPLv2](https://github.com/acemod/ACE3/blob/master/LICENSE).
|
||||
ACE3 is licensed under the GNU General Public License ([GPLv2](https://github.com/acemod/ACE3/blob/master/LICENSE)).
|
||||
|
Binary file not shown.
Binary file not shown.
@ -21,17 +21,14 @@
|
||||
|
||||
scopeName "main";
|
||||
|
||||
private ["_muzzleVelocityTableCount", "_barrelLengthTableCount", "_lowerDataIndex",
|
||||
"_upperDataIndex", "_lowerBarrelLength", "_upperBarrelLength", "_lowerMuzzleVelocity",
|
||||
"_upperMuzzleVelocity", "_interpolationRatio"];
|
||||
params ["_barrelLength", "_muzzleVelocityTable", "_barrelLengthTable", "_muzzleVelocity"];
|
||||
TRACE_4("params",_barrelLength,_muzzleVelocityTable,_barrelLengthTable,_muzzleVelocity);
|
||||
|
||||
// If barrel length is not defined, then there is no point in calculating muzzle velocity
|
||||
if (_barrelLength == 0) exitWith { 0 };
|
||||
|
||||
_muzzleVelocityTableCount = count _muzzleVelocityTable;
|
||||
_barrelLengthTableCount = count _barrelLengthTable;
|
||||
private _muzzleVelocityTableCount = count _muzzleVelocityTable;
|
||||
private _barrelLengthTableCount = count _barrelLengthTable;
|
||||
|
||||
// Exit if tables are different sizes, have no elements or have only one element
|
||||
if (_muzzleVelocityTableCount != _barrelLengthTableCount || _muzzleVelocityTableCount == 0 || _barrelLengthTableCount == 0) exitWith { 0 };
|
||||
@ -46,6 +43,9 @@ if (_barrelLength in _barrelLengthTable) exitWith {
|
||||
if (_barrelLength <= (_barrelLengthTable select 0)) exitWith { (_muzzleVelocityTable select 0) - _muzzleVelocity };
|
||||
if (_barrelLength >= (_barrelLengthTable select _barrelLengthTableCount - 1)) exitWith { (_muzzleVelocityTable select _barrelLengthTableCount - 1) - _muzzleVelocity };
|
||||
|
||||
private _upperDataIndex = -1;
|
||||
private _lowerDataIndex = -1;
|
||||
|
||||
// Find closest bordering values for barrel length
|
||||
{
|
||||
if (_barrelLength <= _x) then {
|
||||
@ -56,19 +56,15 @@ if (_barrelLength >= (_barrelLengthTable select _barrelLengthTableCount - 1)) ex
|
||||
} forEach _barrelLengthTable;
|
||||
|
||||
// Worst case scenario
|
||||
if (isNil "_lowerDataIndex" || isNil "_upperDataIndex") exitWith {0};
|
||||
if (_upperDataIndex == -1 || _lowerDataIndex == -1) exitWith {0};
|
||||
|
||||
_lowerBarrelLength = _barrelLengthTable select _lowerDataIndex;
|
||||
_upperBarrelLength = _barrelLengthTable select _upperDataIndex;
|
||||
_lowerMuzzleVelocity = _muzzleVelocityTable select _lowerDataIndex;
|
||||
_upperMuzzleVelocity = _muzzleVelocityTable select _upperDataIndex;
|
||||
private _lowerBarrelLength = _barrelLengthTable select _lowerDataIndex;
|
||||
private _upperBarrelLength = _barrelLengthTable select _upperDataIndex;
|
||||
private _lowerMuzzleVelocity = _muzzleVelocityTable select _lowerDataIndex;
|
||||
private _upperMuzzleVelocity = _muzzleVelocityTable select _upperDataIndex;
|
||||
|
||||
// Calculate interpolation ratio
|
||||
_interpolationRatio = if (abs (_lowerBarrelLength - _upperBarrelLength) > 0) then {
|
||||
(_upperBarrelLength - _barrelLength) / (_upperBarrelLength - _lowerBarrelLength)
|
||||
} else {
|
||||
0
|
||||
};
|
||||
private _interpolationRatio = [0, (_upperBarrelLength - _barrelLength) / (_upperBarrelLength - _lowerBarrelLength)] select (abs (_lowerBarrelLength - _upperBarrelLength) > 0);
|
||||
|
||||
// Calculate interpolated muzzle velocity shift
|
||||
(_lowerMuzzleVelocity + ((_upperMuzzleVelocity - _lowerMuzzleVelocity) * (1 - _interpolationRatio))) - _muzzleVelocity // Return
|
||||
|
@ -15,8 +15,6 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private _aceTimeSecond = floor CBA_missionTime;
|
||||
|
||||
{
|
||||
_x params ["_bullet","_caliber","_bulletTraceVisible","_index"];
|
||||
|
||||
@ -33,7 +31,7 @@ private _aceTimeSecond = floor CBA_missionTime;
|
||||
drop ["\A3\data_f\ParticleEffects\Universal\Refract","","Billboard",1,0.1,getPos _bullet,[0,0,0],0,1.275,1,0,[0.02*_caliber,0.01*_caliber],[[0,0,0,0.65],[0,0,0,0.2]],[1,0],0,0,"","",""];
|
||||
};
|
||||
|
||||
_bullet setVelocity (_bulletVelocity vectorAdd (parseSimpleArray ("ace_advanced_ballistics" callExtension format["simulate:%1:%2:%3:%4:%5:%6:%7", _index, _bulletVelocity, _bulletPosition, ACE_wind, ASLToATL(_bulletPosition) select 2, _aceTimeSecond, CBA_missionTime - _aceTimeSecond])));
|
||||
_bullet setVelocity (_bulletVelocity vectorAdd (parseSimpleArray ("ace_advanced_ballistics" callExtension format["simulate:%1:%2:%3:%4:%5:%6", _index, _bulletVelocity, _bulletPosition, ACE_wind, ASLToATL(_bulletPosition) select 2, CBA_missionTime toFixed 6])));
|
||||
};
|
||||
nil
|
||||
} count +GVAR(allBullets);
|
||||
|
@ -19,10 +19,7 @@
|
||||
//IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"];
|
||||
TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret);
|
||||
|
||||
// Parameterization
|
||||
private ["_abort", "_AmmoCacheEntry", "_WeaponCacheEntry", "_opticsName", "_opticType", "_bulletTraceVisible", "_temperature", "_barometricPressure", "_bulletMass", "_bulletLength", "_muzzleVelocity", "_muzzleVelocityShift", "_bulletVelocity", "_bulletLength", "_barrelTwist", "_stabilityFactor", "_aceTimeSecond", "_barrelVelocityShift", "_ammoTemperatureVelocityShift"];
|
||||
|
||||
_abort = false;
|
||||
private _abort = false;
|
||||
|
||||
if (!(_ammo isKindOf "BulletBase")) exitWith {};
|
||||
if (!alive _projectile) exitWith {};
|
||||
@ -33,8 +30,8 @@ if (!GVAR(simulateForEveryone) && !(local _unit)) then {
|
||||
_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");
|
||||
private _opticsName = (primaryWeaponItems _unit) select 2;
|
||||
private _opticType = getNumber(configFile >> "CfgWeapons" >> _opticsName >> "ItemInfo" >> "opticType");
|
||||
_abort = _opticType != 2; // We only abort if the non local shooter is not a sniper
|
||||
};
|
||||
};
|
||||
@ -46,11 +43,11 @@ if (!GVAR(simulateForEveryone) && !(local _unit)) then {
|
||||
if (GVAR(disabledInFullAutoMode) && getNumber(configFile >> "CfgWeapons" >> _weapon >> _mode >> "autoFire") == 1) then { _abort = true; };
|
||||
|
||||
// Get Weapon and Ammo Configurations
|
||||
_AmmoCacheEntry = uiNamespace getVariable format[QGVAR(%1), _ammo];
|
||||
private _AmmoCacheEntry = uiNamespace getVariable format[QGVAR(%1), _ammo];
|
||||
if (isNil "_AmmoCacheEntry") then {
|
||||
_AmmoCacheEntry = _ammo call FUNC(readAmmoDataFromConfig);
|
||||
};
|
||||
_WeaponCacheEntry = uiNamespace getVariable format[QGVAR(%1), _weapon];
|
||||
private _WeaponCacheEntry = uiNamespace getVariable format[QGVAR(%1), _weapon];
|
||||
if (isNil "_WeaponCacheEntry") then {
|
||||
_WeaponCacheEntry = _weapon call FUNC(readWeaponDataFromConfig);
|
||||
};
|
||||
@ -59,22 +56,24 @@ _AmmoCacheEntry params ["_airFriction", "_caliber", "_bulletLength", "_bulletMas
|
||||
_WeaponCacheEntry params ["_barrelTwist", "_twistDirection", "_barrelLength"];
|
||||
|
||||
|
||||
_bulletVelocity = velocity _projectile;
|
||||
_muzzleVelocity = vectorMagnitude _bulletVelocity;
|
||||
private _bulletVelocity = velocity _projectile;
|
||||
private _muzzleVelocity = vectorMagnitude _bulletVelocity;
|
||||
|
||||
_barrelVelocityShift = 0;
|
||||
private _barrelVelocityShift = 0;
|
||||
if (GVAR(barrelLengthInfluenceEnabled)) then {
|
||||
_barrelVelocityShift = [_barrelLength, _muzzleVelocityTable, _barrelLengthTable, _muzzleVelocity] call FUNC(calculateBarrelLengthVelocityShift);
|
||||
};
|
||||
|
||||
_ammoTemperatureVelocityShift = 0;
|
||||
private _ammoTemperatureVelocityShift = 0;
|
||||
private _temperature = nil; //Need the variable in this scope. So we need to init it here.
|
||||
|
||||
if (GVAR(ammoTemperatureEnabled)) then {
|
||||
_temperature = ((getPosASL _unit) select 2) call EFUNC(weather,calculateTemperatureAtHeight);
|
||||
_ammoTemperatureVelocityShift = ([_ammoTempMuzzleVelocityShifts, _temperature] call FUNC(calculateAmmoTemperatureVelocityShift));
|
||||
};
|
||||
|
||||
if (GVAR(ammoTemperatureEnabled) || GVAR(barrelLengthInfluenceEnabled)) then {
|
||||
_muzzleVelocityShift = _barrelVelocityShift + _ammoTemperatureVelocityShift;
|
||||
private _muzzleVelocityShift = _barrelVelocityShift + _ammoTemperatureVelocityShift;
|
||||
TRACE_4("shift",_muzzleVelocity,_muzzleVelocityShift, _barrelVelocityShift, _ammoTemperatureVelocityShift);
|
||||
if (_muzzleVelocityShift != 0) then {
|
||||
_muzzleVelocity = _muzzleVelocity + _muzzleVelocityShift;
|
||||
@ -89,32 +88,31 @@ if (_abort || !(GVAR(extensionAvailable))) exitWith {
|
||||
};
|
||||
};
|
||||
|
||||
_bulletTraceVisible = false;
|
||||
private _bulletTraceVisible = false;
|
||||
if (GVAR(bulletTraceEnabled) && cameraView == "GUNNER") then {
|
||||
if (currentWeapon ACE_player == binocular ACE_player) then {
|
||||
_bulletTraceVisible = true;
|
||||
} else {
|
||||
if (currentWeapon ACE_player == primaryWeapon ACE_player && count primaryWeaponItems ACE_player > 2) then {
|
||||
_opticsName = (primaryWeaponItems ACE_player) select 2;
|
||||
_opticType = getNumber(configFile >> "CfgWeapons" >> _opticsName >> "ItemInfo" >> "opticType");
|
||||
private _opticsName = (primaryWeaponItems ACE_player) select 2;
|
||||
private _opticType = getNumber(configFile >> "CfgWeapons" >> _opticsName >> "ItemInfo" >> "opticType");
|
||||
_bulletTraceVisible = _opticType == 2;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
_stabilityFactor = 1.5;
|
||||
private _stabilityFactor = 1.5;
|
||||
if (_caliber > 0 && _bulletLength > 0 && _bulletMass > 0 && _barrelTwist > 0) then {
|
||||
if (isNil "_temperature") then {
|
||||
_temperature = ((getPosASL _unit) select 2) call EFUNC(weather,calculateTemperatureAtHeight);
|
||||
};
|
||||
_barometricPressure = ((getPosASL _projectile) select 2) call EFUNC(weather,calculateBarometricPressure);
|
||||
private _barometricPressure = ((getPosASL _projectile) select 2) call EFUNC(weather,calculateBarometricPressure);
|
||||
_stabilityFactor = [_caliber, _bulletLength, _bulletMass, _barrelTwist, _muzzleVelocity, _temperature, _barometricPressure] call FUNC(calculateStabilityFactor);
|
||||
};
|
||||
|
||||
GVAR(currentbulletID) = (GVAR(currentbulletID) + 1) % 10000;
|
||||
|
||||
_aceTimeSecond = floor CBA_missionTime;
|
||||
"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), _airFriction, _ballisticCoefficients, _velocityBoundaries, _atmosphereModel, _dragModel, _stabilityFactor, _twistDirection, _muzzleVelocity, _transonicStabilityCoef, getPosASL _projectile, EGVAR(common,mapLatitude), EGVAR(weather,currentTemperature), EGVAR(common,mapAltitude), EGVAR(weather,currentHumidity), overcast, _aceTimeSecond, CBA_missionTime - _aceTimeSecond];
|
||||
"ace_advanced_ballistics" callExtension format["new:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:%11:%12:%13:%14:%15:%16:%17", GVAR(currentbulletID), _airFriction, _ballisticCoefficients, _velocityBoundaries, _atmosphereModel, _dragModel, _stabilityFactor, _twistDirection, _transonicStabilityCoef, getPosASL _projectile, _bulletVelocity, EGVAR(common,mapLatitude), EGVAR(weather,currentTemperature), EGVAR(common,mapAltitude), EGVAR(weather,currentHumidity), EGVAR(weather,currentOvercast), CBA_missionTime toFixed 6];
|
||||
|
||||
GVAR(allBullets) pushBack [_projectile, _caliber, _bulletTraceVisible, GVAR(currentbulletID)];
|
||||
|
||||
|
@ -19,10 +19,8 @@ if (!hasInterface) exitWith {};
|
||||
if (!GVAR(enabled)) exitWith {};
|
||||
if (!GVAR(extensionAvailable)) exitWith {};
|
||||
|
||||
private ["_initStartTime", "_mapSize", "_mapGrids", "_gridCells", "_x", "_y", "_gridCenter", "_gridHeight", "_gridNumObjects", "_gridSurfaceIsWater"];
|
||||
|
||||
_initStartTime = CBA_missionTime;
|
||||
_mapSize = getNumber (configFile >> "CfgWorlds" >> worldName >> "MapSize");
|
||||
private _initStartTime = CBA_missionTime;
|
||||
private _mapSize = getNumber (configFile >> "CfgWorlds" >> worldName >> "MapSize");
|
||||
|
||||
if (("ace_advanced_ballistics" callExtension format["init:%1:%2", worldName, _mapSize]) == "Terrain already initialized") exitWith {
|
||||
INFO_1("Terrain already initialized [world: %1]", worldName);
|
||||
@ -31,8 +29,8 @@ if (("ace_advanced_ballistics" callExtension format["init:%1:%2", worldName, _ma
|
||||
#endif
|
||||
};
|
||||
|
||||
_mapGrids = ceil(_mapSize / 50) + 1;
|
||||
_gridCells = _mapGrids * _mapGrids;
|
||||
private _mapGrids = ceil(_mapSize / 50) + 1;
|
||||
private _gridCells = _mapGrids * _mapGrids;
|
||||
|
||||
GVAR(currentGrid) = 0;
|
||||
|
||||
@ -51,12 +49,12 @@ INFO_2("Starting Terrain Extension [cells: %1] [world: %2]", _gridCells, worldNa
|
||||
};
|
||||
|
||||
for "_i" from 1 to 50 do {
|
||||
_x = floor(GVAR(currentGrid) / _mapGrids) * 50;
|
||||
_y = (GVAR(currentGrid) - floor(GVAR(currentGrid) / _mapGrids) * _mapGrids) * 50;
|
||||
_gridCenter = [_x + 25, _y + 25];
|
||||
_gridHeight = round(getTerrainHeightASL _gridCenter);
|
||||
_gridNumObjects = count (_gridCenter nearObjects ["Building", 50]);
|
||||
_gridSurfaceIsWater = if (surfaceIsWater _gridCenter) then {1} else {0};
|
||||
private _x = floor(GVAR(currentGrid) / _mapGrids) * 50;
|
||||
private _y = (GVAR(currentGrid) - floor(GVAR(currentGrid) / _mapGrids) * _mapGrids) * 50;
|
||||
private _gridCenter = [_x + 25, _y + 25];
|
||||
private _gridHeight = round(getTerrainHeightASL _gridCenter);
|
||||
private _gridNumObjects = count (_gridCenter nearObjects ["Building", 50]);
|
||||
private _gridSurfaceIsWater = if (surfaceIsWater _gridCenter) then {1} else {0};
|
||||
"ace_advanced_ballistics" callExtension format["set:%1:%2:%3", _gridHeight, _gridNumObjects, _gridSurfaceIsWater];
|
||||
GVAR(currentGrid) = GVAR(currentGrid) + 1;
|
||||
if (GVAR(currentGrid) >= _gridCells) exitWith {};
|
||||
|
@ -28,30 +28,30 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
TRACE_1("Reading Ammo Config",_this);
|
||||
private ["_ammo", "_airFriction", "_caliber", "_bulletLength", "_bulletMass", "_transonicStabilityCoef", "_dragModel", "_ballisticCoefficients", "_velocityBoundaries", "_atmosphereModel", "_ammoTempMuzzleVelocityShifts", "_muzzleVelocityTable", "_barrelLengthTable", "_result"];
|
||||
|
||||
private _ammoConfig = configFile >> "CfgAmmo" >> _this;
|
||||
|
||||
_airFriction = getNumber(_ammoConfig >> "airFriction");
|
||||
_caliber = getNumber(_ammoConfig >> "ACE_caliber");
|
||||
_bulletLength = getNumber(_ammoConfig >> "ACE_bulletLength");
|
||||
_bulletMass = getNumber(_ammoConfig >> "ACE_bulletMass");
|
||||
_transonicStabilityCoef = getNumber(_ammoConfig >> "ACE_transonicStabilityCoef");
|
||||
private _airFriction = getNumber(_ammoConfig >> "airFriction");
|
||||
private _caliber = getNumber(_ammoConfig >> "ACE_caliber");
|
||||
private _bulletLength = getNumber(_ammoConfig >> "ACE_bulletLength");
|
||||
private _bulletMass = getNumber(_ammoConfig >> "ACE_bulletMass");
|
||||
private _transonicStabilityCoef = getNumber(_ammoConfig >> "ACE_transonicStabilityCoef");
|
||||
if (_transonicStabilityCoef == 0) then {
|
||||
_transonicStabilityCoef = 0.5;
|
||||
};
|
||||
_dragModel = getNumber(_ammoConfig >> "ACE_dragModel");
|
||||
private _dragModel = getNumber(_ammoConfig >> "ACE_dragModel");
|
||||
if (_dragModel == 0 || !(_dragModel in [1, 2, 5, 6, 7, 8])) then {
|
||||
_dragModel = 1;
|
||||
};
|
||||
_ballisticCoefficients = getArray(_ammoConfig >> "ACE_ballisticCoefficients");
|
||||
_velocityBoundaries = getArray(_ammoConfig >> "ACE_velocityBoundaries");
|
||||
_atmosphereModel = getText(_ammoConfig >> "ACE_standardAtmosphere");
|
||||
private _ballisticCoefficients = getArray(_ammoConfig >> "ACE_ballisticCoefficients");
|
||||
private _velocityBoundaries = getArray(_ammoConfig >> "ACE_velocityBoundaries");
|
||||
private _atmosphereModel = getText(_ammoConfig >> "ACE_standardAtmosphere");
|
||||
if (_atmosphereModel isEqualTo "") then {
|
||||
_atmosphereModel = "ICAO";
|
||||
};
|
||||
_ammoTempMuzzleVelocityShifts = getArray(_ammoConfig >> "ACE_ammoTempMuzzleVelocityShifts");
|
||||
_muzzleVelocityTable = getArray(_ammoConfig >> "ACE_muzzleVelocities");
|
||||
_barrelLengthTable = getArray(_ammoConfig >> "ACE_barrelLengths");
|
||||
private _ammoTempMuzzleVelocityShifts = getArray(_ammoConfig >> "ACE_ammoTempMuzzleVelocityShifts");
|
||||
private _muzzleVelocityTable = getArray(_ammoConfig >> "ACE_muzzleVelocities");
|
||||
private _barrelLengthTable = getArray(_ammoConfig >> "ACE_barrelLengths");
|
||||
|
||||
//Handle subsonic ammo that would have a huge muzzle velocity shift (when ballistic configs not explicitly defined)
|
||||
private _typicalSpeed = getNumber (_ammoConfig >> "typicalSpeed");
|
||||
@ -89,7 +89,7 @@ if ((_typicalSpeed > 0) && {_typicalSpeed < 360}) then {
|
||||
};
|
||||
};
|
||||
|
||||
_result = [_airFriction, _caliber, _bulletLength, _bulletMass, _transonicStabilityCoef, _dragModel, _ballisticCoefficients, _velocityBoundaries, _atmosphereModel, _ammoTempMuzzleVelocityShifts, _muzzleVelocityTable, _barrelLengthTable];
|
||||
private _result = [_airFriction, _caliber, _bulletLength, _bulletMass, _transonicStabilityCoef, _dragModel, _ballisticCoefficients, _velocityBoundaries, _atmosphereModel, _ammoTempMuzzleVelocityShifts, _muzzleVelocityTable, _barrelLengthTable];
|
||||
|
||||
uiNamespace setVariable [format[QGVAR(%1), _this], _result];
|
||||
|
||||
|
@ -3,10 +3,12 @@
|
||||
<Package name="Advanced_Fatigue">
|
||||
<Key ID="STR_ACE_Advanced_Fatigue_DisplayName">
|
||||
<English>Advanced Fatigue</English>
|
||||
<German>Erweiterte Ausdauer</German>
|
||||
<Chinese>進階疲勞</Chinese>
|
||||
<Chinesesimp>进阶疲劳</Chinesesimp>
|
||||
<Japanese>アドバンスド疲労</Japanese>
|
||||
<Italian>Fatica Avanzata</Italian>
|
||||
<Korean>고급 피로도</Korean>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Fatigue_PerformanceFactor">
|
||||
<English>Performance Factor</English>
|
||||
@ -22,7 +24,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Fatigue_PerformanceFactor_Description">
|
||||
<English>Influences the overall performance of all players with no custom factor. Higher means better.</English>
|
||||
<German>Beinflusst die Leistungsfähigkeit aller Spieler ohne eigenen Leistungsfaktor. Ein höherer Wert bedeutet bessere Leistung.</German>
|
||||
<Japanese>非カスタム要因をもつ全プレイヤーへ全体的に動作を影響させます。高いほど影響がでます。</Japanese>
|
||||
<Japanese>非カスタム要因をもつ全プレイヤーへ全体的に動作を影響させます。高いほど良い効果があります。</Japanese>
|
||||
<Polish>Wpływa na ogólną wydolność organizmu u wszystkich graczy bez ustawionego niestandardowego współczynnika. Więcej znaczy lepiej.</Polish>
|
||||
<Korean>모든 성능이 임의로 설정된 값 없이 영향받습니다. 값이 클수록 더 나은 성능을 발휘합니다</Korean>
|
||||
<French>Influence les performances générales de tous les joueurs sans facteurs personalisés. Une valeur plus élevée implique de meilleures performances.</French>
|
||||
@ -33,7 +35,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Fatigue_PerformanceFactor_EdenDescription">
|
||||
<English>Influences the overall performance of this unit. Higher means better.</English>
|
||||
<German>Beinflusst die Leistungsfähigkeit dieser Einheit. Ein höherer Wert bedeutet bessere Leistung.</German>
|
||||
<Japanese>非カスタム要因をもつ全プレイヤーへ全体的に動作を影響させます。高いほど影響がでます。</Japanese>
|
||||
<Japanese>このユニットの全体的な動作に影響させます。高いほど良い効果があります。</Japanese>
|
||||
<Polish>Wpływa na ogólną wydolność tej jednostki. Więcej znaczy lepiej.</Polish>
|
||||
<Korean>모든 성능이 이 단위로 영향을 받습니다. 값이 클수록 더 나은 성능을 발휘합니다</Korean>
|
||||
<French>Influence les performances générales de cette unité. Une valeur plus élevée implique de meilleures performances.</French>
|
||||
@ -55,7 +57,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Fatigue_RecoveryFactor_Description">
|
||||
<English>Changes how fast the player recovers when resting. Higher is faster.</English>
|
||||
<German>Ändert, wie schnell ein Spieler Ausdauer regeneriert. Ein höherer Wert bedeutet eine schnellere Regeneration.</German>
|
||||
<Japanese>休憩時は、プレイヤーが早く回復します。高いほど早くなります。</Japanese>
|
||||
<Japanese>休憩時はプレイヤーが早く回復します。高いほど早くなります。</Japanese>
|
||||
<Polish>Wpływa na czas regeneracji podczas postoju. Więcej znaczy szybciej.</Polish>
|
||||
<Korean>얼마나 빨리 회복하는지를 바꿉니다. 값이 클수록 더 나은 성능을 발휘합니다</Korean>
|
||||
<French>Change la vitesse à laquelle les joueurs récupèrent leur endurance lorsqu'ils se reposent. Une valeur plus élevée implique une récupération plus rapide.</French>
|
||||
@ -77,7 +79,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Fatigue_LoadFactor_Description">
|
||||
<English>Increases or decreases how much weight influences the players performance. Zero means equipment weight has no performance influence.</English>
|
||||
<German>Erhöht oder verringert, wie viel Einfluss das Ausrüstungsgewicht auf die Leistung hat. Null heißt, dass es keinen Einfluss hat.</German>
|
||||
<Japanese>重量によりプレイヤーの動作への影響下増加したり、低下します。装備を持っていない場合、影響はしません。</Japanese>
|
||||
<Japanese>重量の増減によりプレイヤーの動作へ影響を与えます。装備を持っていない場合、影響はしません。</Japanese>
|
||||
<Polish>Zmniejsza lub zwiększa wpływ ciężaru ekwipunku na wydolność gracza. Zero oznacza kompletny brak wpływu na wydolność.</Polish>
|
||||
<Korean>플레이어가 무게에 따라 얼마나 영향받는지를 증가시키거나 감소시킵니다. 0의 경우 플레이어가 장비 무게에 영향받지 않습니다.</Korean>
|
||||
<French>Augmente ou réduit l'influence que le poids à sur les performances des joueurs. Zéro implique que le poids de l'équipement n'a pas d'influence sur les performances.</French>
|
||||
|
7
addons/advanced_throwing/CfgAmmo.hpp
Normal file
7
addons/advanced_throwing/CfgAmmo.hpp
Normal file
@ -0,0 +1,7 @@
|
||||
class CfgAmmo {
|
||||
class Default;
|
||||
class Grenade: Default {
|
||||
GVAR(torqueDirection)[] = {1, 1, 0};
|
||||
GVAR(torqueMagnitude) = "(50 + random 100) * selectRandom [1, -1]";
|
||||
};
|
||||
};
|
@ -117,7 +117,9 @@ addMissionEventHandler ["Draw3D", { // Blue is predicted before throw, red is re
|
||||
drawIcon3D ["\a3\ui_f\data\gui\cfg\hints\icon_text\group_1_ca.paa", [0,0,1,1], _newTrajAGL, 1, 1, 0, "", 2];
|
||||
} forEach GVAR(predictedPath);
|
||||
{
|
||||
drawIcon3D ["\a3\ui_f\data\gui\cfg\hints\icon_text\group_1_ca.paa", [1,0,0,1], _x, 1, 1, 0, "", 2];
|
||||
} forEach GVAR(flightPath)
|
||||
_x params ["_pos", "_vectorUp"];
|
||||
drawIcon3D ["\a3\ui_f\data\gui\cfg\hints\icon_text\group_1_ca.paa", [1,0,0,1], _pos, 1, 1, 0, "", 2];
|
||||
drawLine3D [_pos, _pos vectorAdd _vectorUp, [1,0,1,1]];
|
||||
} forEach GVAR(flightPath);
|
||||
}];
|
||||
#endif
|
||||
|
@ -15,5 +15,6 @@ class CfgPatches {
|
||||
};
|
||||
|
||||
#include "ACE_Settings.hpp"
|
||||
#include "CfgAmmo.hpp"
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
|
@ -67,7 +67,7 @@ for "_i" from 0.05 to 1.45 step 0.1 do {
|
||||
private _col = [ [1, 1, 1, _alpha], [0, 1, 0, _alpha], [1, 0, 0, _alpha], [1, 1, 0, _alpha] ] select _cross;
|
||||
|
||||
if (_cross != 2 && {lineIntersects [eyePos ACE_player, _newTrajASL]}) then {
|
||||
_col set [3, 0.1]
|
||||
_col set [3, 0.1];
|
||||
};
|
||||
|
||||
_pathData pushBack [_col, ASLToAGL _newTrajASL, _iDim];
|
||||
|
@ -49,9 +49,15 @@ if (!(_unit getVariable [QGVAR(primed), false])) then {
|
||||
_newVelocity = _newVelocity vectorAdd (velocity (vehicle _unit));
|
||||
};
|
||||
|
||||
private _config = configFile >> "CfgAmmo" >> typeOf _activeThrowable;
|
||||
private _torqueDir = vectorNormalized (getArray (_config >> QGVAR(torqueDirection)));
|
||||
private _torqueMag = getNumber (_config >> QGVAR(torqueMagnitude));
|
||||
private _torque = _torqueDir vectorMultiply _torqueMag;
|
||||
|
||||
// Drop if unit dies during throw process
|
||||
if (alive _unit) then {
|
||||
_activeThrowable setVelocity _newVelocity;
|
||||
_activeThrowable addTorque (_unit vectorModelToWorld _torque);
|
||||
};
|
||||
|
||||
// Invoke listenable event
|
||||
@ -67,12 +73,12 @@ if (!(_unit getVariable [QGVAR(primed), false])) then {
|
||||
|
||||
|
||||
#ifdef DRAW_THROW_PATH
|
||||
GVAR(predictedPath) = call FUNC(drawArc); // save the current throw arc
|
||||
GVAR(predictedPath) = call FUNC(drawArc); // Save the current throw arc
|
||||
GVAR(flightPath) = [];
|
||||
[_unit getVariable QGVAR(activeThrowable)] spawn {
|
||||
params ["_grenade"];
|
||||
while {!isNull _grenade} do {
|
||||
GVAR(flightPath) pushBack ASLtoAGL getPosASL _grenade;
|
||||
GVAR(flightRotation) = [];
|
||||
(_unit getVariable QGVAR(activeThrowable)) spawn {
|
||||
while {!isNull _this && {(getPosATL _this) select 2 > 0.05}} do {
|
||||
GVAR(flightPath) pushBack [ASLtoAGL (getPosASL _this), vectorUp _this];
|
||||
sleep 0.05;
|
||||
};
|
||||
};
|
||||
|
@ -148,7 +148,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Throwing_Prepare">
|
||||
<English>Prepare/Change Throwable</English>
|
||||
<Russian>Подготовить/заменить гранату</Russian>
|
||||
<Japanese>機能の起動/変更</Japanese>
|
||||
<Japanese>投てき物の準備/変更</Japanese>
|
||||
<Polish>Przygotuj/zmień ob. miotany</Polish>
|
||||
<German>Wurfobjekt vorbereiten/wechseln</German>
|
||||
<Korean>투척물 준비/변경</Korean>
|
||||
@ -172,7 +172,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Throwing_DropModeToggle">
|
||||
<English>Throwable Drop Mode (Toggle)</English>
|
||||
<Russian>Режим броска гранаты (переключить)</Russian>
|
||||
<Japanese>投てきモード (トグル)</Japanese>
|
||||
<Japanese>投てきモード (切り替え)</Japanese>
|
||||
<Polish>Tryb upuszczania ob. miotanego (przełącz)</Polish>
|
||||
<German>Wurfobjekt Fallmodus (umschalten)</German>
|
||||
<Korean>투척물 떨어뜨리기 모드(토글)</Korean>
|
||||
|
18
addons/ai/CfgEventHandlers.hpp
Normal file
18
addons/ai/CfgEventHandlers.hpp
Normal file
@ -0,0 +1,18 @@
|
||||
|
||||
class Extended_PreStart_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preStart));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_postInit));
|
||||
};
|
||||
};
|
3
addons/ai/XEH_PREP.hpp
Normal file
3
addons/ai/XEH_PREP.hpp
Normal file
@ -0,0 +1,3 @@
|
||||
PREP(garrison);
|
||||
PREP(unGarrison);
|
||||
PREP(garrisonMove);
|
84
addons/ai/XEH_postInit.sqf
Normal file
84
addons/ai/XEH_postInit.sqf
Normal file
@ -0,0 +1,84 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
[QGVAR(AISection), {
|
||||
params [["_units", [], [[]]], ["_sections", [], [[]]], ["_bool", true, [true]]];
|
||||
{
|
||||
private _section = _x;
|
||||
{
|
||||
if (_bool) then {
|
||||
_x enableAI _section;
|
||||
} else {
|
||||
_x disableAI _section;
|
||||
};
|
||||
LOG(format [ARR_4("XEH_postInit: %1 disableAI %2 | ID %3", _x, _section, clientOwner)]);
|
||||
} foreach (_units select {local _x});
|
||||
} foreach _sections
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
[QGVAR(unGarrison), FUNC(unGarrison)] call CBA_fnc_addEventHandler;
|
||||
[QGVAR(doMove), {
|
||||
params ["_unitsArray"];
|
||||
{
|
||||
_x params ["_unit", "_pos"];
|
||||
//_unit doFollow leader _unit;
|
||||
_unit setDestination [_pos, "LEADER PLANNED", true];
|
||||
_unit doMove _pos;
|
||||
LOG(format [ARR_4("XEH_postInit: %1 doMove %2 | ID %3", _unit, _pos, clientOwner)]);
|
||||
} foreach _unitsArray
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
[QGVAR(setBehaviour), {
|
||||
params ["_groupsArray", "_behaviour"];
|
||||
{
|
||||
_x params ["_group"];
|
||||
_group setBehaviour _behaviour;
|
||||
LOG(format [ARR_4("XEH_postInit: %1 setBehaviour %2 | ID %3", _group, _behaviour, clientOwner)]);
|
||||
} foreach _groupsArray
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
[QGVAR(enableAttack), {
|
||||
params ["_unitsArray", "_mode"];
|
||||
{
|
||||
_x params ["_unit"];
|
||||
_unit enableAttack _mode;
|
||||
LOG(format [ARR_4("XEH_postInit: %1 enableAttack %2 | ID %3", _unit, _mode, clientOwner)]);
|
||||
} foreach _unitsArray
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
#ifdef DEBUG_MODE_FULL
|
||||
addMissionEventHandler ["Draw3D", {
|
||||
private _unitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []];
|
||||
|
||||
{
|
||||
_x params ["_unit", "_pos"];
|
||||
|
||||
switch true do {
|
||||
case (surfaceIsWater (getPos _unit) && {surfaceIsWater _pos}) : {
|
||||
for "_i" from 0 to 3 do {
|
||||
drawLine3D [_unit modelToWorldVisualWorld [0,0,1], (AGLtoASL _pos), [1,0,0,1]];
|
||||
};
|
||||
drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], (AGLtoASL _pos), 0.75, 0.75, 0.75];
|
||||
};
|
||||
|
||||
case (!surfaceIsWater (getPos _unit) && {!surfaceIsWater _pos}) : {
|
||||
for "_i" from 0 to 3 do {
|
||||
drawLine3D [_unit modelToWorldVisual [0,0,1], _pos, [1,0,0,1]];
|
||||
};
|
||||
drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], _pos, 0.75, 0.75, 0.75];
|
||||
};
|
||||
|
||||
case (!surfaceIsWater (getPos _unit) && {surfaceIsWater _pos}) : {
|
||||
for "_i" from 0 to 3 do {
|
||||
drawLine3D [_unit modelToWorldVisual [0,0,1], (AGLToASL _pos), [1,0,0,1]];
|
||||
};
|
||||
drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], (AGLtoASL _pos), 0.75, 0.75, 0.75];
|
||||
};
|
||||
|
||||
case (surfaceIsWater (getPos _unit) && {!surfaceIsWater _pos}) : {
|
||||
for "_i" from 0 to 3 do {
|
||||
drawLine3D [_unit modelToWorldVisualWorld [0,0,1], _pos, [1,0,0,1]];
|
||||
};
|
||||
drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], _pos, 0.75, 0.75, 0.75];
|
||||
};
|
||||
};
|
||||
} foreach _unitMoveList;
|
||||
}];
|
||||
#endif
|
9
addons/ai/XEH_preInit.sqf
Normal file
9
addons/ai/XEH_preInit.sqf
Normal file
@ -0,0 +1,9 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
ADDON = false;
|
||||
|
||||
PREP_RECOMPILE_START;
|
||||
#include "XEH_PREP.hpp"
|
||||
PREP_RECOMPILE_END;
|
||||
|
||||
ADDON = true;
|
3
addons/ai/XEH_preStart.sqf
Normal file
3
addons/ai/XEH_preStart.sqf
Normal file
@ -0,0 +1,3 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
#include "XEH_PREP.hpp"
|
@ -15,3 +15,4 @@ class CfgPatches {
|
||||
};
|
||||
|
||||
#include "CfgWeapons.hpp"
|
||||
#include "CfgEventHandlers.hpp"
|
||||
|
278
addons/ai/functions/fnc_garrison.sqf
Normal file
278
addons/ai/functions/fnc_garrison.sqf
Normal file
@ -0,0 +1,278 @@
|
||||
/*
|
||||
* Author: alganthe
|
||||
* Garrison function used to garrison AI inside buildings.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The building(s) nearest this position are used <POSITION>
|
||||
* 1: Limit the building search to those type of building <ARRAY>
|
||||
* 2: Units that will be garrisoned <ARRAY>
|
||||
* 3: Radius to fill building(s) <SCALAR> (default: 50)
|
||||
* 4: 0: even filling, 1: building by building, 2: random filling <SCALAR> (default: 0)
|
||||
* 5: True to fill building(s) from top to bottom <BOOL> (default: false) (note: only works with filling mode 0 and 1)
|
||||
* 6: Teleport units <BOOL> (default: false)
|
||||
|
||||
* Return Value:
|
||||
* Units not garrisoned <ARRAY>
|
||||
*
|
||||
* Example:
|
||||
* [position, nil, [unit1, unit2, unit3, unitN], 200, 1, false, false] call ace_ai_fnc_garrison
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params [["_startingPos",[0,0,0], [[]], 3], ["_buildingTypes", ["Building"], [[]]], ["_unitsArray", [], [[]]], ["_fillingRadius", 50, [0]], ["_fillingType", 0, [0]], ["_topDownFilling", false, [true]], ["_teleport", false, [true]]];
|
||||
|
||||
TRACE_6("fnc_garrison: Start",_startingPos,_buldingTypes,count _unitsArray,_fillingRadius,_fillingTYpe,_topDownFilling);
|
||||
|
||||
_unitsArray = _unitsArray select {alive _x && {!isPlayer _x}};
|
||||
|
||||
if (_startingPos isEqualTo [0,0,0]) exitWith {
|
||||
TRACE_1("fnc_garrison: StartingPos error",_startingPos);
|
||||
[LSTRING(GarrisonInvalidPosition)] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
|
||||
if (count _unitsArray == 0 || {isNull (_unitsArray select 0)}) exitWith {
|
||||
TRACE_1("fnc_garrison: Units error",_unitsArray);
|
||||
[LSTRING(GarrisonNoUnits)] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
|
||||
private _buildings = nearestObjects [_startingPos, _buildingTypes, ([_fillingRadius, 50] select (_fillingRadius < 50))];
|
||||
if (_fillingRadius >= 50) then {
|
||||
_buildings = [_buildings] call CBA_fnc_shuffle;
|
||||
};
|
||||
|
||||
if (count _buildings == 0) exitWith {
|
||||
TRACE_1("fnc_garrison: Building error",_buildings);
|
||||
[LSTRING(GarrisonNoBuilding)] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
|
||||
private _buildingsIndex = [];
|
||||
|
||||
if (_topDownFilling) then {
|
||||
{
|
||||
private _buildingPos = _x buildingPos -1;
|
||||
|
||||
// Those reverse are necessary, as dumb as it is there's no better way to sort those subarrays in sqf
|
||||
{
|
||||
reverse _x;
|
||||
} foreach _buildingPos;
|
||||
|
||||
_buildingPos sort false;
|
||||
|
||||
{
|
||||
reverse _x;
|
||||
} foreach _buildingPos;
|
||||
|
||||
_buildingsIndex pushBack _buildingPos;
|
||||
} foreach _buildings;
|
||||
} else {
|
||||
{
|
||||
_buildingsIndex pushBack (_x buildingPos -1);
|
||||
} foreach _buildings;
|
||||
};
|
||||
|
||||
// Remove buildings without positions
|
||||
{
|
||||
_buildingsIndex deleteAt (_buildingsIndex find _x);
|
||||
} foreach (_buildingsIndex select {count _x == 0});
|
||||
|
||||
//Remove positions units are already pathing to
|
||||
_buildingsIndex = _buildingsIndex apply {
|
||||
private _testedBuilding = _x;
|
||||
|
||||
_testedBuilding select {
|
||||
private _testedPos = _x;
|
||||
(({(_x select 1) isEqualTo _testedPos} count (missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []])) == 0)
|
||||
}
|
||||
};
|
||||
|
||||
// Warn the user that there's not enough positions to place all units
|
||||
private _count = 0;
|
||||
{_count = _count + count _x} foreach _buildingsIndex;
|
||||
if ( (count _unitsArray) - _count > 0) then {
|
||||
TRACE_4("fnc_garrison: Not enough spots to place all units",_unitsArray,count _unitsArray,_count,((count _unitsArray) - _count > 0));
|
||||
[LSTRING(GarrisonNotEnoughPos)] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
|
||||
private _placedUnits = [];
|
||||
private _unitMoveList = [];
|
||||
|
||||
// Force all units to un-garrison
|
||||
[QGVAR(unGarrison), [_unitsArray], _unitsArray] call CBA_fnc_targetEvent;
|
||||
|
||||
private _fnc_comparePos = {
|
||||
params ["_nearestUnits", "_pos"];
|
||||
({
|
||||
if (surfaceIsWater getPos _x) then {
|
||||
floor ((getPosASL _x) select 2) == floor ((AGLtoASL _pos) select 2)
|
||||
} else {
|
||||
floor ((getPosATL _x) select 2) == floor (_pos select 2)
|
||||
};
|
||||
} count _nearestUnits) > 0
|
||||
};
|
||||
|
||||
// Do the placement
|
||||
switch (_fillingType) do {
|
||||
|
||||
// Even filling
|
||||
case 0: {
|
||||
|
||||
while {count _unitsArray > 0} do {
|
||||
if (count _buildingsIndex == 0) exitWith {};
|
||||
private _building = _buildingsIndex select 0;
|
||||
|
||||
if (_building isEqualTo []) then {
|
||||
LOG(format [ARR_2("fnc_garrison: Empty building array | removing building from buildingsIndex | %1 buildings remaining",count _buildingsIndex)]);
|
||||
_buildingsIndex deleteAt 0;
|
||||
|
||||
} else {
|
||||
private _pos = _building select 0;
|
||||
private _nearestUnits = (_pos nearEntities ["CAManBase", 2]);
|
||||
LOG(format [ARR_3("fnc_garrison: Unit detection | %1 units nearby | %2 units within height",count _nearestUnits, {floor ((getPos _x) select 2) == floor (_pos select 2)} count _nearestUnits)]);
|
||||
|
||||
if (count _nearestUnits > 0 && {[_nearestUnits, _pos] call _fnc_comparePos}) then {
|
||||
LOG(format [ARR_2("fnc_garrison: Unit present | removing position | %1 positions remaining for this building",count (_buildingsIndex select (_buildingsIndex find _building)) - 1)]);
|
||||
_buildingsIndex set [0, _building - [_pos]];
|
||||
|
||||
} else {
|
||||
private _unit = _unitsArray select 0;
|
||||
private _posSurface = surfaceIsWater _pos;
|
||||
|
||||
if (_teleport) then {
|
||||
doStop _unit;
|
||||
if (_posSurface) then {
|
||||
_unit setPosASL (AGLtoASL _pos);
|
||||
} else {
|
||||
_unit setPosATL _pos;
|
||||
};
|
||||
|
||||
} else {
|
||||
_unitMoveList pushBack [_unit,[_pos, AGLToASL _pos] select (_posSurface)];
|
||||
};
|
||||
|
||||
_placedUnits pushBack _unit;
|
||||
_unitsArray deleteAt (_unitsArray find _unit);
|
||||
_building deleteAt 0;
|
||||
_buildingsIndex deleteAt 0;
|
||||
_buildingsIndex pushBackUnique _building;
|
||||
_unit setVariable [QGVAR(garrisonned), true, true];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// Building by building
|
||||
case 1: {
|
||||
|
||||
while {count _unitsArray > 0} do {
|
||||
if (count _buildingsIndex == 0) exitWith {};
|
||||
private _building = _buildingsIndex select 0;
|
||||
|
||||
if (_building isEqualTo []) then {
|
||||
LOG(format [ARR_2("fnc_garrison: empty building array | removing building from buildingsIndex | %1 buildings remaining",count _buildingsIndex)]);
|
||||
_buildingsIndex deleteAt 0;
|
||||
|
||||
} else {
|
||||
private _pos = _building select 0;
|
||||
private _nearestUnits = (_pos nearEntities ["CAManBase", 2]);
|
||||
LOG(format [ARR_3("fnc_garrison: Unit detection | %1 units nearby | %2 units within height",count _nearestUnits, {floor ((getPos _x) select 2) == floor (_pos select 2)} count _nearestUnits)]);
|
||||
|
||||
if (count _nearestUnits > 0 && {[_nearestUnits, _pos] call _fnc_comparePos}) then {
|
||||
LOG(format [ARR_2("fnc_garrison: Unit present | removing position | %1 positions remaining for this building",count (_buildingsIndex select (_buildingsIndex find _building)) - 1)]);
|
||||
_buildingsIndex set [0, _building - [_pos]];
|
||||
|
||||
} else {
|
||||
private _unit = _unitsArray select 0;
|
||||
private _posSurface = surfaceIsWater _pos;
|
||||
|
||||
if (_teleport) then {
|
||||
doStop _unit;
|
||||
if (_posSurface) then {
|
||||
_unit setPosASL (AGLtoASL _pos);
|
||||
} else {
|
||||
_unit setPosATL _pos;
|
||||
};
|
||||
|
||||
} else {
|
||||
_unitMoveList pushBack [_unit,[_pos, AGLToASL _pos] select (_posSurface)];
|
||||
};
|
||||
|
||||
_placedUnits pushBack _unit;
|
||||
_unitsArray deleteAt (_unitsArray find _unit);
|
||||
_buildingsIndex set [0, _building - [_pos]];
|
||||
_unit setVariable [QGVAR(garrisonned), true, true];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// Random
|
||||
case 2: {
|
||||
|
||||
while {count _unitsArray > 0} do {
|
||||
if (count _buildingsIndex == 0) exitWith {};
|
||||
private _building = selectRandom _buildingsIndex;
|
||||
|
||||
if (_building isEqualTo []) then {
|
||||
LOG(format [ARR_2("fnc_garrison: empty building array | removing building from buildingsIndex | %1 buildings remaining",count _buildingsIndex)]);
|
||||
_buildingsIndex deleteAt (_buildingsIndex find _building);
|
||||
|
||||
} else {
|
||||
private _pos = selectRandom _building;
|
||||
private _nearestUnits = (_pos nearEntities ["CAManBase", 2]);
|
||||
LOG(format [ARR_3("fnc_garrison: Unit detection | %1 units nearby | %2 units within height",count _nearestUnits, {floor ((getPos _x) select 2) == floor (_pos select 2)} count _nearestUnits)]);
|
||||
|
||||
if (count _nearestUnits > 0 && {[_nearestUnits, _pos] call _fnc_comparePos}) then {
|
||||
LOG(format [ARR_2("fnc_garrison: Unit present | removing position | %1 positions remaining for this building",count (_buildingsIndex select (_buildingsIndex find _building)) - 1)]);
|
||||
_buildingsIndex set [(_buildingsIndex find _building), _building - [_pos]];
|
||||
|
||||
} else {
|
||||
private _unit = _unitsArray select 0;
|
||||
private _posSurface = surfaceIsWater _pos;
|
||||
|
||||
if (_teleport) then {
|
||||
doStop _unit;
|
||||
if (_posSurface) then {
|
||||
_unit setPosASL (AGLtoASL _pos);
|
||||
} else {
|
||||
_unit setPosATL _pos;
|
||||
};
|
||||
|
||||
} else {
|
||||
_unitMoveList pushBack [_unit,[_pos, AGLToASL _pos] select (_posSurface)];
|
||||
};
|
||||
|
||||
_placedUnits pushBack _unit;
|
||||
_unitsArray deleteAt (_unitsArray find _unit);
|
||||
_buildingsIndex set [(_buildingsIndex find _building), _building - [_pos]];
|
||||
_unit setVariable [QGVAR(garrisonned), true, true];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
TRACE_1(format [ARR_2("fnc_garrison: while loop ended | %1 units ready to be treated by PFH",count _unitMoveList)], _teleport);
|
||||
|
||||
// Update the unit list and remove duplicate positions and units
|
||||
private _garrison_unitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []];
|
||||
|
||||
_garrison_unitMoveList = _garrison_unitMoveList select {
|
||||
_x params ["_testedUnit", "_testedPos"];
|
||||
({(_x select 0) isEqualTo _testedUnit} count _unitMoveList == 0)
|
||||
};
|
||||
|
||||
_garrison_unitMoveList append _unitMoveList;
|
||||
|
||||
missionNameSpace setVariable [QGVAR(garrison_unitMoveList), _garrison_unitMoveList, true];
|
||||
|
||||
if (_teleport) then {
|
||||
[QGVAR(AISection), [_placedUnits, ["PATH"], false], _placedUnits] call CBA_fnc_targetEvent;
|
||||
|
||||
} else {
|
||||
[_unitMoveList] call FUNC(garrisonMove);
|
||||
};
|
||||
|
||||
TRACE_1(format [ARR_3("fnc_garrison: End | %1 units left | %2 buildings left", count _unitsArray, count _buildingsIndex)], _unitsArray);
|
||||
_unitsArray
|
149
addons/ai/functions/fnc_garrisonMove.sqf
Normal file
149
addons/ai/functions/fnc_garrisonMove.sqf
Normal file
@ -0,0 +1,149 @@
|
||||
/*
|
||||
* Author: alganthe
|
||||
* Internal function used by ace_ai_fnc_garrison to make the units move to the positions it picked.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Array of arrays <ARRAY>
|
||||
* 0: Unit needing to be placed <UNIT>
|
||||
* 1: Position the unit need to be placed at <POSITION>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [ [unit1, [10, 10, 10]], [unit2, [30, 30, 30]], [unitN, getPos player] ] call ace_ai_fnc_garrisonMove
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params [ ["_unitMoveList", nil, [[]]] ];
|
||||
|
||||
if (isNil "_unitMoveList") exitWith {};
|
||||
|
||||
// Start initial movement
|
||||
private _unitMoveListUnits = (_unitMoveList apply {_x select 0});
|
||||
[QGVAR(setBehaviour), [(_unitMoveListUnits select {leader _x == _x}), "AWARE"], _unitMoveListUnits] call CBA_fnc_targetEvent;
|
||||
[QGVAR(AISection), [_unitMoveListUnits, ["FSM"], false], _unitMoveListUnits] call CBA_fnc_targetEvent;
|
||||
[QGVAR(doMove), [_unitMoveList], _unitMoveListUnits] call CBA_fnc_targetEvent;
|
||||
[QGVAR(enableAttack), [_unitMoveListUnits select {leader _x == _x}, false], _unitMoveListUnits] call CBA_fnc_targetEvent;
|
||||
|
||||
{
|
||||
_x setVariable [QGVAR(garrisonMove_failSafe), nil, true];
|
||||
_x setVariable [QGVAR(garrisonMove_unitPosMemory), nil, true];
|
||||
} foreach _unitMoveListUnits;
|
||||
|
||||
// Avoid duplicate PFHs
|
||||
if (isNil QGVAR(garrison_moveUnitPFH)) then {
|
||||
missionNameSpace setVariable [QGVAR(garrison_moveUnitPFH), true, true];
|
||||
|
||||
// PFH checking if the units have reached their destination
|
||||
[{
|
||||
params ["_args", "_pfhID"];
|
||||
|
||||
private _unitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []];
|
||||
|
||||
// End PFH if all units are placed / unable to reach position
|
||||
if (_unitMoveList isEqualTo []) then {
|
||||
missionNameSpace setVariable [QGVAR(garrison_moveUnitPFH), nil, true];
|
||||
LOG("garrisonMove PFH: PFH finished it's job | deleting PFH");
|
||||
_pfhID call CBA_fnc_removePerFrameHandler;
|
||||
|
||||
} else {
|
||||
{
|
||||
_x params ["_unit", "_pos"];
|
||||
|
||||
// Check if unit is alive or even existing
|
||||
if (!alive _unit) then {
|
||||
_unitMoveList deleteAt (_unitMoveList find _x);
|
||||
LOG(format [ARR_2("garrisonMove PFH: unit dead or deleted | %1 units left", count _unitMoveList)]);
|
||||
|
||||
} else {
|
||||
private _unitPos = getPos _unit;
|
||||
if (surfaceisWater _unitPos) then {
|
||||
_unitPos = getPosASL _unit;
|
||||
} else {
|
||||
_unitPos = getPosATL _unit;
|
||||
};
|
||||
|
||||
if (unitReady _unit) then {
|
||||
// Check for distance, doMove and AI are moody and may stop for no reason, within 6 meters and ready should be fine
|
||||
if (_unitPos distance _pos < 3) then {
|
||||
_unit setVariable [QGVAR(garrisonMove_failSafe), nil, true];
|
||||
_unit setVariable [QGVAR(garrisonMove_unitPosMemory), nil, true];
|
||||
_unit setVariable [QGVAR(garrisonned), true, true];
|
||||
_unitMoveList deleteAt (_unitMoveList find _x);
|
||||
|
||||
[QGVAR(AISection), [[_unit], ["PATH"], false], _unit] call CBA_fnc_targetEvent;
|
||||
[QGVAR(AISection), [[_unit], ["FSM"], true], _unit] call CBA_fnc_targetEvent;
|
||||
|
||||
if ({(_x select 0) in units _unit && {!isPlayer (_x select 0)}} count _unitMoveList == 0) then {
|
||||
[QGVAR(enableAttack), [[_unit], true], _unit] call CBA_fnc_targetEvent;
|
||||
};
|
||||
|
||||
LOG(format [ARR_2("garrisonMove PFH: unit in position | %1 units left", count _unitMoveList)]);
|
||||
|
||||
} else {
|
||||
// Tell the unit to move if an order wasn't given within 30s, avoid doMove spam
|
||||
(_unit getVariable [QGVAR(garrisonMove_failSafe), [CBA_missionTime, 5]]) params ["_failSafeTimer", "_failSafeRemainingAttemps"];
|
||||
|
||||
if (_failSafeTimer <= CBA_missionTime) then {
|
||||
if (_failSafeRemainingAttemps == 0 ) then {
|
||||
_unit setVariable [QGVAR(garrisonMove_failSafe), nil, true];
|
||||
_unit setVariable [QGVAR(garrisonMove_unitPosMemory), nil, true];
|
||||
[QGVAR(unGarrison), [[_unit]], _unit] call CBA_fnc_targetEvent;
|
||||
_unitMoveList deleteAt (_unitMoveList find _x);
|
||||
LOG("garrisonMove PFH unitReady: all moving commands failed | restoring AI capabilities");
|
||||
|
||||
} else {
|
||||
_unit setVariable [QGVAR(garrisonMove_failSafe), [_failSafeTimer + 15, _failSafeRemainingAttemps - 1]];
|
||||
[QGVAR(doMove), [[[_unit, _pos]]], _unit] call CBA_fnc_targetEvent;
|
||||
LOG("garrisonMove PFH unitReady: unit not close enough | Sending another doMove command");
|
||||
};
|
||||
};
|
||||
};
|
||||
} else {
|
||||
(_unit getVariable [QGVAR(garrisonMove_unitPosMemory), [CBA_missionTime, [0,0,0]]]) params ["_unitPosTimer", "_unitOldPos"];
|
||||
|
||||
// AI may sometimes not be able to report unitReady, this is to avoid the PFH running forever
|
||||
switch true do {
|
||||
case ((_unitPosTimer + 15) < CBA_missionTime && {(_unitPos distance _pos) < 3}) : {
|
||||
TRACE_1("case 1",_unit);
|
||||
_unit setVariable [QGVAR(garrisonMove_failSafe), nil, true];
|
||||
_unit setVariable [QGVAR(garrisonMove_unitPosMemory), nil, true];
|
||||
_unit setVariable [QGVAR(garrisonned), true, true];
|
||||
_unitMoveList deleteAt (_unitMoveList find _x);
|
||||
|
||||
[QGVAR(AISection), [[_unit], ["PATH"], false], _unit] call CBA_fnc_targetEvent;
|
||||
[QGVAR(AISection), [[_unit], ["FSM"], true], _unit] call CBA_fnc_targetEvent;
|
||||
|
||||
if ({(_x select 0) in units _unit && {!isPlayer (_x select 0)}} count _unitMoveList == 0) then {
|
||||
[QGVAR(enableAttack), [[_unit], true], _unit] call CBA_fnc_targetEvent;
|
||||
};
|
||||
|
||||
LOG(format [ARR_2("garrisonMove PFH unitNotReady: unit in position | %1 units left", count _unitMoveList)]);
|
||||
};
|
||||
|
||||
case ((_unitPosTimer + 15) < CBA_missionTime && {_unitOldPos distance _unitPos < 0.5}) : {
|
||||
TRACE_3("case 2",_unit, ((_unitPosTimer + 15) < CBA_missionTime), (_unitOldPos distance _unitPos < 0.5));
|
||||
_unit setVariable [QGVAR(garrisonMove_failSafe), nil, true];
|
||||
_unit setVariable [QGVAR(garrisonMove_unitPosMemory), nil, true];
|
||||
[QGVAR(unGarrison), [[_unit]], _unit] call CBA_fnc_targetEvent;
|
||||
_unitMoveList deleteAt (_unitMoveList find _x);
|
||||
LOG("garrisonMove PFH unitNotReady: all moving commands failed | restoring AI capabilities");
|
||||
};
|
||||
|
||||
case (_unitOldPos distance _unitPos < 0.5) : {};
|
||||
|
||||
default {
|
||||
_unit setVariable [QGVAR(garrisonMove_unitPosMemory), [CBA_missionTime, _unitPos]];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
} foreach _unitMoveList;
|
||||
|
||||
missionNameSpace setVariable [QGVAR(garrison_unitMoveList), _unitMoveList, true];
|
||||
};
|
||||
}, 0.5, []] call CBA_fnc_addPerFrameHandler;
|
||||
};
|
57
addons/ai/functions/fnc_unGarrison.sqf
Normal file
57
addons/ai/functions/fnc_unGarrison.sqf
Normal file
@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Author: alganthe
|
||||
* Used to un-garrison units.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Units to un-garrison <ARRAY>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [unit1, unit2, unit3] call ace_ai_fnc_unGarrison
|
||||
*
|
||||
* Public: Yes
|
||||
*
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params [["_units", [], [[]]]];
|
||||
|
||||
_units = _units select {local _x};
|
||||
|
||||
{
|
||||
if (!isPlayer _x && {local _x}) then {
|
||||
_x enableAI "PATH";
|
||||
_x enableAI "FSM";
|
||||
|
||||
private _leader = leader _x;
|
||||
|
||||
TRACE_3("fnc_ungarrison: unit and leader",_x , _leader, (_leader == _x));
|
||||
|
||||
_x setVariable [QGVAR(garrisonned), false, true];
|
||||
|
||||
if (_leader != _x) then {
|
||||
doStop _x;
|
||||
_x doFollow _leader;
|
||||
|
||||
} else {
|
||||
_x doMove ((nearestBuilding (getPos _x)) buildingExit 0);
|
||||
};
|
||||
|
||||
private _fnc_countGarrisonnedUnits = {
|
||||
params ["_unit", "_bool"];
|
||||
if (_bool) then {
|
||||
({(_x getVariable [QGVAR(garrisonned), false]) && {!isPlayer _x}} count units _unit)
|
||||
} else {
|
||||
({!(_x getVariable [QGVAR(garrisonned), false]) && {!isPlayer _x}} count units _unit)
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
if ([_x, true] call _fnc_countGarrisonnedUnits == ({!isPlayer _x} count (units _x)) - 1 || {[_x, false] call _fnc_countGarrisonnedUnits == {!isPlayer _x} count (units _x)}) then {
|
||||
LOG("fnc_ungarrison: enableAttack true");
|
||||
(group _x) enableAttack true;
|
||||
};
|
||||
};
|
||||
} foreach _units;
|
1
addons/ai/functions/script_component.hpp
Normal file
1
addons/ai/functions/script_component.hpp
Normal file
@ -0,0 +1 @@
|
||||
#include "\z\ace\addons\ai\script_component.hpp"
|
@ -2,8 +2,8 @@
|
||||
#define COMPONENT_BEAUTIFIED AI
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
// #define DEBUG_MODE_FULL
|
||||
// #define DISABLE_COMPILE_CACHE
|
||||
//#define DEBUG_MODE_FULL
|
||||
//#define DISABLE_COMPILE_CACHE
|
||||
// #define ENABLE_PERFORMANCE_COUNTERS
|
||||
|
||||
#ifdef DEBUG_ENABLED_AI
|
||||
|
41
addons/ai/stringtable.xml
Normal file
41
addons/ai/stringtable.xml
Normal file
@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project name="ACE">
|
||||
<Package name="ai">
|
||||
<Key ID="STR_ACE_ai_GarrisonInvalidPosition">
|
||||
<English>Invalid position provided.</English>
|
||||
<French>Position invalide fourni</French>
|
||||
<Japanese>位置が無効です。</Japanese>
|
||||
<Italian>Posizione invalida fornita.</Italian>
|
||||
<Chinese>提供的位置無效。</Chinese>
|
||||
<Chinesesimp>提供的位置无效。</Chinesesimp>
|
||||
<Korean>위치가 잘못되었습니다.</Korean>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_ai_GarrisonNoUnits">
|
||||
<English>No units provided.</English>
|
||||
<French>Aucune unité fourni</French>
|
||||
<Japanese>ユニットがありません。</Japanese>
|
||||
<Italian>Nessuna unità fornita.</Italian>
|
||||
<Chinese>找不到可用的單位。</Chinese>
|
||||
<Chinesesimp>找不到可用的单位。</Chinesesimp>
|
||||
<Korean>병력이 없습니다.</Korean>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_ai_GarrisonNotEnoughPos">
|
||||
<English>There aren't enough positions to place all units.</English>
|
||||
<French>Il n'y a pas assez de positions pour placer toutes les unités</French>
|
||||
<Japanese>全ユニットを置くために十分な位置がありません。</Japanese>
|
||||
<Italian>Non ci sono abbastanza posizioni per piazzare tutte le unità.</Italian>
|
||||
<Chinese>沒有足夠的位置能擺放所有單位。</Chinese>
|
||||
<Chinesesimp>没有足够的位置能摆放所有单位。</Chinesesimp>
|
||||
<Korean>모든 병력을 배치 할 공간이 없습니다.</Korean>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_ai_GarrisonNoBuilding">
|
||||
<English>No building found.</English>
|
||||
<French>Aucun bâtiment trouvé</French>
|
||||
<Japanese>建物がありません。</Japanese>
|
||||
<Italian>Nessun edificio trovato.</Italian>
|
||||
<Chinese>沒找到建築物。</Chinese>
|
||||
<Chinesesimp>没找到建筑物。</Chinesesimp>
|
||||
<Korean>건물이 없습니다.</Korean>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
@ -27,6 +27,7 @@ PREP(init);
|
||||
PREP(initGunList);
|
||||
PREP(insert_c1_ballistic_coefficient_data);
|
||||
PREP(insert_muzzle_velocity_data);
|
||||
PREP(lookup_c1_ballistic_coefficient);
|
||||
PREP(parse_input);
|
||||
PREP(read_gun_list_entries_from_config);
|
||||
PREP(recalculate_c1_ballistic_coefficient);
|
||||
|
@ -29,7 +29,8 @@ private _distance = 0;
|
||||
while {_velocity > _thresholdVelocity} do {
|
||||
private _bc = GVAR(targetSolutionInput) select 14;
|
||||
private _dragModel = GVAR(targetSolutionInput) select 15;
|
||||
private _drag = parseNumber(("ace_advanced_ballistics" callExtension format["retard:%1:%2:%3", _dragModel, _bc, _velocity]));
|
||||
private _temperature = GVAR(targetSolutionInput) select 5;
|
||||
private _drag = parseNumber(("ace_advanced_ballistics" callExtension format["retard:%1:%2:%3:%4", _dragModel, _bc, _velocity, _temperature]));
|
||||
_distance = _distance + _velocity * __DELTA_T;
|
||||
_velocity = _velocity - (_drag * __DELTA_T);
|
||||
};
|
||||
|
@ -27,4 +27,9 @@ _solutionInput set [ 8, round(_solutionInput select 4)];
|
||||
_solutionInput set [13, _targetRange];
|
||||
_solutionInput set [17, true];
|
||||
|
||||
if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
|
||||
private _c1 = [_targetRange] call FUNC(lookup_c1_ballistic_coefficient);
|
||||
_solutionInput set [14, _c1];
|
||||
};
|
||||
|
||||
private _result = _solutionInput call FUNC(calculate_solution);
|
||||
|
@ -51,37 +51,34 @@ params [
|
||||
];
|
||||
_windSpeed params ["_windSpeed1", "_windSpeed2"];
|
||||
|
||||
private ["_tx", "_tz", "_lastBulletPos", "_bulletPos", "_bulletVelocity", "_bulletAccel", "_bulletSpeed", "_gravity", "_deltaT"];
|
||||
_tx = 0;
|
||||
_tz = 0;
|
||||
_lastBulletPos = [0, 0, 0];
|
||||
_bulletPos = [0, 0, 0];
|
||||
_bulletVelocity = [0, 0, 0];
|
||||
_bulletAccel = [0, 0, 0];
|
||||
_bulletSpeed = 0;
|
||||
_gravity = [0, sin(_scopeBaseAngle + _inclinationAngle) * -9.80665, cos(_scopeBaseAngle + _inclinationAngle) * -9.80665];
|
||||
_deltaT = 1 / _simSteps;
|
||||
private _tx = 0;
|
||||
private _tz = 0;
|
||||
private _lastBulletPos = [0, 0, 0];
|
||||
private _bulletPos = [0, 0, 0];
|
||||
private _bulletVelocity = [0, 0, 0];
|
||||
private _bulletAccel = [0, 0, 0];
|
||||
private _bulletSpeed = 0;
|
||||
private _gravity = [0, sin(_scopeBaseAngle + _inclinationAngle) * -9.80665, cos(_scopeBaseAngle + _inclinationAngle) * -9.80665];
|
||||
private _deltaT = 1 / _simSteps;
|
||||
|
||||
private ["_elevation", "_windage1", "_windage2", "_lead", "_TOF", "_trueVelocity", "_trueSpeed", "_kineticEnergy", "_verticalCoriolis", "_verticalDeflection", "_horizontalCoriolis", "_horizontalDeflection", "_spinDrift", "_spinDeflection"];
|
||||
_elevation = 0;
|
||||
_windage1 = 0;
|
||||
_windage2 = 0;
|
||||
_lead = 0;
|
||||
_TOF = 0;
|
||||
_trueVelocity = [0, 0, 0];
|
||||
_trueSpeed = 0;
|
||||
_verticalCoriolis = 0;
|
||||
_verticalDeflection = 0;
|
||||
_horizontalCoriolis = 0;
|
||||
_horizontalDeflection = 0;
|
||||
_spinDrift = 0;
|
||||
_spinDeflection = 0;
|
||||
private _elevation = 0;
|
||||
private _windage1 = 0;
|
||||
private _windage2 = 0;
|
||||
private _lead = 0;
|
||||
private _TOF = 0;
|
||||
private _trueVelocity = [0, 0, 0];
|
||||
private _trueSpeed = 0;
|
||||
private _verticalCoriolis = 0;
|
||||
private _verticalDeflection = 0;
|
||||
private _horizontalCoriolis = 0;
|
||||
private _horizontalDeflection = 0;
|
||||
private _spinDrift = 0;
|
||||
private _spinDeflection = 0;
|
||||
|
||||
private ["_n", "_range", "_trueRange", "_rangeFactor"];
|
||||
_n = 0;
|
||||
_range = 0;
|
||||
_trueRange = 0;
|
||||
_rangeFactor = 1;
|
||||
private _n = 0;
|
||||
private _range = 0;
|
||||
private _trueRange = 0;
|
||||
private _rangeFactor = 1;
|
||||
if (_storeRangeCardData) then {
|
||||
if (GVAR(currentUnit) == 1) then {
|
||||
_rangeFactor = 1.0936133;
|
||||
@ -89,16 +86,14 @@ if (_storeRangeCardData) then {
|
||||
GVAR(rangeCardData) = [];
|
||||
};
|
||||
|
||||
private ["_wind1", "_wind2", "_windDrift"];
|
||||
_wind1 = [cos(270 - _windDirection * 30) * _windSpeed1, sin(270 - _windDirection * 30) * _windSpeed1, 0];
|
||||
_wind2 = [cos(270 - _windDirection * 30) * _windSpeed2, sin(270 - _windDirection * 30) * _windSpeed2, 0];
|
||||
_windDrift = 0;
|
||||
private _wind1 = [cos(270 - _windDirection * 30) * _windSpeed1, sin(270 - _windDirection * 30) * _windSpeed1, 0];
|
||||
private _wind2 = [cos(270 - _windDirection * 30) * _windSpeed2, sin(270 - _windDirection * 30) * _windSpeed2, 0];
|
||||
private _windDrift = 0;
|
||||
if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
|
||||
_bc = parseNumber(("ace_advanced_ballistics" callExtension format["atmosphericCorrection:%1:%2:%3:%4:%5", _bc, _temperature, _barometricPressure, _relativeHumidity, _atmosphereModel]));
|
||||
};
|
||||
|
||||
private ["_eoetvoesMultiplier"];
|
||||
_eoetvoesMultiplier = 0;
|
||||
private _eoetvoesMultiplier = 0;
|
||||
if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
|
||||
_eoetvoesMultiplier = 2 * (0.0000729 * _muzzleVelocity / -9.80665) * cos(_latitude) * sin(_directionOfFire);
|
||||
};
|
||||
@ -118,7 +113,7 @@ while {_TOF < 15 && (_bulletPos select 1) < _targetRange} do {
|
||||
_trueSpeed = vectorMagnitude _trueVelocity;
|
||||
|
||||
if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
|
||||
private _drag = parseNumber(("ace_advanced_ballistics" callExtension format["retard:%1:%2:%3", _dragModel, _bc, _trueSpeed]));
|
||||
private _drag = parseNumber(("ace_advanced_ballistics" callExtension format["retard:%1:%2:%3:%4", _dragModel, _bc, _trueSpeed, _temperature]));
|
||||
_bulletAccel = (vectorNormalized _trueVelocity) vectorMultiply (-1 * _drag);
|
||||
} else {
|
||||
_bulletAccel = _trueVelocity vectorMultiply (_trueSpeed * _airFriction);
|
||||
@ -144,7 +139,7 @@ while {_TOF < 15 && (_bulletPos select 1) < _targetRange} do {
|
||||
_windage1 = - atan(_tx / _trueRange);
|
||||
_windDrift = (_wind2 select 0) * (_TOF - _trueRange / _muzzleVelocity);
|
||||
_windage2 = - atan(_windDrift / _trueRange);
|
||||
_lead = (_targetSpeed * _TOF) / (Tan(3.38 / 60) * _trueRange);
|
||||
_lead = (_targetSpeed * _TOF) / (Tan(MRAD_TO_DEG(1)) * _trueRange);
|
||||
};
|
||||
_kineticEnergy = 0.5 * (_bulletMass / 1000 * (_bulletSpeed ^ 2));
|
||||
_kineticEnergy = _kineticEnergy * 0.737562149;
|
||||
@ -179,7 +174,7 @@ if (_targetRange != 0) then {
|
||||
_windage1 = - atan(_tx / _targetRange);
|
||||
_windDrift = (_wind2 select 0) * (_TOF - _targetRange / _muzzleVelocity);
|
||||
_windage2 = - atan(_windDrift / _targetRange);
|
||||
_lead = (_targetSpeed * _TOF) / (Tan(3.38 / 60) * _targetRange);
|
||||
_lead = (_targetSpeed * _TOF) / (Tan(MRAD_TO_DEG(1)) * _targetRange);
|
||||
};
|
||||
|
||||
_kineticEnergy = 0.5 * (_bulletMass / 1000 * (_bulletSpeed ^ 2));
|
||||
|
@ -17,21 +17,19 @@
|
||||
|
||||
[] call FUNC(parse_input);
|
||||
|
||||
private ["_scopeBaseAngle"];
|
||||
_scopeBaseAngle = (GVAR(workingMemory) select 3);
|
||||
private _scopeBaseAngle = (GVAR(workingMemory) select 3);
|
||||
|
||||
private ["_bulletMass", "_bulletDiameter", "_boreHeight", "_airFriction", "_barrelTwist", "_muzzleVelocity", "_bc", "_dragModel", "_atmosphereModel", "_twistDirection"];
|
||||
_bulletMass = GVAR(workingMemory) select 12;
|
||||
_bulletDiameter = GVAR(workingMemory) select 13;
|
||||
_boreHeight = GVAR(workingMemory) select 5;
|
||||
_airFriction = GVAR(workingMemory) select 4;
|
||||
_barrelTwist = GVAR(workingMemory) select 14;
|
||||
_muzzleVelocity = GVAR(workingMemory) select 1;
|
||||
_bc = GVAR(workingMemory) select 15;
|
||||
_dragModel = GVAR(workingMemory) select 16;
|
||||
_atmosphereModel = GVAR(workingMemory) select 17;
|
||||
private _bulletMass = GVAR(workingMemory) select 12;
|
||||
private _bulletDiameter = GVAR(workingMemory) select 13;
|
||||
private _boreHeight = GVAR(workingMemory) select 5;
|
||||
private _airFriction = GVAR(workingMemory) select 4;
|
||||
private _barrelTwist = GVAR(workingMemory) select 14;
|
||||
private _muzzleVelocity = GVAR(workingMemory) select 1;
|
||||
private _bc = GVAR(workingMemory) select 15;
|
||||
private _dragModel = GVAR(workingMemory) select 16;
|
||||
private _atmosphereModel = GVAR(workingMemory) select 17;
|
||||
|
||||
_twistDirection = 0;
|
||||
private _twistDirection = 0;
|
||||
if (_barrelTwist > 0) then {
|
||||
_twistDirection = 1;
|
||||
} else {
|
||||
@ -41,34 +39,31 @@ if (_barrelTwist > 0) then {
|
||||
};
|
||||
_barrelTwist = abs(_barrelTwist);
|
||||
|
||||
private ["_altitude", "_temperature", "_barometricPressure", "_relativeHumidity"];
|
||||
_altitude = GVAR(altitude);
|
||||
_temperature = GVAR(temperature);
|
||||
_barometricPressure = GVAR(barometricPressure);
|
||||
_relativeHumidity = GVAR(relativeHumidity);
|
||||
private _altitude = GVAR(altitude);
|
||||
private _temperature = GVAR(temperature);
|
||||
private _barometricPressure = GVAR(barometricPressure);
|
||||
private _relativeHumidity = GVAR(relativeHumidity);
|
||||
if (!GVAR(atmosphereModeTBH)) then {
|
||||
_barometricPressure = 1013.25 * (1 - (0.0065 * _altitude) / (273.15 + _temperature + 0.0065 * _altitude)) ^ 5.255754495;
|
||||
_relativeHumidity = 0.5;
|
||||
};
|
||||
|
||||
private ["_bulletLength", "_stabilityFactor"];
|
||||
_bulletLength = 50 * _bulletMass / ((_bulletDiameter/2)^2);
|
||||
_stabilityFactor = 1.5;
|
||||
private _bulletLength = 50 * _bulletMass / ((_bulletDiameter/2)^2);
|
||||
private _stabilityFactor = 1.5;
|
||||
if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
|
||||
if (_bulletDiameter > 0 && _bulletLength > 0 && _bulletMass > 0 && _barrelTwist > 0) then {
|
||||
_stabilityFactor = [_bulletDiameter, _bulletLength, _bulletMass, _barrelTwist * 10, _muzzleVelocity, _temperature, _barometricPressure] call EFUNC(advanced_ballistics,calculateStabilityFactor);
|
||||
};
|
||||
};
|
||||
|
||||
private ["_latitude", "_directionOfFire", "_windSpeed1", "_windSpeed2", "_windDirection", "_inclinationAngle", "_targetSpeed", "_targetRange"];
|
||||
_latitude = GVAR(latitude) select GVAR(currentTarget);
|
||||
_directionOfFire = GVAR(directionOfFire) select GVAR(currentTarget);
|
||||
_windSpeed1 = GVAR(windSpeed1) select GVAR(currentTarget);
|
||||
_windSpeed2 = GVAR(windSpeed2) select GVAR(currentTarget);
|
||||
_windDirection = GVAR(windDirection) select GVAR(currentTarget);
|
||||
_inclinationAngle = GVAR(inclinationAngle) select GVAR(currentTarget);
|
||||
_targetSpeed = GVAR(targetSpeed) select GVAR(currentTarget);
|
||||
_targetRange = GVAR(targetRange) select GVAR(currentTarget);
|
||||
private _latitude = GVAR(latitude) select GVAR(currentTarget);
|
||||
private _directionOfFire = GVAR(directionOfFire) select GVAR(currentTarget);
|
||||
private _windSpeed1 = GVAR(windSpeed1) select GVAR(currentTarget);
|
||||
private _windSpeed2 = GVAR(windSpeed2) select GVAR(currentTarget);
|
||||
private _windDirection = GVAR(windDirection) select GVAR(currentTarget);
|
||||
private _inclinationAngle = GVAR(inclinationAngle) select GVAR(currentTarget);
|
||||
private _targetSpeed = GVAR(targetSpeed) select GVAR(currentTarget);
|
||||
private _targetRange = GVAR(targetRange) select GVAR(currentTarget);
|
||||
|
||||
GVAR(targetSolutionInput) = [_scopeBaseAngle, _bulletMass, _boreHeight, _airFriction, _muzzleVelocity, _temperature, _barometricPressure, _relativeHumidity, round(_muzzleVelocity),
|
||||
[_windSpeed1, _windSpeed2], _windDirection, _inclinationAngle, _targetSpeed, _targetRange, _bc, _dragModel, _atmosphereModel, false, _stabilityFactor, _twistDirection, _latitude, _directionOfFire];
|
||||
|
@ -15,12 +15,10 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_targetRange", "_numTicks", "_timeSecs", "_estSpeed"];
|
||||
|
||||
_targetRange = parseNumber(ctrlText 8004);
|
||||
_numTicks = parseNumber(ctrlText 8005);
|
||||
_timeSecs = parseNumber(ctrlText 8006);
|
||||
_estSpeed = 0;
|
||||
private _targetRange = parseNumber(ctrlText 8004);
|
||||
private _numTicks = parseNumber(ctrlText 8005);
|
||||
private _timeSecs = parseNumber(ctrlText 8006);
|
||||
private _estSpeed = 0;
|
||||
|
||||
if (GVAR(currentUnit) == 1) then {
|
||||
_targetRange = _targetRange / 1.0936133;
|
||||
|
@ -46,8 +46,8 @@ if (_parseInput) then {
|
||||
};
|
||||
switch (_dropUnit) do {
|
||||
case 0: {
|
||||
_transonicDrop = _transonicDrop * 3.38;
|
||||
_subsonicDrop = _subsonicDrop * 3.38;
|
||||
_transonicDrop = MRAD_TO_MOA(_transonicDrop);
|
||||
_subsonicDrop = MRAD_TO_MOA(_subsonicDrop);
|
||||
};
|
||||
case 2: {
|
||||
_transonicDrop = _transonicDrop / 1.047;
|
||||
|
@ -15,10 +15,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private _target = 0 max _this min 3;
|
||||
GVAR(currentTarget) = 0 max _this min 3;
|
||||
|
||||
[] call FUNC(parse_input);
|
||||
GVAR(targetRangeDirtyFlag) = true;
|
||||
|
||||
GVAR(currentTarget) = _target;
|
||||
call FUNC(update_target_selection);
|
||||
call FUNC(calculate_target_solution);
|
||||
|
@ -51,7 +51,7 @@ GVAR(atmosphereModeTBH) = true;
|
||||
GVAR(altitude) = 0;
|
||||
GVAR(temperature) = 15;
|
||||
GVAR(barometricPressure) = 1013.25;
|
||||
GVAR(relativeHumidity) = 0.5;
|
||||
GVAR(relativeHumidity) = 0.0;
|
||||
|
||||
GVAR(latitude) = [38, 38, 38, 38];
|
||||
GVAR(directionOfFire) = [0, 0, 0, 0];
|
||||
@ -84,6 +84,8 @@ GVAR(truingDropMuzzleVelocity) = 0;
|
||||
|
||||
GVAR(targetSolutionInput) = nil;
|
||||
|
||||
GVAR(targetRangeDirtyFlag) = false;
|
||||
|
||||
GVAR(showMainPage) = true;
|
||||
GVAR(showAddNewGun) = false;
|
||||
GVAR(showAtmoEnvData) = false;
|
||||
|
@ -32,51 +32,51 @@ if ((profileNamespace getVariable ["ACE_ATragMX_profileNamespaceVersion", 0]) ==
|
||||
if (_resetGunList) then {
|
||||
WARNING("Reseting Profile Gunlist");
|
||||
// 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, Muzzle Velocity vs. Temperature Interpolation, C1 Ballistic Coefficient vs. Distance Interpolation, Persistent
|
||||
GVAR(gunList) = [["12.7x108mm" , 812, 100, 0.0666557, -0.00063800, 3.81, 0, 2, 10, 120, 0, 0, 48.28, 12.7, 38.10, 0.630, 1, "ASM" , [[-15,793],[0,800],[10,807],[15,812],[25,826],[30,835],[35,846]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
GVAR(gunList) = [["12.7x108mm" , 812, 100, 0.0958029, -0.00063800, 8.89, 0, 2, 10, 120, 0, 0, 48.28, 12.7, 38.10, 0.630, 1, "ASM" , [[-15,793],[0,800],[10,807],[15,812],[25,826],[30,835],[35,846]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
|
||||
["12.7x99mm AMAX" , 852, 100, 0.0615965, -0.00036645, 3.81, 0, 2, 10, 120, 0, 0, 48.60, 12.7, 38.10, 1.050, 1, "ASM" , [[-15,833],[0,840],[10,847],[15,852],[25,866],[30,875],[35,886]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["12.7x99mm" , 892, 100, 0.0588284, -0.00057503, 3.81, 0, 2, 10, 120, 0, 0, 41.92, 12.7, 38.10, 0.670, 1, "ASM" , [[-15,873],[0,880],[10,887],[15,892],[25,906],[30,915],[35,926]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["12.7x99mm AMAX" , 852, 100, 0.0907214, -0.00037397, 8.89, 0, 2, 10, 120, 0, 0, 48.60, 12.7, 38.10, 1.050, 1, "ASM" , [[-15,833],[0,840],[10,847],[15,852],[25,866],[30,875],[35,886]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["12.7x99mm" , 892, 100, 0.0879633, -0.00058679, 8.89, 0, 2, 10, 120, 0, 0, 41.92, 12.7, 38.10, 0.670, 1, "ASM" , [[-15,873],[0,880],[10,887],[15,892],[25,906],[30,915],[35,926]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
|
||||
["12.7x54mm" , 299, 100, 0.3406920, -0.00019268, 3.81, 0, 2, 10, 120, 0, 0, 48.60, 12.7, 24.13, 1.050, 1, "ASM" , [[-15,297],[0,298],[10,299],[15,299],[25,301],[30,302],[35,303]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["12.7x54mm" , 299, 100, 0.3567550, -0.00019568, 6.60, 0, 2, 10, 120, 0, 0, 48.60, 12.7, 24.13, 1.050, 1, "ASM" , [[-15,297],[0,298],[10,299],[15,299],[25,301],[30,302],[35,303]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
|
||||
[".50 Beowulf" , 562, 100, 0.1262000, -0.00202645, 3.81, 0, 2, 10, 120, 0, 0, 21.71, 12.7, 50.80, 0.210, 1, "ASM" , [[-15,560],[0,561],[10,562],[15,562],[25,564],[30,565],[35,566]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
[".50 Beowulf" , 562, 100, 0.1425100, -0.00205896, 6.60, 0, 2, 10, 120, 0, 0, 21.71, 12.7, 50.80, 0.210, 1, "ASM" , [[-15,560],[0,561],[10,562],[15,562],[25,564],[30,565],[35,566]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
|
||||
[".408 CheyTac 305gr", 1059, 100, 0.0482146, -0.00063655, 3.81, 0, 2, 10, 120, 0, 0, 19.76, 10.4, 33.02, 0.569, 1, "ICAO", [[-15,1040],[0,1047],[10,1054],[15,1059],[25,1073],[30,1082],[35,1093]], [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
[".408 CheyTac 419gr", 859, 100, 0.0611842, -0.00044958, 3.81, 0, 2, 10, 120, 0, 0, 27.15, 10.4, 33.02, 0.866, 1, "ICAO", [[-15,840],[0,847],[10,854],[15,859],[25,873],[30,882],[35,893]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
[".408 CheyTac 305gr", 1059, 100, 0.0686329, -0.00065414, 7.37, 0, 2, 10, 120, 0, 0, 19.76, 10.4, 33.02, 0.569, 1, "ICAO", [[-15,1040],[0,1047],[10,1054],[15,1059],[25,1073],[30,1082],[35,1093]], [[0, 0.605], [1110, 0.569], [1500, 0.560], [1790, 0.551], [1990, 0.547], [2140, 0.545], [2300, 0.544]], true],
|
||||
[".408 CheyTac 419gr", 859, 100, 0.0816039, -0.00046249, 7.37, 0, 2, 10, 120, 0, 0, 27.15, 10.4, 33.02, 0.866, 1, "ICAO", [[-15,840],[0,847],[10,854],[15,859],[25,873],[30,882],[35,893]] , [[0, 0.872], [1440, 0.862], [1630, 0.859], [1870, 0.852], [2090, 0.843], [2230, 0.838], [2420, 0.833]], true],
|
||||
|
||||
["9.3×64mm" , 862, 100, 0.0627652, -0.00108571, 3.81, 0, 2, 10, 120, 0, 0, 14.90, 9.30, 35.56, 0.368, 1, "ASM" , [[-15,843],[0,850],[10,857],[15,862],[25,876],[30,885],[35,896]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["9.3×64mm" , 862, 100, 0.0875873, -0.00110727, 8.13, 0, 2, 10, 120, 0, 0, 14.90, 9.30, 35.56, 0.368, 1, "ASM" , [[-15,843],[0,850],[10,857],[15,862],[25,876],[30,885],[35,896]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
|
||||
[".338LM 250gr" , 872, 100, 0.0604821, -0.00059133, 3.81, 0, 2, 10, 120, 0, 0, 16.20, 8.58, 25.40, 0.645, 1, "ICAO", [[-15,853],[0,860],[10,867],[15,872],[25,886],[30,895],[35,906]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
[".338LM 300gr" , 792, 100, 0.0685883, -0.00052190, 3.81, 0, 2, 10, 120, 0, 0, 19.44, 8.58, 25.40, 0.759, 1, "ICAO", [[-15,773],[0,780],[10,787],[15,792],[25,806],[30,815],[35,826]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
[".338LM API526" , 872, 100, 0.0602535, -0.00069611, 3.81, 0, 2, 10, 120, 0, 0, 16.39, 8.58, 25.40, 0.580, 1, "ICAO", [[-15,853],[0,860],[10,867],[15,872],[25,886],[30,895],[35,906]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
[".338LM 250gr" , 872, 100, 0.0809096, -0.00060841, 7.37, 0, 2, 10, 120, 0, 0, 16.20, 8.58, 25.40, 0.645, 1, "ICAO", [[-15,853],[0,860],[10,867],[15,872],[25,886],[30,895],[35,906]] , [[0, 0.656], [1300, 0.64], [1460, 0.636], [1770, 0.625], [1920, 0.621], [2030, 0.619], [2190, 0.618]], true],
|
||||
[".338LM 300gr" , 792, 100, 0.0890193, -0.00055706, 7.37, 0, 2, 10, 120, 0, 0, 19.44, 8.58, 25.40, 0.759, 1, "ICAO", [[-15,773],[0,780],[10,787],[15,792],[25,806],[30,815],[35,826]] , [[0, 0.734], [1300, 0.726], [1500, 0.720], [1770, 0.708], [1880, 0.705], [2000, 0.702], [2110, 0.700]], true],
|
||||
[".338LM API526" , 872, 100, 0.0810834, -0.00069220, 7.37, 0, 2, 10, 120, 0, 0, 16.39, 8.58, 25.40, 0.580, 1, "ICAO", [[-15,853],[0,860],[10,867],[15,872],[25,886],[30,895],[35,906]] , [[0, 0.590], [1180, 0.576], [1320, 0.572], [1570, 0.563], [1690, 0.560], [1860, 0.557], [2050, 0.555]], true],
|
||||
|
||||
[".300WM Mk248 Mod0" , 857, 100, 0.0621425, -0.00070530, 3.81, 0, 2, 10, 120, 0, 0, 12.31, 7.80, 25.40, 0.537, 1, "ICAO", [[-15,838],[0,845],[10,852],[15,857],[25,871],[30,880],[35,891]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
[".300WM Mk248 Mod1" , 839, 100, 0.0637038, -0.00061188, 3.81, 0, 2, 10, 120, 0, 0, 14.26, 7.80, 25.40, 0.619, 1, "ICAO", [[-15,820],[0,827],[10,834],[15,839],[25,853],[30,862],[35,873]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
[".300WM Berger OTM" , 792, 100, 0.0686968, -0.00053733, 3.81, 0, 2, 10, 120, 0, 0, 14.90, 7.80, 25.40, 0.715, 1, "ICAO", [[-15,773],[0,780],[10,787],[15,792],[25,806],[30,815],[35,826]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
[".300WM Mk248 Mod0" , 857, 100, 0.0825862, -0.00072468, 7.37, 0, 2, 10, 120, 0, 0, 12.31, 7.80, 25.40, 0.537, 1, "ICAO", [[-15,838],[0,845],[10,852],[15,857],[25,871],[30,880],[35,891]] , [[0, 0.546], [1210, 0.529], [1470, 0.520], [1570, 0.518], [1730, 0.515], [1880, 0.513], [1970, 0.513]], true],
|
||||
[".300WM Mk248 Mod1" , 839, 100, 0.0841417, -0.00063027, 7.37, 0, 2, 10, 120, 0, 0, 14.26, 7.80, 25.40, 0.619, 1, "ICAO", [[-15,820],[0,827],[10,834],[15,839],[25,853],[30,862],[35,873]] , [[0, 0.623], [1150, 0.614], [1330, 0.609], [1620, 0.598], [1770, 0.595], [1970, 0.592], [2030, 0.591]], true],
|
||||
[".300WM Berger OTM" , 792, 100, 0.0891300, -0.00055262, 7.37, 0, 2, 10, 120, 0, 0, 14.90, 7.80, 25.40, 0.715, 1, "ICAO", [[-15,773],[0,780],[10,787],[15,792],[25,806],[30,815],[35,826]] , [[0, 0.721], [1400, 0.708], [1570, 0.703], [1860, 0.692], [1990, 0.689], [2140, 0.686], [2220, 0.685]], true],
|
||||
|
||||
["7.62x54mmR" , 812, 100, 0.0678441, -0.00100023, 3.81, 0, 2, 10, 120, 0, 0, 9.849, 7.92, 24.13, 0.400, 1, "ICAO", [[-15,793],[0,800],[10,807],[15,812],[25,826],[30,835],[35,846]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["7.62x54mmR" , 828, 100, 0.0853677, -0.00103739, 7.11, 0, 2, 10, 120, 0, 0, 9.849, 7.92, 24.13, 0.400, 1, "ICAO", [[-15,809],[0,816],[10,823],[15,828],[25,842],[30,851],[35,862]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
|
||||
["7.62x51mm M80" , 802, 100, 0.0690229, -0.00100957, 3.81, 0, 2, 10, 120, 0, 0, 9.461, 7.82, 25.40, 0.398, 1, "ICAO", [[-15,783],[0,790],[10,797],[15,802],[25,816],[30,825],[35,836]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["7.62x51mm M118LR" , 757, 100, 0.0739989, -0.00082828, 3.81, 0, 2, 10, 120, 0, 0, 11.34, 7.82, 25.40, 0.482, 1, "ICAO", [[-15,738],[0,745],[10,752],[15,757],[25,771],[30,780],[35,791]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["7.62x51mm Mk316" , 781, 100, 0.0709422, -0.00082029, 3.81, 0, 2, 10, 120, 0, 0, 11.34, 7.82, 25.40, 0.483, 1, "ICAO", [[-15,777],[0,778],[10,779],[15,781],[25,783],[30,785],[35,787]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["7.62x51mm Mk319" , 900, 100, 0.0593025, -0.00102338, 3.81, 0, 2, 10, 120, 0, 0, 8.424, 7.82, 25.40, 0.377, 1, "ICAO", [[-15,898],[0,899],[10,900],[15,900],[25,902],[30,903],[35,904]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["7.62x51mm M993" , 912, 100, 0.0585007, -0.00107148, 3.81, 0, 2, 10, 120, 0, 0, 8.230, 7.82, 25.40, 0.359, 1, "ICAO", [[-15,893],[0,900],[10,907],[15,912],[25,926],[30,935],[35,946]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["7.62x51mm Subsonic", 314, 100, 0.3168140, -0.00049899, 3.81, 0, 2, 10, 120, 0, 0, 12.96, 7.82, 25.40, 0.502, 1, "ICAO", [[-15,312],[0,313],[10,314],[15,314],[25,316],[30,317],[35,318]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["7.62x51mm M80" , 802, 100, 0.0909184, -0.00103711, 7.62, 0, 2, 10, 120, 0, 0, 9.461, 7.82, 25.40, 0.398, 1, "ICAO", [[-15,783],[0,790],[10,797],[15,802],[25,816],[30,825],[35,836]] , [[0, 0.399], [810, 0.392], [1030, 0.383], [1120, 0.381], [1270, 0.380], [1410, 0.379], [1530, 0.379]], true],
|
||||
["7.62x51mm M118LR" , 757, 100, 0.0958841, -0.00085157, 7.62, 0, 2, 10, 120, 0, 0, 11.34, 7.82, 25.40, 0.482, 1, "ICAO", [[-15,738],[0,745],[10,752],[15,757],[25,771],[30,780],[35,791]] , [[0, 0.483], [790, 0.479], [920, 0.475], [1130, 0.465], [1230, 0.462], [1420, 0.460], [1630, 0.459]], true],
|
||||
["7.62x51mm Mk316" , 781, 100, 0.0928267, -0.00084311, 7.62, 0, 2, 10, 120, 0, 0, 11.34, 7.82, 25.40, 0.483, 1, "ICAO", [[-15,777],[0,778],[10,779],[15,781],[25,783],[30,785],[35,787]] , [[0, 0.484], [830, 0.479], [950, 0.475], [1130, 0.467], [1260, 0.463], [1430, 0.461], [1660, 0.459]], true],
|
||||
["7.62x51mm Mk319" , 900, 100, 0.0811838, -0.00104515, 7.62, 0, 2, 10, 120, 0, 0, 8.424, 7.82, 25.40, 0.377, 1, "ICAO", [[-15,898],[0,899],[10,900],[15,900],[25,902],[30,903],[35,904]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["7.62x51mm M993" , 912, 100, 0.0803840, -0.00109390, 7.62, 0, 2, 10, 120, 0, 0, 8.230, 7.82, 25.40, 0.359, 1, "ICAO", [[-15,893],[0,900],[10,907],[15,912],[25,926],[30,935],[35,946]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["7.62x51mm Subsonic", 314, 100, 0.3344490, -0.00060194, 6.86, 0, 2, 10, 120, 0, 0, 12.96, 7.82, 25.40, 0.502, 1, "ICAO", [[-15,312],[0,313],[10,314],[15,314],[25,316],[30,317],[35,318]] , [[0, 0.303], [250, 0.409], [320, 0.427], [420, 0.445], [550, 0.460], [650, 0.467], [730, 0.470]], true],
|
||||
|
||||
["7.62x39mm" , 708, 100, 0.0846559, -0.00151621, 3.81, 0, 2, 10, 120, 0, 0, 7.970, 7.82, 25.40, 0.275, 1, "ICAO", [[-15,689],[0,696],[10,703],[15,708],[25,722],[30,731],[35,742]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["7.62x39mm" , 708, 100, 0.1066160, -0.00154815, 7.62, 0, 2, 10, 120, 0, 0, 7.970, 7.82, 25.40, 0.275, 1, "ICAO", [[-15,689],[0,696],[10,703],[15,708],[25,722],[30,731],[35,742]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
|
||||
["6.5x39mm" , 766, 100, 0.0725986, -0.00075308, 3.81, 0, 2, 10, 120, 0, 0, 7.970, 6.71, 22.86, 0.524, 1, "ICAO", [[-15,747],[0,754],[10,761],[15,766],[25,780],[30,789],[35,800]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["6.5x47mm Lapua" , 767, 100, 0.0722256, -0.00067037, 3.81, 0, 2, 10, 120, 0, 0, 9.007, 6.71, 22.86, 0.577, 1, "ICAO", [[-15,748],[0,755],[10,762],[15,767],[25,781],[30,790],[35,801]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["6.5mm Creedmor" , 822, 100, 0.0655022, -0.00060887, 3.81, 0, 2, 10, 120, 0, 0, 9.072, 6.71, 22.86, 0.632, 1, "ICAO", [[-15,803],[0,810],[10,817],[15,822],[25,836],[30,845],[35,856]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["6.5x39mm" , 766, 100, 0.0872025, -0.00077363, 6.35, 0, 2, 10, 120, 0, 0, 7.970, 6.71, 22.86, 0.524, 1, "ICAO", [[-15,747],[0,754],[10,761],[15,766],[25,780],[30,789],[35,800]] , [[0, 0.525], [910, 0.520], [1050, 0.515], [1270, 0.506], [1390, 0.503], [1570, 0.500], [1770, 0.498]], true],
|
||||
["6.5x47mm Lapua" , 767, 100, 0.0868248, -0.00069003, 6.35, 0, 2, 10, 120, 0, 0, 9.007, 6.71, 22.86, 0.577, 1, "ICAO", [[-15,748],[0,755],[10,762],[15,767],[25,781],[30,790],[35,801]] , [[0, 0.578], [970, 0.574], [1140, 0.569], [1430, 0.557], [1610, 0.553], [1750, 0.551], [1860, 0.550]], true],
|
||||
["6.5mm Creedmor" , 822, 100, 0.0800956, -0.00062437, 6.35, 0, 2, 10, 120, 0, 0, 9.072, 6.71, 22.86, 0.632, 1, "ICAO", [[-15,803],[0,810],[10,817],[15,822],[25,836],[30,845],[35,856]] , [[0, 0.635], [1150, 0.627], [1350, 0.621], [1630, 0.611], [1760, 0.607], [1860, 0.606], [2020, 0.604]], true],
|
||||
|
||||
["5.8x42mm DBP87" , 942, 100, 0.0566639, -0.00117956, 3.81, 0, 2, 10, 120, 0, 0, 4.150, 5.99, 24.40, 0.313, 1, "ICAO", [[-15,923],[0,930],[10,937],[15,942],[25,956],[30,965],[35,976]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["5.8x42mm DBP87" , 942, 100, 0.0916742, -0.00121087, 9.91, 0, 2, 10, 120, 0, 0, 4.150, 5.99, 24.40, 0.313, 1, "ICAO", [[-15,923],[0,930],[10,937],[15,942],[25,956],[30,965],[35,976]] , [[0, 0.323], [760, 0.309], [970, 0.303], [1030, 0.302], [1130, 0.301], [1210, 0.300], [1510, 0.299]], true],
|
||||
|
||||
["5.56x45mm M855" , 862, 100, 0.0635456, -0.00126466, 3.81, 0, 2, 10, 120, 0, 0, 4.018, 5.70, 17.78, 0.302, 1, "ASM" , [[-15,843],[0,849],[10,857],[15,862],[25,876],[30,885],[35,898]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["5.56x45mm Mk262" , 812, 100, 0.0682606, -0.00109563, 3.81, 0, 2, 10, 120, 0, 0, 4.990, 5.70, 17.78, 0.361, 1, "ASM" , [[-15,793],[0,800],[10,807],[15,812],[25,826],[30,835],[35,846]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["5.56x45mm Mk318" , 872, 100, 0.0624569, -0.00123318, 3.81, 0, 2, 10, 120, 0, 0, 4.018, 5.70, 17.78, 0.307, 1, "ASM" , [[-15,853],[0,860],[10,867],[15,872],[25,886],[30,895],[35,906]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["5.56x45mm M995" , 861, 100, 0.0635355, -0.00123272, 3.81, 0, 2, 10, 120, 0, 0, 4.536, 5.70, 17.78, 0.310, 1, "ASM" , [[-15,842],[0,849],[10,856],[15,861],[25,875],[30,884],[35,895]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["5.56x45mm M855" , 862, 100, 0.0825404, -0.00130094, 7.11, 0, 2, 10, 120, 0, 0, 4.018, 5.70, 17.78, 0.302, 1, "ASM" , [[-15,843],[0,849],[10,857],[15,862],[25,876],[30,885],[35,898]] , [[0, 0.306], [670, 0.298], [880, 0.291], [1000, 0.289], [1150, 0.288], [1340, 0.288], [1410, 0.288]], true],
|
||||
["5.56x45mm Mk262" , 812, 100, 0.0872422, -0.00111805, 7.11, 0, 2, 10, 120, 0, 0, 4.990, 5.70, 17.78, 0.361, 1, "ASM" , [[-15,793],[0,800],[10,807],[15,812],[25,826],[30,835],[35,846]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["5.56x45mm Mk318" , 872, 100, 0.0814490, -0.00125880, 7.11, 0, 2, 10, 120, 0, 0, 4.018, 5.70, 17.78, 0.307, 1, "ASM" , [[-15,853],[0,860],[10,867],[15,872],[25,886],[30,895],[35,906]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["5.56x45mm M995" , 861, 100, 0.0825279, -0.00126182, 7.11, 0, 2, 10, 120, 0, 0, 4.536, 5.70, 17.78, 0.310, 1, "ASM" , [[-15,842],[0,849],[10,856],[15,861],[25,875],[30,884],[35,895]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
|
||||
["5.45x39mm 7N6M" , 727, 100, 0.0801269, -0.00116278, 3.81, 0, 2, 10, 120, 0, 0, 3.428, 5.59, 16.00, 0.336, 1, "ICAO", [[-15,708],[0,715],[10,722],[15,727],[25,741],[30,750],[35,761]], [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true]];
|
||||
["5.45x39mm 7N6M" , 727, 100, 0.0802286, -0.00119458, 3.81, 0, 2, 10, 120, 0, 0, 3.428, 5.59, 16.00, 0.336, 1, "ICAO", [[-15,708],[0,715],[10,722],[15,727],[25,741],[30,750],[35,761]], [[0, 0.339], [730, 0.331], [960, 0.323], [1100, 0.321], [1220, 0.320], [1380, 0.320], [1480, 0.320]], true]];
|
||||
|
||||
[] call FUNC(clear_user_data);
|
||||
profileNamespace setVariable ["ACE_ATragMX_gunList", GVAR(gunList)];
|
||||
|
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Author: Ruthberg
|
||||
* Lookup the correct C1 ballistic coefficient in the c1 ballistic coefficient vs. distance interpolation table
|
||||
*
|
||||
* Arguments:
|
||||
* Target Range <NUMBER>
|
||||
*
|
||||
* Return Value:
|
||||
* C1 ballistic coefficient <NUMBER
|
||||
*
|
||||
* Example:
|
||||
* call ace_atragmx_fnc_lookup_c1_ballistic_coefficient
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_targetRange"];
|
||||
|
||||
private _lookupTable = [];
|
||||
{
|
||||
if ((_x select 1) > 0) then {
|
||||
_lookupTable pushBack _x;
|
||||
};
|
||||
} forEach (GVAR(workingMemory) select 19);
|
||||
|
||||
private _lookupTableSize = count _lookupTable;
|
||||
if (_lookupTableSize < 2) exitWith { (GVAR(workingMemory) select 15) };
|
||||
_lookupTable sort true;
|
||||
|
||||
private _lowerIndex = -1;
|
||||
private _upperIndex = -1;
|
||||
|
||||
for "_index" from 1 to (_lookupTableSize - 1) do {
|
||||
_upperIndex = _index;
|
||||
_lowerIndex = _upperIndex - 1;
|
||||
if (((_lookupTable select _index) select 0) >= _targetRange) exitWith { (GVAR(workingMemory) select 15) };
|
||||
};
|
||||
|
||||
private _lowerDistance = (_lookupTable select _lowerIndex) select 0;
|
||||
private _upperDistance = (_lookupTable select _upperIndex) select 0;
|
||||
private _lowerC1 = (_lookupTable select _lowerIndex) select 1;
|
||||
private _upperC1 = (_lookupTable select _upperIndex) select 1;
|
||||
private _c1 = _lowerC1;
|
||||
if (_lowerDistance != _upperDistance) then {
|
||||
private _slope = (_upperC1 - _lowerC1) / (_upperDistance - _lowerDistance);
|
||||
_c1 = _lowerC1 + (_targetRange - _lowerDistance) * _slope;
|
||||
};
|
||||
_c1 = 0.1 max _c1 min 2.0;
|
||||
|
||||
_c1
|
@ -77,11 +77,10 @@ if (GVAR(currentUnit) != 2) then {
|
||||
GVAR(barometricPressure) = 340 max GVAR(barometricPressure) min 1350;
|
||||
};
|
||||
|
||||
private ["_windSpeed1", "_windSpeed2", "_targetSpeed", "_targetRange", "_inclinationAngleCosine", "_inclinationAngleDegree"];
|
||||
_windSpeed1 = parseNumber(ctrlText 140020);
|
||||
_windSpeed2 = parseNumber(ctrlText 140021);
|
||||
_targetSpeed = parseNumber(ctrlText 140050);
|
||||
_targetRange = parseNumber(ctrlText 140060);
|
||||
private _windSpeed1 = parseNumber(ctrlText 140020);
|
||||
private _windSpeed2 = parseNumber(ctrlText 140021);
|
||||
private _targetSpeed = parseNumber(ctrlText 140050);
|
||||
private _targetRange = parseNumber(ctrlText 140060);
|
||||
if (GVAR(currentUnit) != 2) then {
|
||||
_windSpeed1 = 0 max _windSpeed1 min 50;
|
||||
_windSpeed2 = 0 max _windSpeed2 min 50;
|
||||
@ -100,6 +99,7 @@ if (GVAR(currentUnit) == 1) then {
|
||||
} else {
|
||||
_targetRange = 25 max _targetRange min 3700;
|
||||
};
|
||||
GVAR(targetRangeDirtyFlag) = GVAR(targetRangeDirtyFlag) || {_targetRange != GVAR(targetRange) select GVAR(currentTarget)};
|
||||
GVAR(latitude) set [GVAR(currentTarget), -90 max Round(parseNumber(ctrlText 140000)) min 90];
|
||||
GVAR(directionOfFire) set [GVAR(currentTarget), 0 max abs(Round(parseNumber(ctrlText 140010))) min 359];
|
||||
GVAR(windSpeed1) set [GVAR(currentTarget), _windSpeed1];
|
||||
@ -107,8 +107,8 @@ GVAR(windSpeed2) set [GVAR(currentTarget), _windSpeed2];
|
||||
GVAR(windDirection) set [GVAR(currentTarget), 1 max Round(parseNumber(ctrlText 140030)) min 12];
|
||||
GVAR(targetSpeed) set [GVAR(currentTarget), _targetSpeed];
|
||||
GVAR(targetRange) set [GVAR(currentTarget), _targetRange];
|
||||
_inclinationAngleCosine = 0.5 max parseNumber(ctrlText 140041) min 1;
|
||||
_inclinationAngleDegree = -60 max round(parseNumber(ctrlText 140040)) min 60;
|
||||
private _inclinationAngleCosine = 0.5 max parseNumber(ctrlText 140041) min 1;
|
||||
private _inclinationAngleDegree = -60 max round(parseNumber(ctrlText 140040)) min 60;
|
||||
if (_inclinationAngleDegree != GVAR(inclinationAngle) select GVAR(currentTarget)) then {
|
||||
GVAR(inclinationAngle) set [GVAR(currentTarget), _inclinationAngleDegree];
|
||||
} else {
|
||||
@ -122,19 +122,18 @@ if ((ctrlText 140051) == ">") then {
|
||||
GVAR(targetSpeedDirection) set [GVAR(currentTarget), -1];
|
||||
};
|
||||
|
||||
private ["_boreHeight", "_bulletMass", "_bulletDiameter", "_airFriction", "_rifleTwist", "_muzzleVelocity", "_zeroRange"];
|
||||
_boreHeight = parseNumber(ctrlText 120000);
|
||||
_bulletMass = parseNumber(ctrlText 120010);
|
||||
_bulletDiameter = parseNumber(ctrlText 120020);
|
||||
_airFriction = parseNumber(ctrlText 120030);
|
||||
private _boreHeight = parseNumber(ctrlText 120000);
|
||||
private _bulletMass = parseNumber(ctrlText 120010);
|
||||
private _bulletDiameter = parseNumber(ctrlText 120020);
|
||||
private _airFriction = parseNumber(ctrlText 120030);
|
||||
if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
|
||||
_airFriction = 0.1 max _airFriction min 2;
|
||||
} else {
|
||||
_airFriction = _airFriction / -1000;
|
||||
};
|
||||
_rifleTwist = parseNumber(ctrlText 120040);
|
||||
_muzzleVelocity = parseNumber(ctrlText 120050);
|
||||
_zeroRange = parseNumber(ctrlText 120060);
|
||||
private _rifleTwist = parseNumber(ctrlText 120040);
|
||||
private _muzzleVelocity = parseNumber(ctrlText 120050);
|
||||
private _zeroRange = parseNumber(ctrlText 120060);
|
||||
if (GVAR(currentUnit) != 2) then {
|
||||
_boreHeight = 0.1 max _boreHeight min 5;
|
||||
_bulletMass = 1 max _bulletMass min 1500;
|
||||
@ -175,6 +174,11 @@ if (_muzzleVelocity != GVAR(workingMemory) select 1) then {
|
||||
GVAR(workingMemory) set [1, _muzzleVelocity];
|
||||
GVAR(workingMemory) set [2, _zeroRange];
|
||||
|
||||
if (GVAR(targetRangeDirtyFlag) && missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
|
||||
[false, false] call FUNC(recalculate_c1_ballistic_coefficient);
|
||||
GVAR(targetRangeDirtyFlag) = false;
|
||||
};
|
||||
|
||||
[] call FUNC(update_gun);
|
||||
[] call FUNC(update_gun_ammo_data);
|
||||
[] call FUNC(update_atmosphere);
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Author: Ruthberg
|
||||
* Recalculates the c1 ballistic coefficient based on the c1 ballistic coefficient vs. distance interpolation input
|
||||
* Recalculates the c1 ballistic coefficient based on the current target range
|
||||
*
|
||||
* Arguments:
|
||||
* parse input <BOOL>
|
||||
@ -22,35 +22,7 @@ if (_parseInput) then {
|
||||
[] call FUNC(parse_input);
|
||||
};
|
||||
|
||||
private _lookupTable = [];
|
||||
{
|
||||
if ((_x select 1) > 0) then {
|
||||
_lookupTable pushBack _x;
|
||||
};
|
||||
} forEach (GVAR(workingMemory) select 19);
|
||||
|
||||
private _lookupTableSize = count _lookupTable;
|
||||
if (_lookupTableSize < 2) exitWith {};
|
||||
_lookupTable sort true;
|
||||
|
||||
private ["_lowerIndex", "_upperIndex"];
|
||||
for "_index" from 1 to (_lookupTableSize - 1) do {
|
||||
_upperIndex = _index;
|
||||
_lowerIndex = _upperIndex - 1;
|
||||
if (((_lookupTable select _index) select 0) >= (GVAR(targetRange) select GVAR(currentTarget))) exitWith {};
|
||||
};
|
||||
|
||||
private ["_lowerDistance", "_upperDistance", "_lowerC1", "_upperC1", "_c1"];
|
||||
_lowerDistance = (_lookupTable select _lowerIndex) select 0;
|
||||
_upperDistance = (_lookupTable select _upperIndex) select 0;
|
||||
_lowerC1 = (_lookupTable select _lowerIndex) select 1;
|
||||
_upperC1 = (_lookupTable select _upperIndex) select 1;
|
||||
_c1 = _lowerC1;
|
||||
if (_lowerDistance != _upperDistance) then {
|
||||
private _slope = (_upperC1 - _lowerC1) / (_upperDistance - _lowerDistance);
|
||||
_c1 = _lowerC1 + ((GVAR(targetRange) select GVAR(currentTarget)) - _lowerDistance) * _slope;
|
||||
};
|
||||
_c1 = 0.1 max _c1 min 2.0;
|
||||
private _c1 = [GVAR(targetRange) select GVAR(currentTarget)] call FUNC(lookup_c1_ballistic_coefficient);
|
||||
|
||||
if (_c1 != GVAR(workingMemory) select 15) then {
|
||||
GVAR(workingMemory) set [15, _c1];
|
||||
|
@ -33,19 +33,19 @@ private _lookupTableSize = count _lookupTable;
|
||||
if (_lookupTableSize < 2) exitWith {};
|
||||
_lookupTable sort true;
|
||||
|
||||
private ["_lowerIndex", "_upperIndex"];
|
||||
private _lowerIndex = -1;
|
||||
private _upperIndex = -1;
|
||||
for "_index" from 1 to (_lookupTableSize - 1) do {
|
||||
_upperIndex = _index;
|
||||
_lowerIndex = _upperIndex - 1;
|
||||
if (((_lookupTable select _index) select 0) >= GVAR(temperature)) exitWith {};
|
||||
};
|
||||
|
||||
private ["_lowerTemperature", "_upperTemperature", "_lowerMuzzleVelocity", "_upperMuzzleVelocity", "_muzzleVelocity"];
|
||||
_lowerTemperature = (_lookupTable select _lowerIndex) select 0;
|
||||
_upperTemperature = (_lookupTable select _upperIndex) select 0;
|
||||
_lowerMuzzleVelocity = (_lookupTable select _lowerIndex) select 1;
|
||||
_upperMuzzleVelocity = (_lookupTable select _upperIndex) select 1;
|
||||
_muzzleVelocity = _lowerMuzzleVelocity;
|
||||
private _lowerTemperature = (_lookupTable select _lowerIndex) select 0;
|
||||
private _upperTemperature = (_lookupTable select _upperIndex) select 0;
|
||||
private _lowerMuzzleVelocity = (_lookupTable select _lowerIndex) select 1;
|
||||
private _upperMuzzleVelocity = (_lookupTable select _upperIndex) select 1;
|
||||
private _muzzleVelocity = _lowerMuzzleVelocity;
|
||||
if (_lowerTemperature != _upperTemperature) then {
|
||||
private _slope = (_upperMuzzleVelocity - _lowerMuzzleVelocity) / (_upperTemperature - _lowerTemperature);
|
||||
_muzzleVelocity = _lowerMuzzleVelocity + (GVAR(temperature) - _lowerTemperature) * _slope;
|
||||
|
@ -19,7 +19,7 @@ GVAR(atmosphereModeTBH) = true;
|
||||
GVAR(altitude) = 0;
|
||||
GVAR(temperature) = 15;
|
||||
GVAR(barometricPressure) = 1013.25;
|
||||
GVAR(relativeHumidity) = 0.5;
|
||||
GVAR(relativeHumidity) = 0.0;
|
||||
|
||||
[] call FUNC(update_atmo_selection);
|
||||
[] call FUNC(update_atmosphere);
|
||||
|
@ -23,7 +23,7 @@ GVAR(atmosphereModeTBH) = profileNamespace getVariable ["ACE_ATragMX_atmosphereM
|
||||
GVAR(altitude) = -1000 max (profileNamespace getVariable ["ACE_ATragMX_altitude", 0]) min 20000;
|
||||
GVAR(temperature) = -50 max (profileNamespace getVariable ["ACE_ATragMX_temperature", 15]) min 160;
|
||||
GVAR(barometricPressure) = 340 max (profileNamespace getVariable ["ACE_ATragMX_barometricPressure", 1013.25]) min 1350;
|
||||
GVAR(relativeHumidity) = 0 max (profileNamespace getVariable ["ACE_ATragMX_relativeHumidity", 0.5]) min 1;
|
||||
GVAR(relativeHumidity) = 0 max (profileNamespace getVariable ["ACE_ATragMX_relativeHumidity", 0.0]) min 1;
|
||||
|
||||
GVAR(showWind2) = profileNamespace getVariable ["ACE_ATragMX_showWind2", false];
|
||||
GVAR(showCoriolis) = profileNamespace getVariable ["ACE_ATragMX_showCoriolis", true];
|
||||
|
@ -15,8 +15,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_index"];
|
||||
_index = 0 max (lbCurSel 6000);
|
||||
private _index = 0 max (lbCurSel 6000);
|
||||
|
||||
GVAR(gunList) set [_index, +GVAR(workingMemory)];
|
||||
|
||||
|
@ -21,6 +21,8 @@ if (!GVAR(initialised)) exitWith {};
|
||||
|
||||
params ["_slopeDistance", "_azimuth", "_inclination"];
|
||||
|
||||
GVAR(targetRangeDirtyFlag) = (round(_slopeDistance) != (GVAR(targetRange) select GVAR(currentTarget)));
|
||||
|
||||
GVAR(inclinationAngle) set [GVAR(currentTarget), round(_inclination)];
|
||||
GVAR(directionOfFire) set [GVAR(currentTarget), round(_azimuth)];
|
||||
GVAR(targetRange) set [GVAR(currentTarget), round(_slopeDistance)];
|
||||
|
@ -21,8 +21,7 @@ if (ctrlVisible 8000) then {
|
||||
|
||||
if (_this == 1) then {
|
||||
[] call FUNC(calculate_target_speed_assist);
|
||||
private ["_targetSpeed"];
|
||||
_targetSpeed = parseNumber(ctrlText 8007);
|
||||
private _targetSpeed = parseNumber(ctrlText 8007);
|
||||
if (_targetSpeed != 0) then {
|
||||
ctrlSetText [330, Str(_targetSpeed)];
|
||||
ctrlSetText [140050, Str(_targetSpeed)];
|
||||
|
@ -15,9 +15,8 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_inclinationAngleCosine", "_inclinationAngleDegree"];
|
||||
_inclinationAngleCosine = 0.5 max parseNumber(ctrlText 140041) min 1;
|
||||
_inclinationAngleDegree = -60 max parseNumber(ctrlText 140040) min 60;
|
||||
private _inclinationAngleCosine = 0.5 max parseNumber(ctrlText 140041) min 1;
|
||||
private _inclinationAngleDegree = -60 max parseNumber(ctrlText 140040) min 60;
|
||||
|
||||
if (_this == 0) then {
|
||||
ctrlSetText [140040, Str(round(acos(_inclinationAngleCosine)))];
|
||||
|
@ -15,8 +15,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_range", "_elevation", "_windage1", "_windage2", "_clickSize", "_clickNumber", "_clickInterval", "_lead", "_TOF", "_velocity", "_kineticEnergy", "_rangeOutput", "_elevationOutput", "_windageOutput", "_lastColumnOutput", "_speedOfSound"];
|
||||
_lastColumnOutput = "";
|
||||
private _lastColumnOutput = "";
|
||||
|
||||
if (GVAR(showWind2) && GVAR(rangeCardCurrentColumn) == 0) then {
|
||||
ctrlSetText [5006, "Wind2"];
|
||||
@ -32,23 +31,23 @@ if (GVAR(currentUnit) == 1) then {
|
||||
|
||||
lnbClear 5007;
|
||||
|
||||
_speedOfSound = GVAR(temperature) call EFUNC(weather,calculateSpeedOfSound);
|
||||
private _speedOfSound = GVAR(temperature) call EFUNC(weather,calculateSpeedOfSound);
|
||||
|
||||
{
|
||||
_range = _x select 0;
|
||||
_elevation = _x select 1;
|
||||
_windage1 = (_x select 2) select 0;
|
||||
_windage2 = (_x select 2) select 1;
|
||||
_lead = _x select 3;
|
||||
_TOF = _x select 4;
|
||||
_velocity = _x select 5;
|
||||
_kineticEnergy = _x select 6;
|
||||
private _range = _x select 0;
|
||||
private _elevation = _x select 1;
|
||||
private _windage1 = (_x select 2) select 0;
|
||||
private _windage2 = (_x select 2) select 1;
|
||||
private _lead = _x select 3;
|
||||
private _TOF = _x select 4;
|
||||
private _velocity = _x select 5;
|
||||
private _kineticEnergy = _x select 6;
|
||||
|
||||
switch (GVAR(currentScopeUnit)) do {
|
||||
case 0: {
|
||||
_elevation = _elevation / 3.38;
|
||||
_windage1 = _windage1 / 3.38;
|
||||
_windage2 = _windage2 / 3.38;
|
||||
_elevation = MOA_TO_MRAD(_elevation);
|
||||
_windage1 = MOA_TO_MRAD(_windage1);
|
||||
_windage2 = MOA_TO_MRAD(_windage2);
|
||||
};
|
||||
case 2: {
|
||||
_elevation = _elevation * 1.047;
|
||||
@ -56,13 +55,9 @@ _speedOfSound = GVAR(temperature) call EFUNC(weather,calculateSpeedOfSound);
|
||||
_windage2 = _windage2 * 1.047;
|
||||
};
|
||||
case 3: {
|
||||
switch (GVAR(workingMemory) select 7) do {
|
||||
case 0: { _clickSize = 1; };
|
||||
case 1: { _clickSize = 1 / 1.047; };
|
||||
case 2: { _clickSize = 3.38; };
|
||||
};
|
||||
_clickNumber = GVAR(workingMemory) select 8;
|
||||
_clickInterval = _clickSize / _clickNumber;
|
||||
private _clickSize = [1, 1 / 1.047, MRAD_TO_MOA(1)] select (GVAR(workingMemory) select 7);
|
||||
private _clickNumber = GVAR(workingMemory) select 8;
|
||||
private _clickInterval = _clickSize / _clickNumber;
|
||||
|
||||
_elevation = Round(_elevation / _clickInterval);
|
||||
_windage1 = Round(_windage1 / _clickInterval);
|
||||
@ -70,10 +65,10 @@ _speedOfSound = GVAR(temperature) call EFUNC(weather,calculateSpeedOfSound);
|
||||
};
|
||||
};
|
||||
|
||||
_elevationOutput = Str(Round(_elevation * 100) / 100);
|
||||
_windageOutput = Str(Round(_windage1 * 100) / 100);
|
||||
private _elevationOutput = Str(Round(_elevation * 100) / 100);
|
||||
private _windageOutput = Str(Round(_windage1 * 100) / 100);
|
||||
|
||||
_rangeOutput = Str(_range);
|
||||
private _rangeOutput = Str(_range);
|
||||
if (_velocity < _speedOfSound) then {
|
||||
_rangeOutput = _rangeOutput + "*";
|
||||
};
|
||||
|
@ -15,15 +15,14 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_elevationAbs", "_elevationRel", "_elevationCur", "_windageAbs", "_windageRel", "_windageCur", "_wind2", "_lead", "_clickSize", "_clickNumber", "_clickInterval"];
|
||||
_elevationAbs = GVAR(elevationOutput) select GVAR(currentTarget);
|
||||
_elevationRel = 0;
|
||||
_elevationCur = 0;
|
||||
_windageAbs = GVAR(windage1Output) select GVAR(currentTarget);
|
||||
_windageRel = 0;
|
||||
_windageCur = 0;
|
||||
private _elevationAbs = GVAR(elevationOutput) select GVAR(currentTarget);
|
||||
private _elevationRel = 0;
|
||||
private _elevationCur = 0;
|
||||
private _windageAbs = GVAR(windage1Output) select GVAR(currentTarget);
|
||||
private _windageRel = 0;
|
||||
private _windageCur = 0;
|
||||
|
||||
_wind2 = GVAR(windage2Output) select GVAR(currentTarget);
|
||||
private _wind2 = GVAR(windage2Output) select GVAR(currentTarget);
|
||||
|
||||
if (GVAR(showCoriolis)) then {
|
||||
_elevationRel = GVAR(verticalCoriolisOutput) select GVAR(currentTarget);
|
||||
@ -38,20 +37,20 @@ if (GVAR(showCoriolis)) then {
|
||||
_windageRel = _windageAbs - _windageCur;
|
||||
};
|
||||
|
||||
_lead = GVAR(leadOutput) select GVAR(currentTarget);
|
||||
private _lead = GVAR(leadOutput) select GVAR(currentTarget);
|
||||
|
||||
switch (GVAR(currentScopeUnit)) do {
|
||||
case 0: {
|
||||
_elevationAbs = _elevationAbs / 3.38;
|
||||
_windageAbs = _windageAbs / 3.38;
|
||||
_elevationAbs = MOA_TO_MRAD(_elevationAbs);
|
||||
_windageAbs = MOA_TO_MRAD(_windageAbs);
|
||||
|
||||
_wind2 = _wind2 / 3.38;
|
||||
_wind2 = MOA_TO_MRAD(_wind2);
|
||||
|
||||
_elevationRel = _elevationRel / 3.38;
|
||||
_windageRel = _windageRel / 3.38;
|
||||
_elevationRel = MOA_TO_MRAD(_elevationRel);
|
||||
_windageRel = MOA_TO_MRAD(_windageRel);
|
||||
|
||||
_elevationCur = _elevationCur / 3.38;
|
||||
_windageCur = _windageCur / 3.38;
|
||||
_elevationCur = MOA_TO_MRAD(_elevationCur);
|
||||
_windageCur = MOA_TO_MRAD(_windageCur);
|
||||
};
|
||||
case 2: {
|
||||
_elevationAbs = _elevationAbs * 1.047;
|
||||
@ -66,13 +65,9 @@ switch (GVAR(currentScopeUnit)) do {
|
||||
_windageCur = _windageCur * 1.047;
|
||||
};
|
||||
case 3: {
|
||||
switch (GVAR(workingMemory) select 7) do {
|
||||
case 0: { _clickSize = 1; };
|
||||
case 1: { _clickSize = 1 / 1.047; };
|
||||
case 2: { _clickSize = 3.38; };
|
||||
};
|
||||
_clickNumber = GVAR(workingMemory) select 8;
|
||||
_clickInterval = _clickSize / _clickNumber;
|
||||
private _clickSize = [1, 1 / 1.047, MRAD_TO_MOA(1)] select (GVAR(workingMemory) select 7);
|
||||
private _clickNumber = GVAR(workingMemory) select 8;
|
||||
private _clickInterval = _clickSize / _clickNumber;
|
||||
|
||||
_elevationAbs = Round(_elevationAbs / _clickInterval);
|
||||
_windageAbs = Round(_windageAbs / _clickInterval);
|
||||
|
@ -42,9 +42,9 @@ private _dropData = +GVAR(truingDropDropData);
|
||||
|
||||
switch (_dropUnit) do {
|
||||
case 0: {
|
||||
_dropData set [0, (_dropData select 0) / 3.38];
|
||||
_dropData set [1, (_dropData select 1) / 3.38];
|
||||
_dropData set [2, (_dropData select 2) / 3.38];
|
||||
_dropData set [0, MOA_TO_MRAD(_dropData select 0)];
|
||||
_dropData set [1, MOA_TO_MRAD(_dropData select 1)];
|
||||
_dropData set [2, MOA_TO_MRAD(_dropData select 2)];
|
||||
};
|
||||
case 2: {
|
||||
_dropData set [0, (_dropData select 0) * 1.047];
|
||||
|
@ -17,23 +17,19 @@
|
||||
|
||||
[] call FUNC(parse_input);
|
||||
|
||||
private ["_bulletMass", "_boreHeight", "_airFriction", "_muzzleVelocity", "_bc", "_dragModel", "_atmosphereModel"];
|
||||
_bulletMass = GVAR(workingMemory) select 12;
|
||||
_boreHeight = GVAR(workingMemory) select 5;
|
||||
_airFriction = GVAR(workingMemory) select 4;
|
||||
_muzzleVelocity = GVAR(workingMemory) select 1;
|
||||
_bc = GVAR(workingMemory) select 15;
|
||||
_dragModel = GVAR(workingMemory) select 16;
|
||||
_atmosphereModel = GVAR(workingMemory) select 17;
|
||||
private _bulletMass = GVAR(workingMemory) select 12;
|
||||
private _boreHeight = GVAR(workingMemory) select 5;
|
||||
private _airFriction = GVAR(workingMemory) select 4;
|
||||
private _muzzleVelocity = GVAR(workingMemory) select 1;
|
||||
private _bc = GVAR(workingMemory) select 15;
|
||||
private _dragModel = GVAR(workingMemory) select 16;
|
||||
private _atmosphereModel = GVAR(workingMemory) select 17;
|
||||
private _zeroRange = GVAR(workingMemory) select 2;
|
||||
private _altitude = GVAR(altitude);
|
||||
private _temperature = GVAR(temperature);
|
||||
private _barometricPressure = GVAR(barometricPressure);
|
||||
private _relativeHumidity = GVAR(relativeHumidity);
|
||||
|
||||
private ["_zeroRange"];
|
||||
_zeroRange = GVAR(workingMemory) select 2;
|
||||
|
||||
private ["_altitude", "_temperature", "_barometricPressure", "_relativeHumidity"];
|
||||
_altitude = GVAR(altitude);
|
||||
_temperature = GVAR(temperature);
|
||||
_barometricPressure = GVAR(barometricPressure);
|
||||
_relativeHumidity = GVAR(relativeHumidity);
|
||||
if (!GVAR(atmosphereModeTBH)) then {
|
||||
_barometricPressure = 1013.25 * (1 - (0.0065 * _altitude) / (273.15 + _temperature + 0.0065 * _altitude)) ^ 5.255754495;
|
||||
_relativeHumidity = 0.5;
|
||||
|
@ -15,11 +15,10 @@
|
||||
|
||||
|
||||
//Add deviceKey entry:
|
||||
private ["_conditonCode", "_toggleCode", "_closeCode"];
|
||||
_conditonCode = {
|
||||
private _conditonCode = {
|
||||
[] call FUNC(can_show);
|
||||
};
|
||||
_toggleCode = {
|
||||
private _toggleCode = {
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {};
|
||||
if (GVAR(active)) exitWith {
|
||||
@ -28,7 +27,7 @@ _toggleCode = {
|
||||
// Statement
|
||||
[] call FUNC(create_dialog);
|
||||
};
|
||||
_closeCode = {
|
||||
private _closeCode = {
|
||||
if (GVAR(active)) exitWith {
|
||||
closeDialog 0;
|
||||
};
|
||||
|
@ -16,4 +16,4 @@
|
||||
|
||||
#include "\z\ace\addons\main\script_macros.hpp"
|
||||
|
||||
#define ATRAGMX_PROFILE_NAMESPACE_VERSION 2.0
|
||||
#define ATRAGMX_PROFILE_NAMESPACE_VERSION 2.2
|
||||
|
@ -21,29 +21,27 @@ params ["_attachToVehicle","_unit","_args", ["_silentScripted", false]];
|
||||
_args params [["_itemClassname","", [""]]];
|
||||
TRACE_4("params",_attachToVehicle,_unit,_itemClassname,_silentScripted);
|
||||
|
||||
private ["_itemVehClass", "_onAtachText", "_selfAttachPosition", "_attachedItem", "_tempObject", "_actionID", "_model"];
|
||||
|
||||
//Sanity Check (_unit has item in inventory, not over attach limit)
|
||||
if ((_itemClassname == "") || {(!_silentScripted) && {!(_this call FUNC(canAttach))}}) exitWith {ERROR("Tried to attach, but check failed");};
|
||||
|
||||
_itemVehClass = getText (configFile >> "CfgWeapons" >> _itemClassname >> "ACE_Attachable");
|
||||
_onAtachText = getText (configFile >> "CfgWeapons" >> _itemClassname >> "displayName");
|
||||
private _itemVehClass = getText (configFile >> "CfgWeapons" >> _itemClassname >> "ACE_Attachable");
|
||||
private _onAttachText = getText (configFile >> "CfgWeapons" >> _itemClassname >> "displayName");
|
||||
|
||||
if (_itemVehClass == "") then {
|
||||
_itemVehClass = getText (configFile >> "CfgMagazines" >> _itemClassname >> "ACE_Attachable");
|
||||
_onAtachText = getText (configFile >> "CfgMagazines" >> _itemClassname >> "displayName");
|
||||
_onAttachText = getText (configFile >> "CfgMagazines" >> _itemClassname >> "displayName");
|
||||
};
|
||||
|
||||
if (_itemVehClass == "") exitWith {ERROR("no ACE_Attachable for Item");};
|
||||
|
||||
_onAtachText = format [localize LSTRING(Item_Attached), _onAtachText];
|
||||
private _onAttachText = format [localize LSTRING(Item_Attached), _onAttachText];
|
||||
|
||||
if (_unit == _attachToVehicle) then { //Self Attachment
|
||||
_attachedItem = _itemVehClass createVehicle [0,0,0];
|
||||
private _attachedItem = _itemVehClass createVehicle [0,0,0];
|
||||
_attachedItem attachTo [_unit, [0.05, -0.09, 0.1], "leftshoulder"];
|
||||
if (!_silentScripted) then {
|
||||
_unit removeItem _itemClassname; // Remove item
|
||||
[_onAtachText] call EFUNC(common,displayTextStructured);
|
||||
[_onAttachText] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
_unit setVariable [QGVAR(attached), [[_attachedItem, _itemClassname]], true];
|
||||
} else {
|
||||
@ -54,10 +52,10 @@ if (_unit == _attachToVehicle) then { //Self Attachment
|
||||
[{[localize LSTRING(PlaceAction), ""] call EFUNC(interaction,showMouseHint)}, []] call CBA_fnc_execNextFrame;
|
||||
_unit setVariable [QGVAR(placeActionEH), [_unit, "DefaultAction", {true}, {GVAR(placeAction) = PLACE_APPROVE;}] call EFUNC(common,AddActionEventHandler)];
|
||||
|
||||
_actionID = _unit addAction [format ["<t color='#FF0000'>%1</t>", localize LSTRING(CancelAction)], {GVAR(placeAction) = PLACE_CANCEL}];
|
||||
private _actionID = _unit addAction [format ["<t color='#FF0000'>%1</t>", localize LSTRING(CancelAction)], {GVAR(placeAction) = PLACE_CANCEL}];
|
||||
|
||||
//Display to show virtual object:
|
||||
_model = getText (configFile >> "CfgAmmo" >> _itemVehClass >> "model");
|
||||
private _model = getText (configFile >> "CfgAmmo" >> _itemVehClass >> "model");
|
||||
if (_model == "") then {
|
||||
_model = getText (configFile >> "CfgVehicles" >> _itemVehClass >> "model");
|
||||
};
|
||||
@ -67,16 +65,15 @@ if (_unit == _attachToVehicle) then { //Self Attachment
|
||||
((uiNamespace getVariable [QGVAR(virtualAmmoDisplay), displayNull]) displayCtrl 800851) ctrlSetModel _model;
|
||||
|
||||
[{
|
||||
private ["_angle", "_dir", "_screenPos", "_realDistance", "_up", "_virtualPos", "_virtualPosASL", "_lineInterection"];
|
||||
params ["_args","_idPFH"];
|
||||
_args params ["_unit","_attachToVehicle","_itemClassname","_itemVehClass","_onAtachText","_actionID"];
|
||||
_args params ["_unit","_attachToVehicle","_itemClassname","_itemVehClass","_onAttachText","_actionID"];
|
||||
|
||||
_virtualPosASL = (eyePos _unit) vectorAdd (positionCameraToWorld [0,0,0.6]) vectorDiff (positionCameraToWorld [0,0,0]);
|
||||
private _virtualPosASL = (eyePos _unit) vectorAdd (positionCameraToWorld [0,0,0.6]) vectorDiff (positionCameraToWorld [0,0,0]);
|
||||
if (cameraView == "EXTERNAL") then {
|
||||
_virtualPosASL = _virtualPosASL vectorAdd ((positionCameraToWorld [0.3,0,0]) vectorDiff (positionCameraToWorld [0,0,0]));
|
||||
};
|
||||
_virtualPos = _virtualPosASL call EFUNC(common,ASLToPosition);
|
||||
_lineInterection = lineIntersects [eyePos ACE_player, _virtualPosASL, ACE_player];
|
||||
private _virtualPos = _virtualPosASL call EFUNC(common,ASLToPosition);
|
||||
private _lineInterection = lineIntersects [eyePos ACE_player, _virtualPosASL, ACE_player];
|
||||
|
||||
//Don't allow placing in a bad position:
|
||||
if (_lineInterection && {GVAR(placeAction) == PLACE_APPROVE}) then {GVAR(placeAction) = PLACE_WAITING;};
|
||||
@ -95,7 +92,7 @@ if (_unit == _attachToVehicle) then { //Self Attachment
|
||||
(QGVAR(virtualAmmo) call BIS_fnc_rscLayer) cutText ["", "PLAIN"];
|
||||
|
||||
if (GVAR(placeAction) == PLACE_APPROVE) then {
|
||||
[_unit, _attachToVehicle, _itemClassname, _itemVehClass, _onAtachText, _virtualPos] call FUNC(placeApprove);
|
||||
[_unit, _attachToVehicle, _itemClassname, _itemVehClass, _onAttachText, _virtualPos] call FUNC(placeApprove);
|
||||
};
|
||||
} else {
|
||||
//Show the virtual object:
|
||||
@ -103,18 +100,18 @@ if (_unit == _attachToVehicle) then { //Self Attachment
|
||||
((uiNamespace getVariable [QGVAR(virtualAmmoDisplay), displayNull]) displayCtrl 800851) ctrlShow false;
|
||||
} else {
|
||||
((uiNamespace getVariable [QGVAR(virtualAmmoDisplay), displayNull]) displayCtrl 800851) ctrlShow true;
|
||||
_screenPos = worldToScreen _virtualPos;
|
||||
private _screenPos = worldToScreen _virtualPos;
|
||||
if (_screenPos isEqualTo []) exitWith {
|
||||
((uiNamespace getVariable [QGVAR(virtualAmmoDisplay), displayNull]) displayCtrl 800851) ctrlShow false;
|
||||
};
|
||||
_realDistance = (_virtualPos distance (positionCameraToWorld [0,0,0])) / ((call CBA_fnc_getFov) select 1);
|
||||
private _realDistance = (_virtualPos distance (positionCameraToWorld [0,0,0])) / ((call CBA_fnc_getFov) select 1);
|
||||
_screenPos = [(_screenPos select 0), _realDistance, (_screenPos select 1)];
|
||||
((uiNamespace getVariable [QGVAR(virtualAmmoDisplay), displayNull]) displayCtrl 800851) ctrlSetPosition _screenPos;
|
||||
_dir = (positionCameraToWorld [0,0,1]) vectorFromTo (positionCameraToWorld [0,0,0]);
|
||||
_angle = asin (_dir select 2);
|
||||
_up = [0, cos _angle, sin _angle];
|
||||
private _dir = (positionCameraToWorld [0,0,1]) vectorFromTo (positionCameraToWorld [0,0,0]);
|
||||
private _angle = asin (_dir select 2);
|
||||
private _up = [0, cos _angle, sin _angle];
|
||||
((uiNamespace getVariable [QGVAR(virtualAmmoDisplay), displayNull]) displayCtrl 800851) ctrlSetModelDirAndUp [[1,0,0], _up];
|
||||
};
|
||||
};
|
||||
}, 0, [_unit, _attachToVehicle, _itemClassname, _itemVehClass, _onAtachText, _actionID]] call CBA_fnc_addPerFrameHandler;
|
||||
}, 0, [_unit, _attachToVehicle, _itemClassname, _itemVehClass, _onAttachText, _actionID]] call CBA_fnc_addPerFrameHandler;
|
||||
};
|
||||
|
@ -21,10 +21,8 @@ params ["_attachToVehicle","_player","_args"];
|
||||
_args params [["_itemClassname","", [""]]];
|
||||
TRACE_3("params",_attachToVehicle,_player,_itemClassname);
|
||||
|
||||
private ["_attachLimit", "_attachedObjects"];
|
||||
|
||||
_attachLimit = [6, 1] select (_player == _attachToVehicle);
|
||||
_attachedObjects = _attachToVehicle getVariable [QGVAR(attached), []];
|
||||
private _attachLimit = [6, 1] select (_player == _attachToVehicle);
|
||||
private _attachedObjects = _attachToVehicle getVariable [QGVAR(attached), []];
|
||||
|
||||
((_player == _attachToVehicle) || {canStand _player}) &&
|
||||
{(_attachToVehicle distance _player) < 10} &&
|
||||
|
@ -24,9 +24,7 @@ if ((vehicle _unit) != _unit) exitWith {false};
|
||||
private _attachedList = _attachToVehicle getVariable [QGVAR(attached), []];
|
||||
if ((count _attachedList) == 0) exitWith {false};
|
||||
|
||||
private ["_inRange"];
|
||||
|
||||
_inRange = false;
|
||||
private _inRange = false;
|
||||
{
|
||||
_x params ["_xObject"];
|
||||
if (isNull _xObject) exitWith {
|
||||
|
@ -19,16 +19,14 @@
|
||||
params ["_attachToVehicle","_unit"],
|
||||
TRACE_2("params",_attachToVehicle,_unit);
|
||||
|
||||
private ["_attachedList", "_itemDisplayName", "_attachedObject", "_attachedIndex", "_itemName", "_minDistance", "_isChemlight"];
|
||||
private _attachedList = _attachToVehicle getVariable [QGVAR(attached), []];
|
||||
|
||||
_attachedList = _attachToVehicle getVariable [QGVAR(attached), []];
|
||||
|
||||
_attachedObject = objNull;
|
||||
_attachedIndex = -1;
|
||||
_itemName = "";
|
||||
private _attachedObject = objNull;
|
||||
private _attachedIndex = -1;
|
||||
private _itemName = "";
|
||||
|
||||
//Find closest attached object
|
||||
_minDistance = 1000;
|
||||
private _minDistance = 1000;
|
||||
|
||||
{
|
||||
_x params ["_xObject", "_xItemName"];
|
||||
@ -45,7 +43,7 @@ _minDistance = 1000;
|
||||
if (isNull _attachedObject || {_itemName == ""}) exitWith {ERROR("Could not find attached object")};
|
||||
|
||||
// Check if item is a chemlight
|
||||
_isChemlight = _attachedObject isKindOf "Chemlight_base";
|
||||
private _isChemlight = _attachedObject isKindOf "Chemlight_base";
|
||||
|
||||
// Exit if can't add the item
|
||||
if (!(_unit canAdd _itemName) && {!_isChemlight}) exitWith {
|
||||
@ -80,7 +78,7 @@ _attachedList deleteAt _attachedIndex;
|
||||
_attachToVehicle setVariable [QGVAR(attached), _attachedList, true];
|
||||
|
||||
// Display message
|
||||
_itemDisplayName = getText (configFile >> "CfgWeapons" >> _itemName >> "displayName");
|
||||
private _itemDisplayName = getText (configFile >> "CfgWeapons" >> _itemName >> "displayName");
|
||||
if (_itemDisplayName == "") then {
|
||||
_itemDisplayName = getText (configFile >> "CfgMagazines" >> _itemName >> "displayName");
|
||||
};
|
||||
|
@ -17,21 +17,20 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_listed", "_actions", "_item", "_displayName", "_picture", "_action"];
|
||||
params ["_target","_player"];
|
||||
TRACE_2("params",_target,_player);
|
||||
|
||||
_listed = [];
|
||||
_actions = [];
|
||||
private _listed = [];
|
||||
private _actions = [];
|
||||
|
||||
{
|
||||
if !(_x in _listed) then {
|
||||
_listed pushBack _x;
|
||||
_item = ConfigFile >> "CfgMagazines" >> _x;
|
||||
private _item = ConfigFile >> "CfgMagazines" >> _x;
|
||||
if (getText (_item >> "ACE_Attachable") != "") then {
|
||||
_displayName = getText(_item >> "displayName");
|
||||
_picture = getText(_item >> "picture");
|
||||
_action = [_x, _displayName, _picture, {[{_this call FUNC(attach)}, _this] call CBA_fnc_execNextFrame}, {true}, {}, [_x]] call EFUNC(interact_menu,createAction);
|
||||
private _displayName = getText(_item >> "displayName");
|
||||
private _picture = getText(_item >> "picture");
|
||||
private _action = [_x, _displayName, _picture, {[{_this call FUNC(attach)}, _this] call CBA_fnc_execNextFrame}, {true}, {}, [_x]] call EFUNC(interact_menu,createAction);
|
||||
_actions pushBack [_action, [], _target];
|
||||
};
|
||||
};
|
||||
@ -40,11 +39,11 @@ _actions = [];
|
||||
{
|
||||
if !(_x in _listed) then {
|
||||
_listed pushBack _x;
|
||||
_item = ConfigFile >> "CfgWeapons" >> _x;
|
||||
private _item = ConfigFile >> "CfgWeapons" >> _x;
|
||||
if (getText (_item >> "ACE_Attachable") != "") then {
|
||||
_displayName = getText(_item >> "displayName");
|
||||
_picture = getText(_item >> "picture");
|
||||
_action = [_x, _displayName, _picture, {[{_this call FUNC(attach)}, _this] call CBA_fnc_execNextFrame}, {true}, {}, [_x]] call EFUNC(interact_menu,createAction);
|
||||
private _displayName = getText(_item >> "displayName");
|
||||
private _picture = getText(_item >> "picture");
|
||||
private _action = [_x, _displayName, _picture, {[{_this call FUNC(attach)}, _this] call CBA_fnc_execNextFrame}, {true}, {}, [_x]] call EFUNC(interact_menu,createAction);
|
||||
_actions pushBack [_action, [], _target];
|
||||
};
|
||||
};
|
||||
|
@ -25,34 +25,32 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_startingOffset", "_startDistanceFromCenter", "_closeInUnitVector", "_closeInMax", "_closeInMin", "_closeInDistance", "_endPosTestOffset", "_endPosTest", "_doesIntersect", "_startingPosShifted", "_startASL", "_endPosShifted", "_endASL", "_attachedObject", "_attachList"];
|
||||
params ["_unit", "_attachToVehicle", "_itemClassname", "_itemVehClass", "_onAttachText", "_startingPosition"];
|
||||
TRACE_6("params",_unit,_attachToVehicle,_itemClassname,_itemVehClass,_onAttachText,_startingPosition);
|
||||
|
||||
params ["_unit", "_attachToVehicle", "_itemClassname", "_itemVehClass", "_onAtachText", "_startingPosition"];
|
||||
TRACE_6("params",_unit,_attachToVehicle,_itemClassname,_itemVehClass,_onAtachText,_startingPosition);
|
||||
private _startingOffset = _attachToVehicle worldToModel _startingPosition;
|
||||
|
||||
_startingOffset = _attachToVehicle worldToModel _startingPosition;
|
||||
private _startDistanceFromCenter = vectorMagnitude _startingOffset;
|
||||
private _closeInUnitVector = vectorNormalized (_startingOffset vectorFromTo [0,0,0]);
|
||||
|
||||
_startDistanceFromCenter = vectorMagnitude _startingOffset;
|
||||
_closeInUnitVector = vectorNormalized (_startingOffset vectorFromTo [0,0,0]);
|
||||
|
||||
_closeInMax = _startDistanceFromCenter;
|
||||
_closeInMin = 0;
|
||||
private _closeInMax = _startDistanceFromCenter;
|
||||
private _closeInMin = 0;
|
||||
|
||||
while {(_closeInMax - _closeInMin) > 0.01} do {
|
||||
_closeInDistance = (_closeInMax + _closeInMin) / 2;
|
||||
private _closeInDistance = (_closeInMax + _closeInMin) / 2;
|
||||
// systemChat format ["Trying %1 from %2 start %3", _closeInDistance, [_closeInMax, _closeInMin], _startDistanceFromCenter];
|
||||
_endPosTestOffset = _startingOffset vectorAdd (_closeInUnitVector vectorMultiply _closeInDistance);
|
||||
private _endPosTestOffset = _startingOffset vectorAdd (_closeInUnitVector vectorMultiply _closeInDistance);
|
||||
_endPosTestOffset set [2, (_startingOffset select 2)];
|
||||
_endPosTest = _attachToVehicle modelToWorldVisual _endPosTestOffset;
|
||||
private _endPosTest = _attachToVehicle modelToWorldVisual _endPosTestOffset;
|
||||
|
||||
_doesIntersect = false;
|
||||
private _doesIntersect = false;
|
||||
{
|
||||
if (_doesIntersect) exitWith {};
|
||||
_startingPosShifted = _startingPosition vectorAdd _x;
|
||||
_startASL = if (surfaceIsWater _startingPosShifted) then {_startingPosShifted} else {ATLtoASL _startingPosShifted};
|
||||
private _startingPosShifted = _startingPosition vectorAdd _x;
|
||||
private _startASL = if (surfaceIsWater _startingPosShifted) then {_startingPosShifted} else {ATLtoASL _startingPosShifted};
|
||||
{
|
||||
_endPosShifted = _endPosTest vectorAdd _x;
|
||||
_endASL = if (surfaceIsWater _startingPosShifted) then {_endPosShifted} else {ATLtoASL _endPosShifted};
|
||||
private _endPosShifted = _endPosTest vectorAdd _x;
|
||||
private _endASL = if (surfaceIsWater _startingPosShifted) then {_endPosShifted} else {ATLtoASL _endPosShifted};
|
||||
|
||||
#ifdef DRAW_ATTACH_SCAN
|
||||
[{
|
||||
@ -78,7 +76,7 @@ while {(_closeInMax - _closeInMin) > 0.01} do {
|
||||
};
|
||||
};
|
||||
|
||||
_closeInDistance = (_closeInMax + _closeInMin) / 2;
|
||||
private _closeInDistance = (_closeInMax + _closeInMin) / 2;
|
||||
|
||||
//Checks (too close to center or can't attach)
|
||||
if (((_startDistanceFromCenter - _closeInDistance) < 0.1) || {!([_attachToVehicle, _unit, _itemClassname] call FUNC(canAttach))}) exitWith {
|
||||
@ -90,17 +88,17 @@ if (((_startDistanceFromCenter - _closeInDistance) < 0.1) || {!([_attachToVehicl
|
||||
_closeInDistance = (_closeInDistance - 0.0085);
|
||||
|
||||
//Create New 'real' Object
|
||||
_endPosTestOffset = _startingOffset vectorAdd (_closeInUnitVector vectorMultiply _closeInDistance);
|
||||
private _endPosTestOffset = _startingOffset vectorAdd (_closeInUnitVector vectorMultiply _closeInDistance);
|
||||
_endPosTestOffset set [2, (_startingOffset select 2)];
|
||||
_attachedObject = _itemVehClass createVehicle (getPos _unit);
|
||||
private _attachedObject = _itemVehClass createVehicle (getPos _unit);
|
||||
_attachedObject attachTo [_attachToVehicle, _endPosTestOffset];
|
||||
|
||||
//Remove Item from inventory
|
||||
_unit removeItem _itemClassname;
|
||||
|
||||
//Add Object to attached array
|
||||
_attachList = _attachToVehicle getVariable [QGVAR(attached), []];
|
||||
private _attachList = _attachToVehicle getVariable [QGVAR(attached), []];
|
||||
_attachList pushBack [_attachedObject, _itemClassname];
|
||||
_attachToVehicle setVariable [QGVAR(attached), _attachList, true];
|
||||
|
||||
[_onAtachText] call EFUNC(common,displayTextStructured);
|
||||
[_onAttachText] call EFUNC(common,displayTextStructured);
|
||||
|
@ -7,7 +7,7 @@ class CfgAmmo {
|
||||
};
|
||||
|
||||
class B_556x45_Ball : BulletBase {
|
||||
airFriction=-0.00126466;
|
||||
airFriction=-0.00130094;
|
||||
tracerScale = 1;
|
||||
tracerStartTime=0.073; // M856 tracer burns out to 800m
|
||||
tracerEndTime=1.57123; // Time in seconds calculated with ballistics calculator
|
||||
@ -23,7 +23,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.00109563;
|
||||
airFriction=-0.00111805;
|
||||
ACE_caliber=5.69;
|
||||
ACE_bulletLength=23.012;
|
||||
ACE_bulletMass=4.9896;
|
||||
@ -36,7 +36,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={190.5, 368.3, 457.2, 508.0};
|
||||
};
|
||||
class ACE_556x45_Ball_Mk318 : B_556x45_Ball {
|
||||
airFriction=-0.00123318;
|
||||
airFriction=-0.0012588;
|
||||
ACE_caliber=5.69;
|
||||
ACE_bulletLength=23.012;
|
||||
ACE_bulletMass=4.0176;
|
||||
@ -49,7 +49,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={254.0, 393.7, 508.0};
|
||||
};
|
||||
class ACE_556x45_Ball_M995_AP : B_556x45_Ball {
|
||||
airFriction=-0.00123272;
|
||||
airFriction=-0.00126182;
|
||||
caliber=1.6;
|
||||
ACE_caliber=5.69;
|
||||
ACE_bulletLength=23.012;
|
||||
@ -67,7 +67,7 @@ class CfgAmmo {
|
||||
nvgOnly = 1;
|
||||
};
|
||||
class B_545x39_Ball_F : BulletBase {
|
||||
airFriction=-0.00116278;
|
||||
airFriction=-0.00119458;
|
||||
ACE_caliber=5.588;
|
||||
ACE_bulletLength=21.59;
|
||||
ACE_bulletMass=3.42792;
|
||||
@ -83,7 +83,7 @@ class CfgAmmo {
|
||||
tracerScale = 0.5;
|
||||
};
|
||||
class B_580x42_Ball_F: BulletBase {
|
||||
airFriction=-0.00117956;
|
||||
airFriction=-0.00121087;
|
||||
ACE_caliber=5.9944;
|
||||
ACE_bulletLength=24.2;
|
||||
ACE_bulletMass=4.15;
|
||||
@ -96,7 +96,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={369.0, 463.0, 600.0};
|
||||
};
|
||||
class B_65x39_Caseless : BulletBase {
|
||||
airFriction=-0.00075308;
|
||||
airFriction=-0.00077363;
|
||||
tracerScale = 1.1; //1.0;
|
||||
ACE_caliber=6.706;
|
||||
ACE_bulletLength=32.893;
|
||||
@ -118,7 +118,7 @@ class CfgAmmo {
|
||||
nvgOnly = 1;
|
||||
};
|
||||
class ACE_65x47_Ball_Scenar: B_65x39_Caseless {
|
||||
airFriction=-0.00067037;
|
||||
airFriction=-0.00069003;
|
||||
caliber=0.9;
|
||||
ACE_caliber=6.706;
|
||||
ACE_bulletLength=34.646;
|
||||
@ -132,7 +132,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.00060887;
|
||||
airFriction=-0.00062437;
|
||||
caliber=1.1;
|
||||
ACE_caliber=6.706;
|
||||
ACE_bulletLength=36.22;
|
||||
@ -150,7 +150,7 @@ class CfgAmmo {
|
||||
tracerScale = 1.1; //1.0;
|
||||
};
|
||||
class B_762x51_Ball : BulletBase {
|
||||
airFriction=-0.00100957;
|
||||
airFriction=-0.00103711;
|
||||
tracerScale = 1.2; //0.6;
|
||||
tracerStartTime=0.073; // Based on the British L5A1 which burns out to 1000m
|
||||
tracerEndTime=2.15957; // Time in seconds calculated with ballistics calculator
|
||||
@ -170,7 +170,7 @@ class CfgAmmo {
|
||||
nvgOnly = 1;
|
||||
};
|
||||
class ACE_762x51_Ball_M118LR : B_762x51_Ball {
|
||||
airFriction=-0.00082828;
|
||||
airFriction=-0.00085157;
|
||||
caliber=1.8;
|
||||
hit=16;
|
||||
typicalSpeed=790;
|
||||
@ -186,7 +186,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.00082029;
|
||||
airFriction=-0.00084311;
|
||||
caliber=1.8;
|
||||
hit=16;
|
||||
typicalSpeed=790;
|
||||
@ -202,7 +202,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.00102338;
|
||||
airFriction=-0.00104515;
|
||||
caliber=1.5;
|
||||
hit=14;
|
||||
typicalSpeed=900;
|
||||
@ -218,7 +218,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={330.2, 406.4, 508.0};
|
||||
};
|
||||
class ACE_762x51_Ball_M993_AP : B_762x51_Ball {
|
||||
airFriction=-0.00107148;
|
||||
airFriction=-0.0010939;
|
||||
caliber=2.2;
|
||||
hit=11;
|
||||
typicalSpeed=910;
|
||||
@ -234,7 +234,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={330.2, 406.4, 508.0};
|
||||
};
|
||||
class ACE_762x51_Ball_Subsonic : B_762x51_Ball {
|
||||
airFriction=-0.00049899;
|
||||
airFriction=-0.00060194;
|
||||
caliber=1;
|
||||
hit=6;
|
||||
typicalSpeed=320;
|
||||
@ -250,7 +250,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4};
|
||||
};
|
||||
class ACE_762x67_Ball_Mk248_Mod_0 : B_762x51_Ball {
|
||||
airFriction=-0.00070530;
|
||||
airFriction=-0.00072468;
|
||||
caliber=1.8;
|
||||
hit=17;
|
||||
typicalSpeed=900;
|
||||
@ -266,7 +266,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={508.0, 609.6, 660.4};
|
||||
};
|
||||
class ACE_762x67_Ball_Mk248_Mod_1 : B_762x51_Ball {
|
||||
airFriction=-0.00061188;
|
||||
airFriction=-0.00063027;
|
||||
caliber=1.9;
|
||||
hit=18;
|
||||
typicalSpeed=867;
|
||||
@ -282,7 +282,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={508.0, 609.6, 660.4};
|
||||
};
|
||||
class ACE_762x67_Ball_Berger_Hybrid_OTM : B_762x51_Ball {
|
||||
airFriction=-0.00053733;
|
||||
airFriction=-0.00055262;
|
||||
caliber=2.0;
|
||||
hit=19;
|
||||
typicalSpeed=853;
|
||||
@ -298,7 +298,8 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={508.0, 609.6, 660.4};
|
||||
};
|
||||
class B_762x54_Ball: B_762x51_Ball {
|
||||
airFriction=-0.00100023;
|
||||
airFriction=-0.00101071;
|
||||
typicalSpeed=835;
|
||||
ACE_caliber=7.925;
|
||||
ACE_bulletLength=28.956;
|
||||
ACE_bulletMass=9.8496;
|
||||
@ -307,12 +308,12 @@ class CfgAmmo {
|
||||
ACE_velocityBoundaries[]={};
|
||||
ACE_standardAtmosphere="ICAO";
|
||||
ACE_dragModel=1;
|
||||
ACE_muzzleVelocities[]={700, 800, 820, 833};
|
||||
ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4};
|
||||
ACE_muzzleVelocities[]={760, 795, 835, 865};
|
||||
ACE_barrelLengths[]={406.4, 508.0, 604.5, 736.6};
|
||||
};
|
||||
class B_762x54_Tracer_Green;
|
||||
class ACE_762x54_Ball_7T2 : B_762x54_Tracer_Green {
|
||||
airFriction=-0.00103989;
|
||||
airFriction=-0.00103739;
|
||||
typicalSpeed=800;
|
||||
tracerStartTime=0.073; // Based on the 7T2 which burns three seconds
|
||||
tracerEndTime=3;
|
||||
@ -324,11 +325,11 @@ class CfgAmmo {
|
||||
ACE_velocityBoundaries[]={};
|
||||
ACE_standardAtmosphere="ICAO";
|
||||
ACE_dragModel=1;
|
||||
ACE_muzzleVelocities[]={680, 750, 798, 800};
|
||||
ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4};
|
||||
ACE_muzzleVelocities[]={735, 770, 809, 838};
|
||||
ACE_barrelLengths[]={406.4, 508.0, 604.5, 736.6};
|
||||
};
|
||||
class B_762x39_Ball_F : BulletBase {
|
||||
airFriction=-0.00151621;
|
||||
airFriction=-0.00154815;
|
||||
ACE_caliber=7.823;
|
||||
ACE_bulletLength=28.956;
|
||||
ACE_bulletMass=7.9704;
|
||||
@ -341,7 +342,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={254.0, 414.02, 508.0};
|
||||
};
|
||||
class B_9x21_Ball : BulletBase {
|
||||
airFriction=-0.00208292;
|
||||
airFriction=-0.00211064;
|
||||
tracerScale = 0.5;
|
||||
ACE_caliber=9.042;
|
||||
ACE_bulletLength=15.494;
|
||||
@ -358,7 +359,7 @@ class CfgAmmo {
|
||||
tracerScale = 0.5;
|
||||
};
|
||||
class ACE_9x19_Ball : B_9x21_Ball {
|
||||
airFriction=-0.0019835;
|
||||
airFriction=-0.00201185;
|
||||
ACE_caliber=9.017;
|
||||
ACE_bulletLength=15.494;
|
||||
ACE_bulletMass=8.0352;
|
||||
@ -371,7 +372,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={101.6, 127.0, 228.6};
|
||||
};
|
||||
class B_93x64_Ball : BulletBase {
|
||||
airFriction=-0.00108571;
|
||||
airFriction=-0.00110727;
|
||||
ACE_caliber=9.296;
|
||||
ACE_bulletLength=34.29;
|
||||
ACE_bulletMass=14.904;
|
||||
@ -385,7 +386,7 @@ class CfgAmmo {
|
||||
};
|
||||
class B_408_Ball : BulletBase {
|
||||
timeToLive=10;
|
||||
airFriction=-0.00044958;
|
||||
airFriction=-0.00046249;
|
||||
tracerScale = 1.3;
|
||||
ACE_caliber=10.363;
|
||||
ACE_bulletLength=55.1942;
|
||||
@ -401,7 +402,7 @@ class CfgAmmo {
|
||||
};
|
||||
class ACE_408_Ball : BulletBase {
|
||||
timeToLive=10;
|
||||
airFriction=-0.00063655;
|
||||
airFriction=-0.00065414;
|
||||
typicalSpeed=1067;
|
||||
tracerScale = 1.3;
|
||||
ACE_caliber=10.363;
|
||||
@ -418,7 +419,7 @@ class CfgAmmo {
|
||||
};
|
||||
class B_338_Ball : BulletBase {
|
||||
timeToLive=10;
|
||||
airFriction=-0.00059133;
|
||||
airFriction=-0.00060841;
|
||||
ACE_caliber=8.585;
|
||||
ACE_bulletLength=39.573;
|
||||
ACE_bulletMass=16.2;
|
||||
@ -431,7 +432,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={508.0, 660.4, 711.2};
|
||||
};
|
||||
class B_338_NM_Ball : BulletBase {
|
||||
airFriction=-0.00052201;
|
||||
airFriction=-0.00053639;
|
||||
ACE_caliber=8.585;
|
||||
ACE_bulletLength=43.18;
|
||||
ACE_bulletMass=19.44;
|
||||
@ -445,7 +446,7 @@ class CfgAmmo {
|
||||
};
|
||||
class ACE_338_Ball : B_338_Ball {
|
||||
timeToLive=10;
|
||||
airFriction=-0.00052190;
|
||||
airFriction=-0.00055706;
|
||||
typicalSpeed=826;
|
||||
ACE_caliber=8.585;
|
||||
ACE_bulletLength=43.18;
|
||||
@ -460,7 +461,7 @@ class CfgAmmo {
|
||||
};
|
||||
class ACE_338_Ball_API526 : B_338_Ball {
|
||||
timeToLive=10;
|
||||
airFriction=-0.00069611;
|
||||
airFriction=-0.0006922;
|
||||
caliber=2.8;
|
||||
typicalSpeed=895;
|
||||
ACE_caliber=8.585;
|
||||
@ -478,7 +479,7 @@ class CfgAmmo {
|
||||
tracerScale = 1.3; //1.2;
|
||||
};
|
||||
class B_127x54_Ball : BulletBase {
|
||||
airFriction=-0.00019268;
|
||||
airFriction=-0.00019568;
|
||||
tracerScale = 1.3;//
|
||||
ACE_caliber=12.954;
|
||||
ACE_bulletLength=64.516;
|
||||
@ -493,7 +494,7 @@ class CfgAmmo {
|
||||
};
|
||||
class B_127x99_Ball : BulletBase {
|
||||
timeToLive=10;
|
||||
airFriction=-0.00057503;
|
||||
airFriction=-0.00058679;
|
||||
tracerScale = 1.3; //1.2;
|
||||
ACE_caliber=12.954;
|
||||
ACE_bulletLength=58.674;
|
||||
@ -508,7 +509,7 @@ class CfgAmmo {
|
||||
};
|
||||
class ACE_127x99_API : B_127x99_Ball {
|
||||
timeToLive=10;
|
||||
airFriction=-0.00057503;
|
||||
airFriction=-0.00058679;
|
||||
tracerScale = 1.3;//
|
||||
hit=25;
|
||||
caliber=4.0;
|
||||
@ -525,7 +526,7 @@ class CfgAmmo {
|
||||
};
|
||||
class ACE_127x99_Ball_AMAX : B_127x99_Ball {
|
||||
timeToLive=10;
|
||||
airFriction=-0.00036645;
|
||||
airFriction=-0.00037397;
|
||||
caliber=3.0;
|
||||
ACE_caliber=12.954;
|
||||
ACE_bulletLength=64.516;
|
||||
@ -540,7 +541,7 @@ class CfgAmmo {
|
||||
};
|
||||
class B_127x108_Ball : BulletBase {
|
||||
timeToLive=10;
|
||||
airFriction=-0.00063800;
|
||||
airFriction=-0.00065098;
|
||||
tracerScale = 1.3; //1.5;
|
||||
ACE_caliber=12.979;
|
||||
ACE_bulletLength=64.008;
|
||||
@ -553,8 +554,12 @@ class CfgAmmo {
|
||||
ACE_muzzleVelocities[]={820};
|
||||
ACE_barrelLengths[]={728.98};
|
||||
};
|
||||
class B_127x108_APDS: B_127x108_Ball {
|
||||
typicalSpeed = 820;
|
||||
airFriction = -0.00065098;
|
||||
};
|
||||
class B_45ACP_Ball : BulletBase {
|
||||
airFriction=-0.00081221;
|
||||
airFriction=-0.00082143;
|
||||
tracerScale = 0.6;
|
||||
ACE_caliber=11.481;
|
||||
ACE_bulletLength=17.272;
|
||||
@ -568,7 +573,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={101.6, 127.0, 228.6};
|
||||
};
|
||||
class B_50BW_Ball_F : BulletBase {
|
||||
airFriction=-0.00202645;
|
||||
airFriction=-0.00205896;
|
||||
ACE_caliber=12.7;
|
||||
ACE_bulletLength=24.13;
|
||||
ACE_bulletMass=21.7076;
|
||||
|
@ -300,6 +300,9 @@ class CfgMagazines {
|
||||
};
|
||||
|
||||
class 5Rnd_127x108_Mag;
|
||||
class 5Rnd_127x108_APDS_Mag: 5Rnd_127x108_Mag {
|
||||
initSpeed = 820;
|
||||
};
|
||||
class ACE_5Rnd_127x99_Mag: 5Rnd_127x108_Mag {
|
||||
author = ECSTRING(common,ACETeam);
|
||||
ammo = "B_127x99_Ball";
|
||||
@ -378,7 +381,7 @@ class CfgMagazines {
|
||||
};
|
||||
|
||||
class 10Rnd_762x54_Mag: 10Rnd_762x51_Mag {
|
||||
initSpeed = 800;
|
||||
initSpeed = 836;
|
||||
};
|
||||
class ACE_10Rnd_762x54_Tracer_mag: 10Rnd_762x54_Mag {
|
||||
author = ECSTRING(common,ACETeam);
|
||||
@ -386,12 +389,12 @@ class CfgMagazines {
|
||||
displayName = CSTRING(10Rnd_762x54_Tracer_mag_Name);
|
||||
displayNameShort = CSTRING(10Rnd_762x54_Tracer_mag_NameShort);
|
||||
descriptionShort = CSTRING(10Rnd_762x54_Tracer_mag_Description);
|
||||
initSpeed = 800;
|
||||
initSpeed = 809;
|
||||
tracersEvery = 1;
|
||||
};
|
||||
|
||||
class 150Rnd_762x54_Box: 150Rnd_762x51_Box {
|
||||
initSpeed = 750;
|
||||
initSpeed = 836;
|
||||
};
|
||||
|
||||
class 150Rnd_93x64_Mag: CA_Magazine {
|
||||
|
@ -11,22 +11,22 @@ class CfgWeapons {
|
||||
class Rifle_Base_F;
|
||||
class Rifle_Short_Base_F: Rifle_Base_F {};
|
||||
class Rifle_Long_Base_F: Rifle_Base_F {};
|
||||
class MuzzleSlot;
|
||||
|
||||
/* Long Rifles */
|
||||
|
||||
// GM6 Lynx
|
||||
class GM6_base_F: Rifle_Long_Base_F {
|
||||
class Single: Mode_SemiAuto {
|
||||
dispersion = 0.00029; // radians. Equal to 1.00 MOA.
|
||||
dispersion = MOA_TO_RAD(1.0);
|
||||
};
|
||||
};
|
||||
|
||||
// M200 Intervention
|
||||
class LRR_base_F: Rifle_Long_Base_F {
|
||||
class Single: Mode_SemiAuto {
|
||||
dispersion = 0.00020; // radians. Equal to 0.70 MOA.
|
||||
dispersion = MOA_TO_RAD(0.7);
|
||||
};
|
||||
};
|
||||
|
||||
// QBU-88
|
||||
class DMR_07_base_F: Rifle_Long_Base_F {
|
||||
initSpeed = -1.06051;
|
||||
ACE_barrelTwist = 228.6;
|
||||
@ -38,70 +38,78 @@ class CfgWeapons {
|
||||
};
|
||||
};
|
||||
|
||||
// M14
|
||||
class DMR_06_base_F: Rifle_Long_Base_F {
|
||||
class Single: Mode_SemiAuto {
|
||||
dispersion = 0.00029; // radians. Equal to 1.00 MOA.
|
||||
dispersion = MOA_TO_RAD(1.0);
|
||||
};
|
||||
|
||||
class FullAuto: Mode_FullAuto {
|
||||
dispersion = 0.00029; // radians. Equal to 1.00 MOA.
|
||||
dispersion = MOA_TO_RAD(1.0);
|
||||
};
|
||||
};
|
||||
|
||||
// Cyrus
|
||||
class DMR_05_base_F: Rifle_Long_Base_F {
|
||||
class Single: Mode_SemiAuto {
|
||||
dispersion = 0.00029; // radians. Equal to 1.00 MOA.
|
||||
dispersion = MOA_TO_RAD(1.0);
|
||||
};
|
||||
|
||||
class FullAuto: Mode_FullAuto {
|
||||
dispersion = 0.00029; // radians. Equal to 1.00 MOA.
|
||||
dispersion = MOA_TO_RAD(1.0);
|
||||
};
|
||||
};
|
||||
|
||||
// ASP-1 Kir
|
||||
class DMR_04_base_F: Rifle_Long_Base_F {
|
||||
class Single: Mode_SemiAuto {
|
||||
dispersion = 0.00029; // radians. Equal to 1.00 MOA.
|
||||
dispersion = MOA_TO_RAD(1.0);
|
||||
};
|
||||
};
|
||||
|
||||
// SIG 556
|
||||
class DMR_03_base_F: Rifle_Long_Base_F {
|
||||
class Single: Mode_SemiAuto {
|
||||
dispersion = 0.00032; // radians. Equal to 1.10 MOA.
|
||||
dispersion = MOA_TO_RAD(1.1);
|
||||
};
|
||||
|
||||
class FullAuto: Mode_FullAuto {
|
||||
dispersion = 0.00032; // radians. Equal to 1.10 MOA.
|
||||
dispersion = MOA_TO_RAD(1.1);
|
||||
};
|
||||
};
|
||||
|
||||
// Noreen "Bad News" ULR
|
||||
class DMR_02_base_F: Rifle_Long_Base_F {
|
||||
class Single: Mode_SemiAuto {
|
||||
dispersion = 0.000262; // radians. Equal to 0.90 MOA.
|
||||
dispersion = MOA_TO_RAD(0.9);
|
||||
};
|
||||
};
|
||||
|
||||
// VS-121
|
||||
class DMR_01_base_F: Rifle_Long_Base_F {
|
||||
class Single: Mode_SemiAuto {
|
||||
dispersion = 0.0004; // radians. Equal to 1.375 MOA.
|
||||
dispersion = MOA_TO_RAD(1.375);
|
||||
};
|
||||
};
|
||||
|
||||
// Mk14 Mod 1 EBR
|
||||
class EBR_base_F: Rifle_Long_Base_F {
|
||||
class Single: Mode_SemiAuto {
|
||||
dispersion = 0.00029; // radians. Equal to 1.00 MOA.
|
||||
dispersion = MOA_TO_RAD(1.0);
|
||||
};
|
||||
|
||||
class FullAuto: Mode_FullAuto {
|
||||
dispersion = 0.00029; // radians. Equal to 1.00 MOA.
|
||||
dispersion = MOA_TO_RAD(1.0);
|
||||
};
|
||||
};
|
||||
|
||||
/* MX */
|
||||
|
||||
// MX
|
||||
class arifle_MX_Base_F: Rifle_Base_F {
|
||||
class Single: Mode_SemiAuto {};
|
||||
class FullAuto: Mode_FullAuto {};
|
||||
};
|
||||
|
||||
// MX LSW
|
||||
class arifle_MX_SW_F: arifle_MX_Base_F {
|
||||
magazines[] = {
|
||||
"100Rnd_65x39_caseless_mag_Tracer",
|
||||
@ -115,6 +123,8 @@ class CfgWeapons {
|
||||
ACE_barrelTwist = 228.6;
|
||||
ACE_barrelLength = 406.4;
|
||||
};
|
||||
|
||||
// MXM
|
||||
class arifle_MXM_F: arifle_MX_Base_F {
|
||||
magazines[] = {
|
||||
"30Rnd_65x39_caseless_mag",
|
||||
@ -127,19 +137,15 @@ class CfgWeapons {
|
||||
ACE_barrelTwist = 228.6;
|
||||
ACE_barrelLength = 457.2;
|
||||
class Single: Single {
|
||||
dispersion = 0.000436; // radians. Equal to 1.50 MOA.
|
||||
dispersion = MOA_TO_RAD(1.5);
|
||||
};
|
||||
|
||||
class FullAuto: FullAuto {
|
||||
dispersion = 0.000436; // radians. Equal to 1.50 MOA.
|
||||
dispersion = MOA_TO_RAD(1.5);
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
/* Katiba */
|
||||
class arifle_katiba_Base_F: Rifle_Base_F {};
|
||||
|
||||
/* SPAR */
|
||||
|
||||
// HK416A5 11"
|
||||
class arifle_SPAR_01_base_F: Rifle_Base_F {
|
||||
magazines[] = {
|
||||
"30Rnd_556x45_Stanag",
|
||||
@ -157,11 +163,15 @@ class CfgWeapons {
|
||||
ACE_barrelTwist = 177.8;
|
||||
ACE_barrelLength = 264.0;
|
||||
};
|
||||
|
||||
// HK416A5 14.5"
|
||||
class arifle_SPAR_02_base_F: Rifle_Base_F {
|
||||
initSpeed = -0.934282;
|
||||
ACE_barrelTwist = 177.8;
|
||||
ACE_barrelLength = 368.0;
|
||||
};
|
||||
|
||||
// HK417A2 20"
|
||||
class arifle_SPAR_03_base_F: Rifle_Base_F {
|
||||
magazines[] = {
|
||||
"20Rnd_762x51_Mag",
|
||||
@ -178,7 +188,7 @@ class CfgWeapons {
|
||||
ACE_barrelLength = 508.0;
|
||||
};
|
||||
|
||||
/* Other */
|
||||
// Stoner 99 LMG
|
||||
class LMG_Mk200_F: Rifle_Long_Base_F {
|
||||
magazines[] = {
|
||||
"200Rnd_65x39_cased_Box",
|
||||
@ -189,113 +199,134 @@ class CfgWeapons {
|
||||
ACE_barrelTwist = 177.8;
|
||||
ACE_barrelLength = 317.5;
|
||||
};
|
||||
|
||||
// Negev NG7
|
||||
class LMG_Zafir_F: Rifle_Long_Base_F {
|
||||
initSpeed = -1.00333;
|
||||
initSpeed = -0.931071;
|
||||
ACE_barrelTwist = 304.8;
|
||||
ACE_barrelLength = 459.74;
|
||||
};
|
||||
|
||||
// M249 SPW
|
||||
class LMG_03_base_F: Rifle_Long_Base_F {
|
||||
initSpeed = -1.02002;
|
||||
ACE_barrelTwist = 177.8;
|
||||
ACE_barrelLength = 414.02;
|
||||
};
|
||||
class Tavor_base_F: Rifle_Base_F {};
|
||||
class mk20_base_F: Rifle_Base_F {};
|
||||
|
||||
/* SMGs */
|
||||
// RFB SDAR
|
||||
class SDAR_base_F: Rifle_Base_F {
|
||||
initSpeed = -1.211;
|
||||
class Single: Mode_SemiAuto {
|
||||
dispersion = 0.0008727; // radians. Equal to 3 MOA.
|
||||
dispersion = MOA_TO_RAD(3.0);
|
||||
};
|
||||
|
||||
class Burst: Mode_Burst {
|
||||
dispersion = 0.0008727; // radians. Equal to 3 MOA.
|
||||
dispersion = MOA_TO_RAD(3.0);
|
||||
};
|
||||
|
||||
class FullAuto: Mode_FullAuto {
|
||||
dispersion = 0.0008727; // radians. Equal to 3 MOA.
|
||||
dispersion = MOA_TO_RAD(3.0);
|
||||
};
|
||||
};
|
||||
|
||||
/* Pistols */
|
||||
|
||||
class Pistol;
|
||||
class Pistol_Base_F: Pistol {};
|
||||
|
||||
// P99
|
||||
class hgun_P07_F: Pistol_Base_F {
|
||||
initSpeed = -1.0;
|
||||
ACE_barrelTwist = 254.0;
|
||||
ACE_barrelLength = 101.6;
|
||||
};
|
||||
|
||||
// MP-443 Grach
|
||||
class hgun_Rook40_F: Pistol_Base_F {
|
||||
initSpeed = -1.03077;
|
||||
ACE_barrelTwist = 254.0;
|
||||
ACE_barrelLength = 111.76;
|
||||
};
|
||||
|
||||
// Custom Covert II
|
||||
class hgun_ACPC2_F: Pistol_Base_F {
|
||||
initSpeed = -1.0;
|
||||
ACE_barrelTwist = 406.4;
|
||||
ACE_barrelLength = 127.0;
|
||||
};
|
||||
|
||||
// FNX-45 Tactical
|
||||
class hgun_Pistol_heavy_01_F: Pistol_Base_F {
|
||||
initSpeed = -0.96;
|
||||
ACE_barrelTwist = 406.4;
|
||||
ACE_barrelLength = 114.3;
|
||||
};
|
||||
|
||||
// Chiappa Rhino 60DS
|
||||
class hgun_Pistol_heavy_02_F: Pistol_Base_F {
|
||||
initSpeed = -0.92;
|
||||
ACE_barrelTwist = 406.4;
|
||||
ACE_barrelLength = 76.2;
|
||||
};
|
||||
|
||||
// Makarov PM
|
||||
class hgun_Pistol_01_F: Pistol_Base_F {
|
||||
initSpeed = -0.974359;
|
||||
ACE_barrelTwist = 254.0;
|
||||
ACE_barrelLength = 93.5;
|
||||
};
|
||||
|
||||
// CPW
|
||||
class pdw2000_base_F: Rifle_Short_Base_F {
|
||||
initSpeed = -1.09615;
|
||||
ACE_barrelTwist = 228.6;
|
||||
ACE_barrelLength = 177.8;
|
||||
};
|
||||
|
||||
/* Rifles */
|
||||
// AKS
|
||||
class arifle_AKS_base_F: Rifle_Base_F {
|
||||
initSpeed = -1.0;
|
||||
ACE_barrelTwist = 160.02;
|
||||
ACE_barrelLength = 206.5;
|
||||
};
|
||||
|
||||
// AKM
|
||||
class arifle_AKM_base_F: Rifle_Base_F {
|
||||
initSpeed = -1.0014;
|
||||
ACE_barrelTwist = 199.898;
|
||||
ACE_barrelLength = 414.02;
|
||||
};
|
||||
|
||||
// AK12
|
||||
class arifle_AK12_base_F: Rifle_Base_F {
|
||||
initSpeed = -1.0014;
|
||||
ACE_barrelTwist = 199.898;
|
||||
ACE_barrelLength = 414.02;
|
||||
};
|
||||
|
||||
// QBZ-95-1
|
||||
class arifle_CTAR_base_F: Rifle_Base_F {
|
||||
initSpeed = -1.0;
|
||||
ACE_barrelTwist = 244.0;
|
||||
ACE_barrelLength = 463.0;
|
||||
};
|
||||
|
||||
// QBZ-95-1 LSW
|
||||
class arifle_CTARS_base_F: Rifle_Base_F {
|
||||
initSpeed = -1.04301;
|
||||
ACE_barrelTwist = 244.0;
|
||||
ACE_barrelLength = 600.0;
|
||||
};
|
||||
|
||||
// Type 115
|
||||
class arifle_ARX_base_F: Rifle_Base_F {
|
||||
initSpeed = -1.02052;
|
||||
ACE_barrelTwist = 228.6;
|
||||
ACE_barrelLength = 463.0;
|
||||
};
|
||||
|
||||
class arifle_katiba_Base_F: Rifle_Base_F {};
|
||||
|
||||
// KH2002 Sama
|
||||
class arifle_Katiba_F: arifle_katiba_Base_F {
|
||||
magazines[] = {
|
||||
"30Rnd_65x39_caseless_green",
|
||||
@ -306,6 +337,8 @@ class CfgWeapons {
|
||||
ACE_barrelTwist = 203.2;
|
||||
ACE_barrelLength = 508.0;
|
||||
};
|
||||
|
||||
// KH2002C Sama
|
||||
class arifle_Katiba_C_F: arifle_katiba_Base_F {
|
||||
magazines[] = {
|
||||
"30Rnd_65x39_caseless_green",
|
||||
@ -316,6 +349,8 @@ class CfgWeapons {
|
||||
ACE_barrelTwist = 203.2;
|
||||
ACE_barrelLength = 393.7;
|
||||
};
|
||||
|
||||
// KH2002 Sama KGL
|
||||
class arifle_Katiba_GL_F: arifle_katiba_Base_F {
|
||||
magazines[] = {
|
||||
"30Rnd_65x39_caseless_green",
|
||||
@ -326,6 +361,8 @@ class CfgWeapons {
|
||||
ACE_barrelTwist = 203.2;
|
||||
ACE_barrelLength = 508.0;
|
||||
};
|
||||
|
||||
// MX
|
||||
class arifle_MX_F: arifle_MX_Base_F {
|
||||
magazines[] = {
|
||||
"30Rnd_65x39_caseless_mag",
|
||||
@ -336,6 +373,8 @@ class CfgWeapons {
|
||||
ACE_barrelTwist = 228.6;
|
||||
ACE_barrelLength = 368.3;
|
||||
};
|
||||
|
||||
// MX 3GL
|
||||
class arifle_MX_GL_F: arifle_MX_Base_F {
|
||||
magazines[] = {
|
||||
"30Rnd_65x39_caseless_mag",
|
||||
@ -346,12 +385,8 @@ class CfgWeapons {
|
||||
ACE_barrelTwist = 228.6;
|
||||
ACE_barrelLength = 368.3;
|
||||
};
|
||||
/*
|
||||
class arifle_MX_SW_F: arifle_MX_Base_F {
|
||||
ACE_barrelTwist=228.6;
|
||||
ACE_barrelLength=406.4;
|
||||
};
|
||||
*/
|
||||
|
||||
// MXC
|
||||
class arifle_MXC_F: arifle_MX_Base_F {
|
||||
magazines[] = {
|
||||
"30Rnd_65x39_caseless_mag",
|
||||
@ -362,12 +397,8 @@ class CfgWeapons {
|
||||
ACE_barrelTwist = 203.2;
|
||||
ACE_barrelLength = 266.7;
|
||||
};
|
||||
/*
|
||||
class arifle_MXM_F: arifle_MX_Base_F {
|
||||
ACE_barrelTwist=228.6;
|
||||
ACE_barrelLength=457.2;
|
||||
};
|
||||
*/
|
||||
|
||||
// RFB SDAR
|
||||
class arifle_SDAR_F: SDAR_base_F {
|
||||
magazines[] = {
|
||||
"20Rnd_556x45_UW_mag",
|
||||
@ -386,16 +417,24 @@ class CfgWeapons {
|
||||
ACE_barrelTwist = 285.75;
|
||||
ACE_barrelLength = 457.2;
|
||||
};
|
||||
|
||||
// Scorpion Evo 3 A1
|
||||
class SMG_02_base_F: Rifle_Short_Base_F {
|
||||
initSpeed = -1.10288;
|
||||
ACE_barrelTwist = 254.0;
|
||||
ACE_barrelLength = 195.58;
|
||||
};
|
||||
|
||||
// MP5K
|
||||
class SMG_05_base_F: Rifle_Short_Base_F {
|
||||
initSpeed = -1.04058;
|
||||
ACE_barrelTwist = 254.0;
|
||||
ACE_barrelLength = 115.0;
|
||||
};
|
||||
|
||||
class Tavor_base_F: Rifle_Base_F {};
|
||||
|
||||
// CTAR-21
|
||||
class arifle_TRG20_F: Tavor_base_F {
|
||||
magazines[] = {
|
||||
"30Rnd_556x45_Stanag",
|
||||
@ -413,6 +452,8 @@ class CfgWeapons {
|
||||
ACE_barrelTwist = 177.8;
|
||||
ACE_barrelLength = 381.0;
|
||||
};
|
||||
|
||||
// TAR-21
|
||||
class arifle_TRG21_F: Tavor_base_F {
|
||||
magazines[] = {
|
||||
"30Rnd_556x45_Stanag",
|
||||
@ -430,6 +471,8 @@ class CfgWeapons {
|
||||
ACE_barrelTwist = 177.8;
|
||||
ACE_barrelLength = 459.74;
|
||||
};
|
||||
|
||||
// TAR-21 EGLM
|
||||
class arifle_TRG21_GL_F: arifle_TRG21_F {
|
||||
magazines[] = {
|
||||
"30Rnd_556x45_Stanag",
|
||||
@ -447,12 +490,10 @@ class CfgWeapons {
|
||||
ACE_barrelTwist = 177.8;
|
||||
ACE_barrelLength = 459.74;
|
||||
};
|
||||
/*
|
||||
class LMG_Zafir_F: Rifle_Long_Base_F {
|
||||
ACE_barrelTwist=304.8;
|
||||
ACE_barrelLength=459.74;
|
||||
};
|
||||
*/
|
||||
|
||||
class mk20_base_F: Rifle_Base_F {};
|
||||
|
||||
// F2000
|
||||
class arifle_Mk20_F: mk20_base_F {
|
||||
magazines[] = {
|
||||
"30Rnd_556x45_Stanag",
|
||||
@ -470,6 +511,8 @@ class CfgWeapons {
|
||||
ACE_barrelTwist = 177.8;
|
||||
ACE_barrelLength = 441.96;
|
||||
};
|
||||
|
||||
// F2000 Tactical
|
||||
class arifle_Mk20C_F: mk20_base_F {
|
||||
magazines[] = {
|
||||
"30Rnd_556x45_Stanag",
|
||||
@ -487,6 +530,8 @@ class CfgWeapons {
|
||||
ACE_barrelTwist = 177.8;
|
||||
ACE_barrelLength = 406.4;
|
||||
};
|
||||
|
||||
// F2000 EGLM
|
||||
class arifle_Mk20_GL_F: mk20_base_F {
|
||||
magazines[] = {
|
||||
"30Rnd_556x45_Stanag",
|
||||
@ -504,20 +549,26 @@ class CfgWeapons {
|
||||
ACE_barrelTwist = 177.8;
|
||||
ACE_barrelLength = 406.4;
|
||||
};
|
||||
|
||||
// Vector SMG
|
||||
class SMG_01_Base: Rifle_Short_Base_F {
|
||||
initSpeed = -1.0175;
|
||||
ACE_barrelTwist = 406.4;
|
||||
ACE_barrelLength = 139.7;
|
||||
};
|
||||
|
||||
// VS-121
|
||||
class srifle_DMR_01_F: DMR_01_base_F {
|
||||
magazines[] = {
|
||||
"10Rnd_762x54_Mag",
|
||||
"ACE_10Rnd_762x54_Tracer_mag"
|
||||
};
|
||||
initSpeed = -1.025;
|
||||
initSpeed = -1.00019;
|
||||
ACE_barrelTwist = 241.3;
|
||||
ACE_barrelLength = 609.6;
|
||||
};
|
||||
|
||||
// Mk14 Mod 1 EBR
|
||||
class srifle_EBR_F: EBR_base_F {
|
||||
magazines[] = {
|
||||
"20Rnd_762x51_Mag",
|
||||
@ -533,13 +584,8 @@ class CfgWeapons {
|
||||
ACE_barrelTwist = 304.8;
|
||||
ACE_barrelLength = 457.2;
|
||||
};
|
||||
/*
|
||||
class LMG_Mk200_F: Rifle_Long_Base_F {
|
||||
initSpeed = -1.0;
|
||||
ACE_barrelTwist=177.8;
|
||||
ACE_barrelLength=317.5;
|
||||
};
|
||||
*/
|
||||
|
||||
// M200 Intervention
|
||||
class srifle_LRR_F: LRR_base_F {
|
||||
magazines[] = {
|
||||
"7Rnd_408_Mag",
|
||||
@ -549,6 +595,8 @@ class CfgWeapons {
|
||||
ACE_barrelTwist = 330.2;
|
||||
ACE_barrelLength = 736.6;
|
||||
};
|
||||
|
||||
// GM6 Lynx
|
||||
class srifle_GM6_F: GM6_base_F {
|
||||
magazines[] = {
|
||||
"5Rnd_127x108_Mag",
|
||||
@ -561,6 +609,8 @@ class CfgWeapons {
|
||||
ACE_barrelTwist = 381.0;
|
||||
ACE_barrelLength = 730;
|
||||
};
|
||||
|
||||
// Noreen "Bad News" ULR
|
||||
class srifle_DMR_02_F: DMR_02_base_F {
|
||||
magazines[] = {
|
||||
"10Rnd_338_Mag",
|
||||
@ -574,6 +624,8 @@ class CfgWeapons {
|
||||
ACE_barrelTwist = 254.0;
|
||||
ACE_barrelLength = 508.0;
|
||||
};
|
||||
|
||||
// SIG 556
|
||||
class srifle_DMR_03_F: DMR_03_base_F {
|
||||
magazines[] = {
|
||||
"20Rnd_762x51_Mag",
|
||||
@ -589,16 +641,22 @@ class CfgWeapons {
|
||||
ACE_barrelTwist = 254.0;
|
||||
ACE_barrelLength = 508.0;
|
||||
};
|
||||
|
||||
// ASP-1 Kir
|
||||
class srifle_DMR_04_F: DMR_04_base_F {
|
||||
initSpeed = -1.0;
|
||||
ACE_barrelTwist = 203.2;
|
||||
ACE_barrelLength = 450.088;
|
||||
};
|
||||
|
||||
// Cyrus
|
||||
class srifle_DMR_05_blk_F: DMR_05_base_F {
|
||||
initSpeed = -1.0;
|
||||
ACE_barrelTwist = 359.918;
|
||||
ACE_barrelLength = 620.014;
|
||||
};
|
||||
|
||||
// M14
|
||||
class srifle_DMR_06_camo_F: DMR_06_base_F {
|
||||
magazines[] = {
|
||||
"20Rnd_762x51_Mag",
|
||||
@ -614,11 +672,15 @@ class CfgWeapons {
|
||||
ACE_barrelTwist = 304.8;
|
||||
ACE_barrelLength = 558.8;
|
||||
};
|
||||
|
||||
// HK121
|
||||
class MMG_01_hex_F: MMG_01_base_F {
|
||||
initSpeed = -0.997073;
|
||||
ACE_barrelTwist = 359.918;
|
||||
ACE_barrelLength = 549.91;
|
||||
};
|
||||
|
||||
// LWMMG
|
||||
class MMG_02_camo_F: MMG_02_base_F {
|
||||
initSpeed = -1.0;
|
||||
ACE_barrelTwist = 234.95;
|
||||
|
@ -13,7 +13,7 @@
|
||||
<Hungarian>Foglyul ejtés</Hungarian>
|
||||
<Russian>Взять в плен</Russian>
|
||||
<Japanese>捕虜にする</Japanese>
|
||||
<Korean>사로잡기</Korean>
|
||||
<Korean>포박하기</Korean>
|
||||
<Chinese>逮捕俘虜</Chinese>
|
||||
<Chinesesimp>逮捕俘虏</Chinesesimp>
|
||||
</Key>
|
||||
@ -252,13 +252,13 @@
|
||||
<Spanish>Hacer que la unidad esté esposada</Spanish>
|
||||
<French>Rendre une unité captive</French>
|
||||
<Japanese>ユニットを拘束する</Japanese>
|
||||
<Korean>수갑을 채우기</Korean>
|
||||
<Korean>포박하기</Korean>
|
||||
<Chinese>使單位戴上手銬</Chinese>
|
||||
<Chinesesimp>使单位戴上手铐</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_ModuleHandcuffed_Description">
|
||||
<English>Sync a unit to make them handcuffed.</English>
|
||||
<German>Synchronisiere eine Einheit um sie in Handschellen zu legen.</German>
|
||||
<German>Synchronisiere eine Einheit, um sie in Handschellen zu legen.</German>
|
||||
<Polish>Zsynchronizuj z jednostką, aby została skuta.</Polish>
|
||||
<Portuguese>Sincronizar uma unidade para deixá-la algemada.</Portuguese>
|
||||
<Russian>Синхронизируйте с юнитами, чтобы сделать их связанными.</Russian>
|
||||
@ -283,7 +283,7 @@
|
||||
<Russian>Настройки пленения</Russian>
|
||||
<Italian>Impostazioni Prigionieri</Italian>
|
||||
<Japanese>拘束の設定</Japanese>
|
||||
<Korean>포로 설정</Korean>
|
||||
<Korean>포박 설정</Korean>
|
||||
<Chinese>俘虜設定</Chinese>
|
||||
<Chinesesimp>俘虏设定</Chinesesimp>
|
||||
</Key>
|
||||
@ -315,7 +315,7 @@
|
||||
<Russian>Связать союзника</Russian>
|
||||
<Italian>Puoi ammanettare unità alleate</Italian>
|
||||
<Japanese>拘束ユニットを自陣営へ</Japanese>
|
||||
<Korean>자기편에게 수갑을 채울 수 있게 합니다</Korean>
|
||||
<Korean>자기편을 포박 할 수 있습니다.</Korean>
|
||||
<Chinese>可以銬住同陣營隊友</Chinese>
|
||||
<Chinesesimp>可以铐住同阵营队友</Chinesesimp>
|
||||
</Key>
|
||||
@ -324,13 +324,13 @@
|
||||
<Polish>Czy gracze mogą skuwać sojuszników?</Polish>
|
||||
<Spanish>Pueden los jugadores esposar unidades en su propio bando</Spanish>
|
||||
<Czech>Mohou hráči spoutat jednotky na své straně</Czech>
|
||||
<German>Spieler können eigene Einheiten fesseln. </German>
|
||||
<German>Spieler können eigene Einheiten fesseln</German>
|
||||
<Portuguese>Os jogadores podem algemar unidades do seu lado</Portuguese>
|
||||
<French>Les joueurs peuvent utiliser les Serflex sur leur propre camp</French>
|
||||
<Hungarian>A játékosok megkötözhetik-e a saját oldalukon lévő egységeket</Hungarian>
|
||||
<Russian>Разрешить игрокам связывать юнитов своей стороны</Russian>
|
||||
<Italian>I giocatori possono ammanettare unità alleate</Italian>
|
||||
<Japanese>プレイヤーが拘束したユニットの陣営を自陣営に変更させ。</Japanese>
|
||||
<Japanese>プレイヤーが拘束したユニットの陣営を自陣営に変更させます。</Japanese>
|
||||
<Korean>자기편에게 케이블타이를 사용할 수 있게합니다</Korean>
|
||||
<Chinese>玩家可以使用束線帶銬住同陣營隊友</Chinese>
|
||||
<Chinesesimp>玩家可以使用束线带铐住同阵营队友</Chinesesimp>
|
||||
@ -393,7 +393,7 @@
|
||||
<Italian>I giocatori devono arrendersi prima che possano essere arrestati</Italian>
|
||||
<French>Requiert la capitulation des joueurs avant qu'ils ne puissent être arrêtés</French>
|
||||
<Japanese>プレイヤーは拘束される前に、投降する必要があります。</Japanese>
|
||||
<Korean>체포하기 전에 플레이어가 투항을 먼저해야만 합니다</Korean>
|
||||
<Korean>체포하기 전에 먼저 플레이어가 투항을 해야만 합니다</Korean>
|
||||
<Chinese>玩家須先要求目標投降,才可以進行逮捕</Chinese>
|
||||
<Chinesesimp>玩家须先要求目标投降,才可以进行逮捕</Chinesesimp>
|
||||
</Key>
|
||||
@ -429,20 +429,30 @@
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_KeyComb_Description">
|
||||
<English>Sets the unit under the cursor captive.</English>
|
||||
<German>Nimmt die Einheit vor dem Cursor fest.</German>
|
||||
<German>Nimmt die Einheit unter dem Cursor fest.</German>
|
||||
<Japanese>カーソル先のユニットを拘束</Japanese>
|
||||
<Italian>Imposta l'unità nello stato di prigioniero.</Italian>
|
||||
<Chinese>設置在游標下的單位成俘虜狀態。</Chinese>
|
||||
<Chinesesimp>设置在游标下的单位成俘虏状态。</Chinesesimp>
|
||||
<Korean>커서의 병력을 포박합니다.</Korean>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_ModuleSettings_requireSurrenderAi_name">
|
||||
<English>Require AI surrendering</English>
|
||||
<German>Benötigt AI Kapitulation</German>
|
||||
<German>Benötigt für KI Kapitulation</German>
|
||||
<Italian>Necessita arresa AI</Italian>
|
||||
<Japanese>AI の投降を必要とする</Japanese>
|
||||
<Chinese>需要AI先行投降</Chinese>
|
||||
<Chinesesimp>需要AI先行投降</Chinesesimp>
|
||||
<Korean>AI 항복 필요</Korean>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_ModuleSettings_requireSurrenderAi_description">
|
||||
<English>Require AI to surrender before they can be arrested</English>
|
||||
<German>AI muss sich erst ergeben, bevor sie gefangen genommen werden kann</German>
|
||||
<German>KI muss sich erst ergeben, bevor sie gefangen genommen werden kann</German>
|
||||
<Italian>Necessita che le AI si arrendano prima di essere arrestate</Italian>
|
||||
<Japanese>AI の拘束は AI が投降している場合に限り可能にします。</Japanese>
|
||||
<Chinese>在逮捕AI之前該AI必須先進入投降狀態。</Chinese>
|
||||
<Chinesesimp>在逮捕AI之前该AI必须先进入投降状态。</Chinesesimp>
|
||||
<Korean>포박하기 전에 먼저 AI가 투항해야만 합니다.</Korean>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
|
@ -53,7 +53,7 @@ private _condition = {
|
||||
{(_target getVariable [QGVAR(canLoad), getNumber (configFile >> "CfgVehicles" >> (typeOf _target) >> QGVAR(canLoad))]) in [true, 1]} &&
|
||||
{locked _target < 2} &&
|
||||
{alive _target} &&
|
||||
{[_player, _target, []] call EFUNC(common,canInteractWith)} &&
|
||||
{[_player, _target, ["isNotSwimming"]] call EFUNC(common,canInteractWith)} &&
|
||||
{0 < {
|
||||
private _type = typeOf _x;
|
||||
private _hasCargoPublic = _x getVariable [QGVAR(hasCargo), false];
|
||||
|
@ -42,7 +42,9 @@ if ([_object, _vehicle] call FUNC(canLoadItemIn)) then {
|
||||
[_object,_vehicle],
|
||||
{["ace_loadCargo", _this select 0] call CBA_fnc_localEvent},
|
||||
{},
|
||||
localize LSTRING(LoadingItem)
|
||||
localize LSTRING(LoadingItem),
|
||||
{true},
|
||||
["isNotSwimming"]
|
||||
] call EFUNC(common,progressBar);
|
||||
_return = true;
|
||||
} else {
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project name="ACE">
|
||||
<Package name="Cargo">
|
||||
<Key ID="STR_ACE_Cargo_loadObject">
|
||||
@ -230,7 +230,7 @@
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_makeLoadable_displayName">
|
||||
<English>Make Object Loadable</English>
|
||||
<German>Füge Objekt zum Frachtsystem hinzu</German>
|
||||
<German>Objekt ein/entladbar machen</German>
|
||||
<Polish>Ustaw jako ładowalny</Polish>
|
||||
<Italian>Rendi oggetto caricabile</Italian>
|
||||
<Spanish>Hacer objeto cargable</Spanish>
|
||||
@ -245,7 +245,7 @@
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_makeLoadable_description">
|
||||
<English>Sets the synced object as loadable by the cargo system.</English>
|
||||
<German>Das synchronisierte Objekt wird dem Frachtsystem hinzugefügt und ist be- und entladbar.</German>
|
||||
<German>Das synchronisierte Objekt wird dem Frachtsystem hinzugefügt und ist ein- und entladbar.</German>
|
||||
<Polish>Ustawia zsynchronizowany obiekt jako możliwy do załadowania poprzez system cargo</Polish>
|
||||
<Italian>Imposta l'oggetto sincronizzato come caricabile dal sistema cargo</Italian>
|
||||
<Spanish>Sincronizar un objecto para hacerlo cargable.</Spanish>
|
||||
@ -275,35 +275,43 @@
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_space_edenName">
|
||||
<English>Cargo Space</English>
|
||||
<German>Frachtraum</German>
|
||||
<Italian>Spazio Cargo</Italian>
|
||||
<Japanese>カーゴ スペース</Japanese>
|
||||
<Chinese>貨物空間</Chinese>
|
||||
<Chinesesimp>货物空间</Chinesesimp>
|
||||
<Polish>Przestrzeń ładunkowa</Polish>
|
||||
<Korean>화물 공간</Korean>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_space_edenDesc">
|
||||
<English>The cargo space available in this vehicle/container</English>
|
||||
<German>Verfügbarer Frachtraum in diesem Fahrzeug/Container</German>
|
||||
<Italian>Lo spazio disponibile in questo veicolo/container</Italian>
|
||||
<Japanese>この車両/コンテナでカーゴ スペースを使えるようにします</Japanese>
|
||||
<Chinese>設定此載具/集裝箱可裝載多少貨物</Chinese>
|
||||
<Chinesesimp>设定此载具/集装箱可装载多少货物</Chinesesimp>
|
||||
<Polish>Dostępna przestrzeń ładunkowa w tym pojeździe/kontenerze</Polish>
|
||||
<Korean>이 차량/컨테이너에서 사용가능한 화물 공간</Korean>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_size_edenName">
|
||||
<English>Cargo Size</English>
|
||||
<German>Frachtgröße</German>
|
||||
<Italian>Dimensioni Cargo</Italian>
|
||||
<Japanese>カーゴ サイズ</Japanese>
|
||||
<Chinese>貨物的大小</Chinese>
|
||||
<Chinesesimp>货物的大小</Chinesesimp>
|
||||
<Polish>Wielkość ładunku</Polish>
|
||||
<Korean>화물 크기</Korean>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_size_edenDesc">
|
||||
<English>The cargo space required to hold this object (-1 for unloadable)</English>
|
||||
<German>Frachtraumgröße, welche zum Einladen dieses Objektes benötigt wird (-1 nicht einladbar)</German>
|
||||
<Italian>Lo spazio del cargo necessita di mantenere questo oggetto (-1 per scaricabile)</Italian>
|
||||
<Japanese>このオブジェクトを積載するのに必要なカーゴ スペース (-1 で積載不可)</Japanese>
|
||||
<Chinese>此貨物會佔掉多少空間(設定-1的話此貨物就不能被裝載)</Chinese>
|
||||
<Chinesesimp>此货物会占掉多少空间(设定-1的话此货物就不能被装载)</Chinesesimp>
|
||||
<Polish>Wymagana przestrzeń ładunkowa dla tego obiektu (-1 dla niemożliwych do załadowania)</Polish>
|
||||
<Korean>이 화물을 적재하는데 필요한 공간 (-1=무조건 적재가능)</Korean>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_paradropButton">
|
||||
<English>Airdrop</English>
|
||||
@ -329,21 +337,25 @@
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_paradropTimeCoefficent">
|
||||
<English>Paradrop Time Coffecient</English>
|
||||
<German>Türlast Zeitfaktor</German>
|
||||
<Japanese>空中投下までの時間係数</Japanese>
|
||||
<Italian>Coefficente Tempo Lancio Paracadute</Italian>
|
||||
<French>Coefficient Temps de largage de cargaison</French>
|
||||
<Chinese>空投時間係數</Chinese>
|
||||
<Chinesesimp>空投时间系数</Chinesesimp>
|
||||
<Polish>Współczynnik czasu zrzutu</Polish>
|
||||
<Korean>공중 투하 시간 계수</Korean>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_paradropTimeCoefficent_description">
|
||||
<English>Modifier for how long it takes to paradrop a cargo item.</English>
|
||||
<German>Beeinflusst die zusätzliche Zeit für Türlastabwürfe.</German>
|
||||
<Japanese>カーゴ アイテムを空中投下するまでの時間を変更します。</Japanese>
|
||||
<Italian>Modificato per quanto tempo ci impiega a paracadutare un oggetto cargo.</Italian>
|
||||
<French>Modifier le temps qu'il faut pour larguer la cargaison.</French>
|
||||
<Chinese>設定空投所需消耗的時間.</Chinese>
|
||||
<Chinesesimp>设定空投所需消耗的时间.</Chinesesimp>
|
||||
<Polish>Modyfikator wskazujący jak dużo czasu potrzeba by zrzucić przedmiot na spadochronie.</Polish>
|
||||
<Korean>화물을 공중 투하 하는데 얼마나 걸리는 시간 설정</Korean>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project name="ACE">
|
||||
<Package name="Chemlights">
|
||||
<Key ID="STR_ACE_Chemlights_Action_Chemlights">
|
||||
@ -333,8 +333,8 @@
|
||||
<Korean>초록빛 조명</Korean>
|
||||
<French>Lampe d'orientation verte.</French>
|
||||
<Italian>Luce da lettura Verde.</Italian>
|
||||
<Chinese>綠色閱讀燈.</Chinese>
|
||||
<Chinesesimp>绿色阅读灯.</Chinesesimp>
|
||||
<Chinese>綠色閱讀燈。</Chinese>
|
||||
<Chinesesimp>绿色阅读灯。</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Chemlights_Shield_Red_DisplayName">
|
||||
<English>Chemlight Shield (Red)</English>
|
||||
@ -355,8 +355,8 @@
|
||||
<Korean>빨간색 조명</Korean>
|
||||
<French>Lampe d'orientation rouge.</French>
|
||||
<Italian>Luce da lettura Rossa.</Italian>
|
||||
<Chinese>紅色閱讀燈.</Chinese>
|
||||
<Chinesesimp>红色阅读灯.</Chinesesimp>
|
||||
<Chinese>紅色閱讀燈。</Chinese>
|
||||
<Chinesesimp>红色阅读灯。</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Chemlights_Shield_Blue_DisplayName">
|
||||
<English>Chemlight Shield (Blue)</English>
|
||||
@ -377,8 +377,8 @@
|
||||
<Korean>파란색 조명</Korean>
|
||||
<French>Lampe d'orientation bleue.</French>
|
||||
<Italian>Luce da lettura Blu.</Italian>
|
||||
<Chinese>藍色閱讀燈.</Chinese>
|
||||
<Chinesesimp>蓝色阅读灯.</Chinesesimp>
|
||||
<Chinese>藍色閱讀燈。</Chinese>
|
||||
<Chinesesimp>蓝色阅读灯。</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Chemlights_Shield_Yellow_DisplayName">
|
||||
<English>Chemlight Shield (Yellow)</English>
|
||||
@ -399,8 +399,8 @@
|
||||
<Korean>노란색 조명</Korean>
|
||||
<French>Lampe d'orientation jaune.</French>
|
||||
<Italian>Luce da lettura Gialla.</Italian>
|
||||
<Chinese>黃色閱讀燈.</Chinese>
|
||||
<Chinesesimp>黄色阅读灯.</Chinesesimp>
|
||||
<Chinese>黃色閱讀燈。</Chinese>
|
||||
<Chinesesimp>黄色阅读灯。</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Chemlights_Shield_Orange_DisplayName">
|
||||
<English>Chemlight Shield (Orange)</English>
|
||||
@ -421,8 +421,8 @@
|
||||
<Korean>주황색 조명</Korean>
|
||||
<French>Lampe d'orientation orange.</French>
|
||||
<Italian>Luce da lettura Arancione.</Italian>
|
||||
<Chinese>橘色閱讀燈.</Chinese>
|
||||
<Chinesesimp>橘色阅读灯.</Chinesesimp>
|
||||
<Chinese>橘色閱讀燈。</Chinese>
|
||||
<Chinesesimp>橘色阅读灯。</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Chemlights_Shield_White_DisplayName">
|
||||
<English>Chemlight Shield (White)</English>
|
||||
@ -443,8 +443,8 @@
|
||||
<Korean>주황색 조명</Korean>
|
||||
<French>Lampe d'orientation blanche.</French>
|
||||
<Italian>Luce da lettura Bianca.</Italian>
|
||||
<Chinese>白色閱讀燈.</Chinese>
|
||||
<Chinesesimp>白色阅读灯.</Chinesesimp>
|
||||
<Chinese>白色閱讀燈。</Chinese>
|
||||
<Chinesesimp>白色阅读灯。</Chinesesimp>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
|
@ -104,6 +104,7 @@ PREP(isInBuilding);
|
||||
PREP(isMedic);
|
||||
PREP(isModLoaded);
|
||||
PREP(isPlayer);
|
||||
PREP(isSwimming);
|
||||
PREP(isUnderwater);
|
||||
PREP(lightIntensityFromObject);
|
||||
PREP(loadPerson);
|
||||
|
@ -23,7 +23,8 @@ params ["_unit", "_classname", ["_container", ""], ["_ammoCount", -1]];
|
||||
|
||||
private _type = _classname call FUNC(getItemType);
|
||||
|
||||
private ["_canAdd", "_addedToUnit"];
|
||||
private _canAdd = false;
|
||||
private _addedToUnit = false;
|
||||
|
||||
switch (_container) do {
|
||||
case "vest": {
|
||||
|
@ -1,6 +1,5 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
*
|
||||
* Author: commy2, Jonpas
|
||||
* Fixes position of an object. E.g. moves object above ground and adjusts to terrain slope. Requires local object.
|
||||
*
|
||||
* Arguments:
|
||||
@ -10,7 +9,7 @@
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [bob] call ace_common_fnc_fixPosition
|
||||
* bob call ace_common_fnc_fixPosition
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
@ -19,25 +18,28 @@
|
||||
// setVectorUp requires local object
|
||||
if (!local _this) exitWith {};
|
||||
|
||||
if ((getText (configFile >> "CfgVehicles" >> (typeOf _this) >> "simulation")) == "house") then {
|
||||
//Houses don't have gravity/physics, so make sure they are not floating
|
||||
private _posAbove = (getPos _this) select 2;
|
||||
// Objects with disabled simulation and objects with simulation type "house" don't have gravity/physics, so make sure they are not floating
|
||||
private _hasGravity = simulationEnabled _this && {getText (configFile >> "CfgVehicles" >> typeOf _this >> "simulation") != "house"};
|
||||
|
||||
if (!_hasGravity) then {
|
||||
private _posAbove = (getPosATL _this) select 2;
|
||||
TRACE_2("house",_this,_posAbove);
|
||||
if (_posAbove > 0.1) then {
|
||||
private _newPosASL = (getPosASL _this) vectorDiff [0,0,_posAbove];
|
||||
_this setPosASL _newPosASL;
|
||||
private _newPosATL = (getPosATL _this) vectorDiff [0, 0, _posAbove];
|
||||
_this setPosATL _newPosATL;
|
||||
};
|
||||
};
|
||||
|
||||
private _position = getPos _this;
|
||||
private _position = getPosATL _this;
|
||||
|
||||
// don't place the object below the ground
|
||||
// Don't place the object below the ground
|
||||
if (_position select 2 < -0.1) then {
|
||||
_position set [2, -0.1];
|
||||
_this setPos _position;
|
||||
_this setPosATL _position;
|
||||
};
|
||||
|
||||
// adjust position to sloped terrain, if placed on ground
|
||||
if (getPosATL _this select 2 == _position select 2) then {
|
||||
// Adjust position to sloped terrain, if placed on ground
|
||||
// Object without gravity/physics may have negative height when placed on slope, but those objects are definitely on the ground
|
||||
if (!_hasGravity || {getPosATL _this select 2 == _position select 2}) then {
|
||||
_this setVectorUp surfaceNormal _position;
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
* Move unit to kneeling position (only if not yet prone).
|
||||
* Move unit to kneeling position (only if not yet prone and not underwater).
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
@ -18,7 +18,7 @@
|
||||
params ["_unit"];
|
||||
|
||||
// Animation changes even inside vehicle post-1.60
|
||||
if (stance _unit == "PRONE" || {vehicle ACE_player != ACE_player}) exitWith {};
|
||||
if (stance _unit == "PRONE" || {vehicle _unit != _unit} || {_unit call EFUNC(common,isSwimming)}) exitWith {};
|
||||
|
||||
[
|
||||
_unit,
|
||||
|
@ -1,23 +1,21 @@
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Check if unit has item
|
||||
* Check if unit has item. Note: case-sensitive.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
* 1: Item Classname <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* has Item <BOOL>
|
||||
* Unit has Item <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [[bob, "item"] call ace_common_fnc_hasItem
|
||||
* [bob, "item"] call ace_common_fnc_hasItem
|
||||
*
|
||||
* Public: yes
|
||||
*
|
||||
* Note: Case sensitive
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params [["_unit", objNull, [objNull]], ["_item", "", [""]]];
|
||||
|
||||
_item in items _unit // return
|
||||
_item in items _unit
|
||||
|
20
addons/common/functions/fnc_isSwimming.sqf
Normal file
20
addons/common/functions/fnc_isSwimming.sqf
Normal file
@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Author: das attorney, Jonpas
|
||||
* Check if unit is swimming (surface swimming or diving).
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* If unit is swimming <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [bob] call ace_common_fnc_isSwimming
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params [["_unit", objNull, [objNull]]];
|
||||
|
||||
((animationState _unit) select [1, 3]) in ["bdv","bsw","dve","sdv","ssw","swm"]
|
@ -21,7 +21,7 @@
|
||||
|
||||
params ["_caller", "_unit", ["_vehicle", objNull]];
|
||||
|
||||
if (!([_caller, _unit, ["isNotDragging", "isNotCarrying"]] call FUNC(canInteractWith)) || {_caller == _unit}) exitWith {_vehicle};
|
||||
if (!([_caller, _unit, ["isNotDragging", "isNotCarrying", "isNotSwimming"]] call FUNC(canInteractWith)) || {_caller == _unit}) exitWith {_vehicle};
|
||||
|
||||
// Try to use nearest vehicle if a vehicle hasn't been supplied
|
||||
if (isNull _vehicle) then {
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
#define DEBUG_MODE_FULL
|
||||
// #define DEBUG_MODE_FULL
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_soundClass", "_posASL", "_volume", "_distance"];
|
||||
|
@ -1,9 +1,7 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_client", "_clientVersion", "_count", "_error", "_files", "_index", "_missingAddon", "_missingAddonServer", "_missingAddons", "_missingAddonsServer", "_oldVersionClient", "_oldVersionServer", "_oldVersionsClient", "_oldVersionsServer", "_serverFiles", "_serverVersion", "_serverVersions", "_string", "_version", "_versions"];
|
||||
|
||||
_files = [];
|
||||
private _files = [];
|
||||
|
||||
{
|
||||
if (_x find "a3_" != 0 && {_x find "ace_" != 0} && {!(toLower _x in (missionNamespace getVariable ["ACE_Version_Whitelist", []]))}) then {
|
||||
@ -11,9 +9,9 @@ _files = [];
|
||||
};
|
||||
} forEach activatedAddons;
|
||||
|
||||
_versions = [];
|
||||
private _versions = [];
|
||||
{
|
||||
_version = parseNumber getText (configFile >> "CfgPatches" >> _x >> "version");
|
||||
private _version = parseNumber getText (configFile >> "CfgPatches" >> _x >> "version");
|
||||
_versions set [_forEachIndex, _version];
|
||||
} forEach _files;
|
||||
|
||||
@ -32,27 +30,27 @@ if (!isServer) then {
|
||||
!isNil "ACE_Version_ClientVersions" && {!isNil "ACE_Version_ServerVersions"}
|
||||
};
|
||||
|
||||
_client = profileName;
|
||||
private _client = profileName;
|
||||
|
||||
_files = ACE_Version_ClientVersions select 0;
|
||||
_versions = ACE_Version_ClientVersions select 1;
|
||||
|
||||
_serverFiles = ACE_Version_ServerVersions select 0;
|
||||
_serverVersions = ACE_Version_ServerVersions select 1;
|
||||
private _serverFiles = ACE_Version_ServerVersions select 0;
|
||||
private _serverVersions = ACE_Version_ServerVersions select 1;
|
||||
|
||||
// Compare client and server files and versions
|
||||
_missingAddons = [];
|
||||
_oldVersionsClient = [];
|
||||
_oldVersionsServer = [];
|
||||
private _missingAddons = [];
|
||||
private _oldVersionsClient = [];
|
||||
private _oldVersionsServer = [];
|
||||
{
|
||||
_serverVersion = _serverVersions select _forEachIndex;
|
||||
private _serverVersion = _serverVersions select _forEachIndex;
|
||||
|
||||
_index = _files find _x;
|
||||
private _index = _files find _x;
|
||||
if (_index == -1) then {
|
||||
if (_x != "ace_server") then {_missingAddons pushBack _x;};
|
||||
} else {
|
||||
|
||||
_clientVersion = _versions select _index;
|
||||
private _clientVersion = _versions select _index;
|
||||
|
||||
if (_clientVersion < _serverVersion) then {
|
||||
_oldVersionsClient pushBack [_x, _clientVersion, _serverVersion];
|
||||
@ -65,9 +63,9 @@ if (!isServer) then {
|
||||
} forEach _serverFiles;
|
||||
|
||||
// find client files which the server doesn't have
|
||||
_missingAddonsServer = [];
|
||||
private _missingAddonsServer = [];
|
||||
{
|
||||
_index = _serverFiles find _x;
|
||||
private _index = _serverFiles find _x;
|
||||
if (_index == -1) then {
|
||||
_missingAddonsServer pushBack _x;
|
||||
}
|
||||
@ -75,10 +73,10 @@ if (!isServer) then {
|
||||
|
||||
// display and log error messages
|
||||
private _fnc_cutComma = {
|
||||
_string = _this;
|
||||
private _string = _this;
|
||||
_string = toArray _string;
|
||||
|
||||
_count = count _string;
|
||||
private _count = count _string;
|
||||
_string set [_count - 2, toArray "." select 0];
|
||||
_string set [_count - 1, -1];
|
||||
_string = _string - [-1];
|
||||
@ -86,11 +84,11 @@ if (!isServer) then {
|
||||
toString _string;
|
||||
};
|
||||
|
||||
_missingAddon = false;
|
||||
private _missingAddon = false;
|
||||
if (count _missingAddons > 0) then {
|
||||
_missingAddon = true;
|
||||
|
||||
_error = format ["[ACE] %1: ERROR missing addon(s): ", _client];
|
||||
private _error = format ["[ACE] %1: ERROR missing addon(s): ", _client];
|
||||
{
|
||||
_error = _error + format ["%1, ", _x];
|
||||
|
||||
@ -103,11 +101,11 @@ if (!isServer) then {
|
||||
[QGVAR(systemChatGlobal), _error] call CBA_fnc_globalEvent;
|
||||
};
|
||||
|
||||
_missingAddonServer = false;
|
||||
private _missingAddonServer = false;
|
||||
if (count _missingAddonsServer > 0) then {
|
||||
_missingAddonServer = true;
|
||||
|
||||
_error = format ["[ACE] %1: ERROR missing server addon(s): ", _client];
|
||||
private _error = format ["[ACE] %1: ERROR missing server addon(s): ", _client];
|
||||
{
|
||||
_error = _error + format ["%1, ", _x];
|
||||
|
||||
@ -120,11 +118,11 @@ if (!isServer) then {
|
||||
[QGVAR(systemChatGlobal), _error] call CBA_fnc_globalEvent;
|
||||
};
|
||||
|
||||
_oldVersionClient = false;
|
||||
private _oldVersionClient = false;
|
||||
if (count _oldVersionsClient > 0) then {
|
||||
_oldVersionClient = true;
|
||||
|
||||
_error = format ["[ACE] %1: ERROR outdated addon(s): ", _client];
|
||||
private _error = format ["[ACE] %1: ERROR outdated addon(s): ", _client];
|
||||
{
|
||||
_error = _error + format ["%1 (client: %2, server: %3), ", _x select 0, _x select 1, _x select 2];
|
||||
|
||||
@ -137,11 +135,11 @@ if (!isServer) then {
|
||||
[QGVAR(systemChatGlobal), _error] call CBA_fnc_globalEvent;
|
||||
};
|
||||
|
||||
_oldVersionServer = false;
|
||||
private _oldVersionServer = false;
|
||||
if (count _oldVersionsServer > 0) then {
|
||||
_oldVersionServer = true;
|
||||
|
||||
_error = format ["[ACE] %1: ERROR outdated server addon(s): ", _client];
|
||||
private _error = format ["[ACE] %1: ERROR outdated server addon(s): ", _client];
|
||||
{
|
||||
_error = _error + format ["%1 (client: %2, server: %3), ", _x select 0, _x select 1, _x select 2];
|
||||
|
||||
|
@ -447,8 +447,8 @@
|
||||
<Portuguese>Aceitar pedidos enviados por outros jogadores. Podem ser pedidos para usar/ compartilhar equipamento, realizar certas ações.</Portuguese>
|
||||
<Japanese>他プレイヤからの要求を許可します。他プレイヤは装備を共有し、使うなど特定の動作を行えます。</Japanese>
|
||||
<Korean>다른 플레이어가 보내온 요청을 수락합니다. 이것은 장비 사용 / 공유 요청, 특정 작업 수행 등이 될 수 있습니다.</Korean>
|
||||
<Chinese>接受由其他玩家送出的請求. 包含使用/共享裝備與執行特定動作</Chinese>
|
||||
<Chinesesimp>接受由其他玩家送出的请求. 包含使用/共享装备与执行特定动作</Chinesesimp>
|
||||
<Chinese>接受由其他玩家送出的請求。包含使用/共享裝備與執行特定動作。</Chinese>
|
||||
<Chinesesimp>接受由其他玩家送出的请求。包含使用/共享装备与执行特定动作。</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_ACTION_DECLINE_REQUEST_KEY_TOOLTIP">
|
||||
<English>Decline Requests send by other players. These can be requests to use / share equipment, perform certain actions.</English>
|
||||
@ -463,8 +463,8 @@
|
||||
<Portuguese>Rejeita pedidos enviados por outros jogadores. Podem ser pedidos para usar/ compartilhar equipamento, realizar certas ações.</Portuguese>
|
||||
<Japanese>他プレイヤからの要求を拒否します。他プレイヤは装備を共有し、使うなど特定の動作をできません。</Japanese>
|
||||
<Korean>다른 플레이어가 보내온 요청을 거부합니다. 이것은 장비 사용 / 공유 요청, 특정 작업 수행 등이 될 수 있습니다.</Korean>
|
||||
<Chinese>拒絕由其他玩家送出的請求. 包含使用/共享裝備與執行特定動作</Chinese>
|
||||
<Chinesesimp>拒绝由其他玩家送出的请求. 包含使用/共享装备与执行特定动作</Chinesesimp>
|
||||
<Chinese>拒絕由其他玩家送出的請求。包含使用/共享裝備與執行特定動作。</Chinese>
|
||||
<Chinesesimp>拒绝由其他玩家送出的请求。包含使用/共享装备与执行特定动作。</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_SettingFeedbackIconsName">
|
||||
<English>Feedback icons</English>
|
||||
@ -495,8 +495,8 @@
|
||||
<Portuguese>Selecione a posição ou disabilite a posição dos ícones de feedback na sua tela. Esses ícones irão aparecer para mostrar feedback extra do status do seu personagem e ações realizadas.</Portuguese>
|
||||
<Japanese>画面上に表示するフィードバック アイコンの位置や無効化を選択できます。このアイコンは自キャラクター状態や動作の状況をフィードバックするために表示されています。</Japanese>
|
||||
<Korean>피드백 아이콘의 위치를 설정하거나 비활성화합니다. 피드백 아이콘은 캐릭터의 상세정보와 행동을 보여줍니다.</Korean>
|
||||
<Chinese>選擇位置或取消回饋圖標顯示在螢幕上. 這些圖標將顯示出你角色額外的狀態與行動等資訊.</Chinese>
|
||||
<Chinesesimp>选择位置或取消回馈图标显示在荧幕上. 这些图标将显示出你角色额外的状态与行动等资讯.</Chinesesimp>
|
||||
<Chinese>選擇位置或取消回饋圖標顯示在螢幕上。這些圖標將顯示出你角色額外的狀態與行動等資訊。</Chinese>
|
||||
<Chinesesimp>选择位置或取消回馈图标显示在荧幕上。这些图标将显示出你角色额外的状态与行动等资讯。</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_SettingProgressbarLocationName">
|
||||
<English>Progress bar location</English>
|
||||
@ -591,8 +591,8 @@
|
||||
<Portuguese>A cor do texto das hints do ACE. Essa cor é a cor default para todos os texos exibidos pelo sistema de hints do ACE , caso o texto da hint não tem outra cor especificada.</Portuguese>
|
||||
<Japanese>ACE によるヒントの文章へ、色を設定できます。この色は ACE ヒント システムを介して表示される全文章の色と標準でなっており、特定の色を設定していても、標準色になります。</Japanese>
|
||||
<Korean>ACE 힌트에 쓰이는 글씨 색입니다. 힌트 글씨의 색이 정해지지 않을경우 모든 힌트의 색은 기본으로 설정됩니다.</Korean>
|
||||
<Chinese>設定ACE提示文字的顏色. 若提示字體並無指定其他顏色, 將會自動選用ACE系統的預設顏色</Chinese>
|
||||
<Chinesesimp>设定ACE提示文字的颜色. 若提示字体并无指定其他颜色, 将会自动选用ACE系统的预设颜色</Chinesesimp>
|
||||
<Chinese>設定ACE提示文字的顏色。若提示字體並無指定其他顏色,將會自動選用ACE系統的預設顏色。</Chinese>
|
||||
<Chinesesimp>设定ACE提示文字的颜色。若提示字体并无指定其他颜色,将会自动选用ACE系统的预设颜色。</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_bananaDisplayName">
|
||||
<English>Banana</English>
|
||||
@ -623,8 +623,8 @@
|
||||
<Portuguese>A banana é uma fruta comestível, botanicamente uma baga, produzida por vários tipos de plantas herbáceas grandes do genero Musa.</Portuguese>
|
||||
<Japanese>甘蕉は食べられる果物でバショウ科バショウ属のうち、果実を食用とする品種群の総称。また、その果実のこと。いくつかの原種から育種された多年草。種によっては熟すまでは毒を持つものもある。</Japanese>
|
||||
<Korean>바나나는 식용 과일로써 식물학적으로 열매류이며 여러 종류의 개화가능한 초본의 파초과로 부터 생산됩니다.</Korean>
|
||||
<Chinese>香蕉(學名: Musa × paradisiaca), 為芭蕉科芭蕉屬小果野蕉及野蕉的人工栽培雜交種, 為多年生草本植物. 果實長有棱; 果皮黃色, 果肉白色, 味道香甜. 主要生長在熱帶、亞熱帶地區. 原產於亞洲東南部熱帶、亞熱帶地區.</Chinese>
|
||||
<Chinesesimp>香蕉(学名: Musa × paradisiaca), 为芭蕉科芭蕉属小果野蕉及野蕉的人工栽培杂交种, 为多年生草本植物. 果实长有棱; 果皮黄色, 果肉白色, 味道香甜. 主要生长在热带、亚热带地区. 原产于亚洲东南部热带、亚热带地区.</Chinesesimp>
|
||||
<Chinese>香蕉(學名: Musa × paradisiaca),為芭蕉科芭蕉屬小果野蕉及野蕉的人工栽培雜交種,為多年生草本植物。果實長有棱; 果皮黃色,果肉白色,味道香甜。主要生長在熱帶、亞熱帶地區。原產於亞洲東南部熱帶、亞熱帶地區。</Chinese>
|
||||
<Chinesesimp>香蕉(学名: Musa × paradisiaca),为芭蕉科芭蕉属小果野蕉及野蕉的人工栽培杂交种,为多年生草本植物。果实长有棱; 果皮黄色,果肉白色,味道香甜。主要生长在热带、亚热带地区。原产于亚洲东南部热带、亚热带地区。</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_CheckPBO_DisplayName">
|
||||
<English>Check PBOs</English>
|
||||
@ -654,8 +654,8 @@
|
||||
<Italian>Controlla l'integrità degli addon con il server ed esegui l'azione selezionata se un addon è mancante</Italian>
|
||||
<Japanese>サーバがアドオンの整合性を検査し、もし不備があれば実行する動作を選択できます。</Japanese>
|
||||
<Korean>서버 에드온의 무결성을 검사하고 사라진 에드온이 있을경우 행동을 선택합니다.</Korean>
|
||||
<Chinese>檢查客戶端與伺服器端的模組清單是否一致且完整, 並提供訊息表示遺失的模組.</Chinese>
|
||||
<Chinesesimp>检查客户端与伺服器端的模组清单是否一致且完整, 并提供讯息表示遗失的模组.</Chinesesimp>
|
||||
<Chinese>檢查客戶端與伺服器端的模組清單是否一致且完整,並提供訊息表示遺失的模組。</Chinese>
|
||||
<Chinesesimp>检查客户端与伺服器端的模组清单是否一致且完整,并提供讯息表示遗失的模组。</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_CheckPBO_Action_DisplayName">
|
||||
<English>Action</English>
|
||||
@ -686,8 +686,8 @@
|
||||
<Italian>Cosa fare con giocatori che non hanno i PBO corretti?</Italian>
|
||||
<Japanese>プレイヤーが正しい PBO を持っていない場合は?</Japanese>
|
||||
<Korean>올바르지 않는 PBO를 가진 사람을 어떻게 할까요?</Korean>
|
||||
<Chinese>若玩家沒有正確的PBO檔時, 將採取何種動作?</Chinese>
|
||||
<Chinesesimp>若玩家没有正确的PBO档时, 将采取何种动作?</Chinesesimp>
|
||||
<Chinese>若玩家沒有正確的PBO檔時,將採取何種動作?</Chinese>
|
||||
<Chinesesimp>若玩家没有正确的PBO档时,将采取何种动作?</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_CheckPBO_Action_WarnOnce">
|
||||
<English>Warn once</English>
|
||||
@ -830,8 +830,8 @@
|
||||
<Italian>Aggiunge effetti LSD ai veicoli sincronizzati</Italian>
|
||||
<Japanese>同期されたオブジェクトに LSD の効果を追加します</Japanese>
|
||||
<Korean>동기화된 차량에 LSD효과를 추가합니다.</Korean>
|
||||
<Chinese>使被同步的載具產生瘋狂的迷幻效果. (後果自負)</Chinese>
|
||||
<Chinesesimp>使被同步的载具产生疯狂的迷幻效果. (后果自负)</Chinesesimp>
|
||||
<Chinese>使被同步的載具產生瘋狂的迷幻效果。(後果自負)</Chinese>
|
||||
<Chinesesimp>使被同步的载具产生疯狂的迷幻效果。(后果自负)</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_toggleHandheldDevice">
|
||||
<English>Toggle Handheld Device</English>
|
||||
|
@ -40,12 +40,12 @@ class Extended_Init_EventHandlers {
|
||||
};
|
||||
class ACE_ConcertinaWire {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_init));
|
||||
init = QUOTE(call FUNC(handleInit));
|
||||
};
|
||||
};
|
||||
class Land_Razorwire_F {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_init));
|
||||
init = QUOTE(call FUNC(handleInit));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -3,5 +3,6 @@ PREP(deploy);
|
||||
PREP(dismount);
|
||||
PREP(dismountSuccess);
|
||||
PREP(handleDamage);
|
||||
PREP(handleInit);
|
||||
PREP(handleKilled);
|
||||
PREP(vehicleDamage);
|
||||
|
@ -1,3 +0,0 @@
|
||||
#include "script_component.hpp"
|
||||
params ["_wire"];
|
||||
_wire addEventHandler ["HandleDamage", {call FUNC(handleDamage)}];
|
@ -27,12 +27,11 @@ params ["_wire"];
|
||||
_args params ["_wire"];
|
||||
|
||||
if (_wire animationPhase "wire_2" == 1) then {
|
||||
private ["_dir", "_pos", "_wirecoil"];
|
||||
|
||||
_dir = getDir _wire;
|
||||
_pos = getPosASL _wire;
|
||||
private _dir = getDir _wire;
|
||||
private _pos = getPosASL _wire;
|
||||
|
||||
_wirecoil = "ACE_ConcertinaWireCoil" createvehicle [0, 0, 0];
|
||||
private _wirecoil = "ACE_ConcertinaWireCoil" createvehicle [0, 0, 0];
|
||||
|
||||
deleteVehicle _wire;
|
||||
|
||||
|
18
addons/concertina_wire/functions/fnc_handleInit.sqf
Normal file
18
addons/concertina_wire/functions/fnc_handleInit.sqf
Normal file
@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Author: Rocko
|
||||
* Handles wire Init
|
||||
*
|
||||
* Arguments:
|
||||
* 0: wire <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [wire] call ace_concertina_wire_fnc_handleInit
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
params ["_wire"];
|
||||
_wire addEventHandler ["HandleDamage", {call FUNC(handleDamage)}];
|
@ -17,10 +17,8 @@
|
||||
#include "script_component.hpp"
|
||||
params ["_wire", "_vehicle"];
|
||||
|
||||
private ["_type", "_mode", "_anim", "_parts", "_selectionPart", "_selection", "_pos_w", "_dir_w"];
|
||||
|
||||
_type = typeOf _wire;
|
||||
_mode = switch (_type) do {
|
||||
private _type = typeOf _wire;
|
||||
private _mode = switch (_type) do {
|
||||
case "ACE_ConcertinaWire": { 0 };
|
||||
case "Land_Razorwire_F": { 1 };
|
||||
default { -1 };
|
||||
@ -38,16 +36,16 @@ if (_mode == -1) exitWith {};
|
||||
//9.78744 (10)
|
||||
|
||||
_type = typeOf _wire;
|
||||
_anim = _wire animationPhase "wire_2";
|
||||
_pos_w = getPos _wire;
|
||||
_dir_w = getDir _wire;
|
||||
private _anim = _wire animationPhase "wire_2";
|
||||
private _pos_w = getPos _wire;
|
||||
private _dir_w = getDir _wire;
|
||||
|
||||
if (_mode == 0) then {
|
||||
private ["_x", "_y", "_found", "_wireCheckPosAr", "_no"];
|
||||
private _found = false;
|
||||
_pos_w params ["_x","_y"];
|
||||
|
||||
// Check if two Single coils are placed next to each other (i.e playes have built a big wire obstacle)
|
||||
_wireCheckPosAr = [
|
||||
private _wireCheckPosAr = [
|
||||
[_x + (sin (_dir_w + 90) * 1.5),_y + (cos (_dir_w + 90) * 1.5)],
|
||||
[(_x-(sin _dir_w)) + (sin (_dir_w + 90) * 1.5),(_y-(cos _dir_w)) + (cos (_dir_w + 90) * 1.5)],
|
||||
[_x + (sin (_dir_w - 90) * 1.5),_y + (cos (_dir_w - 90) * 1.5)],
|
||||
@ -55,7 +53,7 @@ if (_mode == 0) then {
|
||||
];
|
||||
{
|
||||
_found = false;
|
||||
_no = nearestObjects [_x, [typeOf _wire], 3]; //diag_log _no; diag_log ".....";
|
||||
private _no = nearestObjects [_x, [typeOf _wire], 3]; //diag_log _no; diag_log ".....";
|
||||
_no = _no - [_wire]; //diag_log _no;
|
||||
if (count _no > 0) exitWith {
|
||||
_found = true; //diag_log "found";
|
||||
@ -76,6 +74,8 @@ if (_mode == 0) then {
|
||||
};
|
||||
};
|
||||
|
||||
private _parts = [];
|
||||
|
||||
if (_mode == 1) then {
|
||||
switch (true) do {
|
||||
case (_vehicle isKindOf "Tank"): {
|
||||
@ -95,9 +95,9 @@ if (_mode == 1) then {
|
||||
|
||||
if (canMove _vehicle) then {
|
||||
{
|
||||
_selectionPart = "hit" + _x;
|
||||
private _selectionPart = "hit" + _x;
|
||||
if (isText(configFile >> "CfgVehicles" >> typeOf _vehicle >> "hitpoints" >> _selectionPart >> "name")) then {
|
||||
_selection = getText(configFile >> "CfgVehicles" >> typeOf _vehicle >> "hitpoints" >> _selectionPart >> "name");
|
||||
private _selection = getText(configFile >> "CfgVehicles" >> typeOf _vehicle >> "hitpoints" >> _selectionPart >> "name");
|
||||
// TODO: Only the tires that have touched the wire should burst.
|
||||
_vehicle setHit [_selection, 1];
|
||||
};
|
||||
@ -107,14 +107,13 @@ if (canMove _vehicle) then {
|
||||
if (_mode == 1) then {
|
||||
if (_vehicle isKindOf "StaticWeapon") exitWith {};
|
||||
[{
|
||||
PARAMS_2(_vehicle,_wire);
|
||||
params ["_vehicle", "_wire"];
|
||||
|
||||
_vehicle setVelocity ((velocity _vehicle) vectorMultiply 0.75);
|
||||
|
||||
private ["_vPos", "_vDir"];
|
||||
// Set vehicle back in front of wire, since the wire will make the vehicle jump, and a wire with no geometry lod is undestructible and not recognizeable
|
||||
_vPos = getPosASL _vehicle;
|
||||
_vDir = getDir _vehicle;
|
||||
private _vPos = getPosASL _vehicle;
|
||||
private _vDir = getDir _vehicle;
|
||||
_vehicle setPosASL (_vPos vectorAdd [-0.35 * sin(_vDir), -0.35 * cos(_vDir), 0]);
|
||||
// TODO: Needs to be placed in safe distance to wire, so we do not constantly re - spawn new wires
|
||||
}, [_vehicle, _wire], 0.1] call CBA_fnc_waitAndExecute;
|
||||
|
@ -28,6 +28,9 @@ private _totalAmmo = 0;
|
||||
{
|
||||
_x params ["_mag", "", "_count"];
|
||||
if (_count > 0) then {
|
||||
private _ammo = getText (configFile >> "CfgMagazines" >> _mag >> "ammo");
|
||||
private _model = getText (configFile >> "CfgAmmo" >> _ammo >> "model");
|
||||
if (_model == "\A3\weapons_f\empty") exitWith {TRACE_3("skipping",_mag,_ammo,_model);};
|
||||
_ammoToDetonate pushBack [_mag, _count];
|
||||
_totalAmmo = _totalAmmo + _count;
|
||||
};
|
||||
@ -44,7 +47,9 @@ private _totalAmmo = 0;
|
||||
|
||||
// Get ammo from transportAmmo / ace_rearm
|
||||
private _vehCfg = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
if (((getNumber (_vehCfg >> "transportAmmo")) > 1000) || {isClass (_vehCfg >> "ACE_Actions" >> "ACE_MainActions" >> QEGVAR(rearm,TakeAmmo))}) then {
|
||||
|
||||
private _configSupply = (getNumber (_vehCfg >> "transportAmmo")) max (getNumber (_vehCfg >> QEGVAR(rearm,defaultSupply)));
|
||||
if (_vehicle getVariable [QEGVAR(rearm,isSupplyVehicle), (_configSupply > 0)]) then {
|
||||
TRACE_1("transportAmmo vehicle - adding virtual ammo",typeOf _vehicle);
|
||||
|
||||
_ammoToDetonate pushBack ["2000Rnd_65x39_belt", 2000];
|
||||
|
@ -29,7 +29,7 @@ if (_hitIndex != -1) then {
|
||||
};
|
||||
|
||||
// get change in damage
|
||||
private "_oldDamage";
|
||||
private _oldDamage = 0;
|
||||
|
||||
if (_hitpoint isEqualTo "#structural") then {
|
||||
_oldDamage = damage _vehicle;
|
||||
|
@ -24,8 +24,8 @@
|
||||
<Polish>Aktywuje efekt samozapłonu amunicji na zniszczonych pojazdach.</Polish>
|
||||
<French>Active le cook-off (autocombustion des munitions) et les effets de destruction liés.</French>
|
||||
<Italian>Abilita l'esplosione e i relativi effetti di distruzione del veicolo.</Italian>
|
||||
<Chinese>開啟此功能後, 將使有關載具在損毀時有殉爆的效果</Chinese>
|
||||
<Chinesesimp>开启此功能后, 将使有关载具在损毁时有殉爆的效果</Chinesesimp>
|
||||
<Chinese>開啟此功能後,將使有關載具在損毀時有殉爆的效果。</Chinese>
|
||||
<Chinesesimp>开启此功能后,将使有关载具在损毁时有殉爆的效果。</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_CookOff_generic_turret_wreck">
|
||||
<Original>Wreck (Turret)</Original>
|
||||
@ -83,12 +83,13 @@
|
||||
<Polish>Aktywuje samozapłon amunicji. Wystrzeliwuje pociski podczas gdy pojazd płonie i posiada amunicję.</Polish>
|
||||
<French>Mets à feu les munitions lorsqu'un véhicule est en feu et contient des munitions.</French>
|
||||
<Italian>Abilita l'esplosione delle munizioni. Spara munizioni di proiettili quando il veicolo va a fuoco e contiene munizioni.</Italian>
|
||||
<Chinese>開啟彈藥殉爆效果. 當一台載有彈藥的載具起火時, 將會有殉爆的效果</Chinese>
|
||||
<Chinesesimp>开启弹药殉爆效果. 当一台载有弹药的载具起火时, 将会有殉爆的效果</Chinesesimp>
|
||||
<Chinese>開啟彈藥殉爆效果。當一台載有彈藥的載具起火時, 將會有殉爆的效果。</Chinese>
|
||||
<Chinesesimp>开启弹药殉爆效果。当一台载有弹药的载具起火时, 将会有殉爆的效果。</Chinesesimp>
|
||||
<Korean>쿡오프 현상을 활성화 합니다. 이것은 탄약에 불이 붙어있는 동안 주변에 발사체를 발사합니다.</Korean>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_CookOff_ammoCookoffDuration_name">
|
||||
<English>Ammunition cook off duration</English>
|
||||
<German>Munitionsselbstzündungdauer</German>
|
||||
<Polish>Czas trwania samozapłonu amunicji</Polish>
|
||||
<Japanese>弾薬の誘爆持続時間</Japanese>
|
||||
<French>Durée cook-off des munitions</French>
|
||||
@ -99,6 +100,7 @@
|
||||
</Key>
|
||||
<Key ID="STR_ACE_CookOff_ammoCookoffDuration_tooltip">
|
||||
<English>Multiplier for how long cook off lasts [Setting to 0 will disable ammo cookoff]</English>
|
||||
<German>Faktor für die Munitionsselbstzündungdauer [0 zum Deaktivieren]</German>
|
||||
<French>Multiplicateur de la durée du cook-off des munitions [Une valeur de 0 désactive l'effet]</French>
|
||||
<Polish>Mnożnik decydujący jak długo ma trwać samozapłon amunicji [Ustawienie na 0 spowoduje wyłącznie samozapłonu]</Polish>
|
||||
<Japanese>誘爆の持続時間を乗数で設定。[0 に設定で誘爆を無効化]</Japanese>
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
#define EMP_RF_ACC 5 // Rangefinder Accuracy
|
||||
|
||||
PARAMS_3(_slopeDistance,_azimuth,_inclination);
|
||||
params ["_slopeDistance", "_azimuth", "_inclination"];
|
||||
|
||||
if (GVAR(vectorConnected)) then {
|
||||
GVAR(LAZPOS) = (eyePos player) vectorAdd ([_slopeDistance, _azimuth, _inclination] call CBA_fnc_polar2vect);
|
||||
|
@ -31,8 +31,6 @@ __background ctrlSetText QPATHTOF(UI\dagr_gps.paa);
|
||||
if (GVAR(outputPFH) != -1) exitWith {};
|
||||
|
||||
GVAR(outputPFH) = [{
|
||||
private ["_dagrElevation", "_dagrGrid", "_dagrHeading", "_dagrSpeed", "_dagrTime", "_elevation", "_gridArray", "_speed"];
|
||||
|
||||
// Abort Condition
|
||||
if !(GVAR(run) && [ACE_player, "ACE_DAGR"] call EFUNC(common,hasItem)) exitWith {
|
||||
GVAR(outputPFH) = -1;
|
||||
@ -41,30 +39,30 @@ GVAR(outputPFH) = [{
|
||||
};
|
||||
|
||||
// GRID
|
||||
_gridArray = [(getPos ACE_player), false] call EFUNC(common,getMapGridFromPos);
|
||||
private _gridArray = [(getPos ACE_player), false] call EFUNC(common,getMapGridFromPos);
|
||||
_gridArray params ["_gridArrayX","_gridArrayY"];
|
||||
_dagrGrid = format ["%1 %2", ((_gridArrayX) select [0,4]), ((_gridArrayY) select [0,4])];
|
||||
private _dagrGrid = format ["%1 %2", ((_gridArrayX) select [0,4]), ((_gridArrayY) select [0,4])];
|
||||
|
||||
// SPEED
|
||||
_speed = speed (vehicle ACE_player);
|
||||
private _speed = speed (vehicle ACE_player);
|
||||
_speed = floor (_speed * 10) / 10;
|
||||
_speed = abs(_speed);
|
||||
_dagrspeed = str _speed + "kph";
|
||||
|
||||
// Elevation
|
||||
_elevation = getPosASL ACE_player;
|
||||
private _elevation = getPosASL ACE_player;
|
||||
_elevation = floor ((_elevation select 2) + EGVAR(common,mapAltitude));
|
||||
_dagrElevation = str _elevation + "m";
|
||||
private _dagrElevation = str _elevation + "m";
|
||||
|
||||
// Heading
|
||||
_dagrHeading = if (!GVAR(useDegrees)) then {
|
||||
private _dagrHeading = if (!GVAR(useDegrees)) then {
|
||||
floor (DEG_TO_MIL(direction (vehicle ACE_player)))
|
||||
} else {
|
||||
floor (direction (vehicle ACE_player))
|
||||
};
|
||||
|
||||
// Time
|
||||
_dagrTime = [daytime, "HH:MM"] call bis_fnc_timeToString;
|
||||
private _dagrTime = [daytime, "HH:MM"] call bis_fnc_timeToString;
|
||||
|
||||
// Output
|
||||
__gridControl ctrlSetText format ["%1", _dagrGrid];
|
||||
|
@ -16,8 +16,6 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_xGrid", "_yGrid", "_dagrGrid", "_bearing", "_dagrDist", "_dagrElevation", "_dagrTime", "_elevation", "_xCoord", "_yCoord"];
|
||||
|
||||
135471 cutRsc ["DAGR_DISPLAY", "plain down"];
|
||||
|
||||
#define __display (uiNameSpace getVariable "DAGR_DISPLAY")
|
||||
@ -39,7 +37,7 @@ if (_lazPosX < 0) then { _lazPosX = _lazPosX + 99999;};
|
||||
if (_lazPosY < 0) then {_lazPosY = _lazPosY + 99999;};
|
||||
|
||||
// Find laser position
|
||||
_xGrid = toArray Str(round _lazPosX);
|
||||
private _xGrid = toArray Str(round _lazPosX);
|
||||
|
||||
while {count _xGrid < 5} do {
|
||||
_xGrid = [48] + _xGrid;
|
||||
@ -48,7 +46,7 @@ _xGrid resize 4;
|
||||
_xGrid = toString _xGrid;
|
||||
_xGrid = parseNumber _xGrid;
|
||||
|
||||
_yGrid = toArray Str(round _lazPosY);
|
||||
private _yGrid = toArray Str(round _lazPosY);
|
||||
while {count _yGrid < 5} do {
|
||||
_yGrid = [48] + _yGrid;
|
||||
};
|
||||
@ -56,37 +54,37 @@ _yGrid resize 4;
|
||||
_yGrid = toString _yGrid;
|
||||
_yGrid = parseNumber _yGrid;
|
||||
|
||||
_xCoord = switch true do {
|
||||
private _xCoord = switch true do {
|
||||
case (_xGrid >= 1000): { "" + Str(_xGrid) };
|
||||
case (_xGrid >= 100): { "0" + Str(_xGrid) };
|
||||
case (_xGrid >= 10): { "00" + Str(_xGrid) };
|
||||
default { "000" + Str(_xGrid) };
|
||||
};
|
||||
|
||||
_yCoord = switch true do {
|
||||
private _yCoord = switch true do {
|
||||
case (_yGrid >= 1000): { "" + Str(_yGrid) };
|
||||
case (_yGrid >= 100): { "0" + Str(_yGrid) };
|
||||
case (_yGrid >= 10): { "00" + Str(_yGrid) };
|
||||
default { "000" + Str(_yGrid) };
|
||||
};
|
||||
|
||||
_dagrGrid = _xCoord + " " + _yCoord;
|
||||
private _dagrGrid = _xCoord + " " + _yCoord;
|
||||
|
||||
// Find target elevation
|
||||
_elevation = floor ((_lazPosZ) + EGVAR(common,mapAltitude));
|
||||
_dagrElevation = str _elevation + "m";
|
||||
private _elevation = floor ((_lazPosZ) + EGVAR(common,mapAltitude));
|
||||
private _dagrElevation = str _elevation + "m";
|
||||
|
||||
// Time
|
||||
_dagrTime = [daytime, "HH:MM"] call bis_fnc_timeToString;
|
||||
private _dagrTime = [daytime, "HH:MM"] call bis_fnc_timeToString;
|
||||
|
||||
// Bearing
|
||||
_bearing = GVAR(LAZHEADING);
|
||||
private _bearing = GVAR(LAZHEADING);
|
||||
if (_bearing >= 360) then {_bearing = _bearing - 360;};
|
||||
if (!GVAR(useDegrees)) then {_bearing = DEG_TO_MIL(_bearing)};
|
||||
_bearing = floor (_bearing);
|
||||
|
||||
// Distance
|
||||
_dagrDist = str GVAR(LAZDIST) + "m";
|
||||
private _dagrDist = str GVAR(LAZDIST) + "m";
|
||||
|
||||
// Put grid into variable so DAGR menu can access it
|
||||
GVAR(vectorGrid) = _dagrGrid;
|
||||
|
@ -31,8 +31,6 @@ __background ctrlSetText QPATHTOF(UI\dagr_wp.paa);
|
||||
if (GVAR(outputPFH) != -1) exitWith {};
|
||||
|
||||
GVAR(outputPFH) = [{
|
||||
private ["_MYpos", "_WPpos", "_bearing", "_dagrDistance", "_dagrGrid", "_dagrHeading", "_distance", "_gridArray"];
|
||||
|
||||
// Abort Condition
|
||||
if !(GVAR(run) && [ACE_player, "ACE_DAGR"] call EFUNC(common,hasItem)) exitWith {
|
||||
GVAR(outputPFH) = -1;
|
||||
@ -41,13 +39,13 @@ GVAR(outputPFH) = [{
|
||||
};
|
||||
|
||||
// GRID
|
||||
_gridArray = [(getPos ACE_player), false] call EFUNC(common,getMapGridFromPos);
|
||||
private _gridArray = [(getPos ACE_player), false] call EFUNC(common,getMapGridFromPos);
|
||||
_gridArray params ["_gridArrayX","_gridArrayY"];
|
||||
_dagrGrid = format ["%1 %2", (_gridArrayX select [0,4]), (_gridArrayY select [0,4])];
|
||||
private _dagrGrid = format ["%1 %2", (_gridArrayX select [0,4]), (_gridArrayY select [0,4])];
|
||||
|
||||
// WP Grid
|
||||
_xGrid2 = floor (DAGR_WP_INFO / 10000);
|
||||
_yGrid2 = DAGR_WP_INFO - _xGrid2 * 10000;
|
||||
private _xGrid2 = floor (DAGR_WP_INFO / 10000);
|
||||
private _yGrid2 = DAGR_WP_INFO - _xGrid2 * 10000;
|
||||
|
||||
_xCoord2 = switch true do {
|
||||
case (_xGrid2 >= 1000): { "" + Str(_xGrid2) };
|
||||
@ -66,21 +64,21 @@ GVAR(outputPFH) = [{
|
||||
_dagrGrid2 = _xCoord2 + " " + _yCoord2;
|
||||
|
||||
// Distance
|
||||
_WPpos = [_dagrGrid2, true] call EFUNC(common,getMapPosFromGrid);
|
||||
_MYpos = [_dagrGrid, true] call EFUNC(common,getMapPosFromGrid);
|
||||
_distance = _MYpos distance _WPpos;
|
||||
private _WPpos = [_dagrGrid2, true] call EFUNC(common,getMapPosFromGrid);
|
||||
private _MYpos = [_dagrGrid, true] call EFUNC(common,getMapPosFromGrid);
|
||||
private _distance = _MYpos distance _WPpos;
|
||||
_distance = floor (_distance * 10) / 10;
|
||||
_dagrDistance = str _distance + "m";
|
||||
private _dagrDistance = str _distance + "m";
|
||||
|
||||
// Heading
|
||||
_dagrHeading = floor (if (GVAR(useDegrees)) then {
|
||||
private _dagrHeading = floor (if (GVAR(useDegrees)) then {
|
||||
direction (vehicle ACE_player)
|
||||
} else {
|
||||
DEG_TO_MIL(direction (vehicle ACE_player))
|
||||
});
|
||||
|
||||
// WP Heading
|
||||
_bearing = floor (if (GVAR(useDegrees)) then {
|
||||
private _bearing = floor (if (GVAR(useDegrees)) then {
|
||||
((_WPpos vectorDiff _MYpos) call CBA_fnc_vectDir)
|
||||
} else {
|
||||
DEG_TO_MIL(((_WPpos vectorDiff _MYpos) call CBA_fnc_vectDir))
|
||||
|
@ -30,11 +30,10 @@
|
||||
[0, [false, false, false]], false] call CBA_fnc_addKeybind; // (empty default key)
|
||||
|
||||
//Add deviceKey entry:
|
||||
private ["_conditonCode", "_toggleCode", "_closeCode"];
|
||||
_conditonCode = {
|
||||
private _conditonCode = {
|
||||
([ACE_player, "ACE_DAGR"] call EFUNC(common,hasItem));
|
||||
};
|
||||
_toggleCode = {
|
||||
private _toggleCode = {
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {};
|
||||
|
||||
@ -44,7 +43,7 @@ _toggleCode = {
|
||||
[] call FUNC(menuInit);
|
||||
};
|
||||
};
|
||||
_closeCode = {
|
||||
private _closeCode = {
|
||||
// Statement
|
||||
if (GVAR(run)) then {
|
||||
//If dispaly is open, close it:
|
||||
|
@ -16,16 +16,14 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_animationStateCfgMoves", "_putDownAnim"];
|
||||
|
||||
params ["_target"];
|
||||
|
||||
//Check animationState for putDown anim
|
||||
//This ensures the unit doesn't have to actualy do any animation to drop something
|
||||
//This should always be true for the 3 possible status effects that allow disarming
|
||||
_animationStateCfgMoves = getText (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState _target) >> "actions");
|
||||
private _animationStateCfgMoves = getText (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState _target) >> "actions");
|
||||
if (_animationStateCfgMoves == "") exitWith { false };
|
||||
_putDownAnim = getText (configFile >> "CfgMovesBasic" >> "Actions" >> _animationStateCfgMoves >> "PutDown");
|
||||
private _putDownAnim = getText (configFile >> "CfgMovesBasic" >> "Actions" >> _animationStateCfgMoves >> "PutDown");
|
||||
if (_putDownAnim != "") exitWith { false };
|
||||
|
||||
|
||||
|
@ -21,12 +21,10 @@
|
||||
|
||||
#define TIME_MAX_WAIT 5
|
||||
|
||||
private ["_fncSumArray", "_return", "_holder", "_dropPos", "_targetMagazinesStart", "_holderMagazinesStart", "_xClassname", "_xAmmo", "_targetMagazinesEnd", "_holderMagazinesEnd", "_holderItemsStart", "_targetItemsStart", "_addToCrateClassnames", "_addToCrateCount", "_index", "_holderItemsEnd", "_targetItemsEnd", "_holderIsEmpty"];
|
||||
|
||||
params ["_caller", "_target", "_listOfItemsToRemove", ["_doNotDropAmmo", false, [false]]]; //By default units drop all weapon mags when dropping a weapon
|
||||
|
||||
_fncSumArray = {
|
||||
_return = 0;
|
||||
private _fncSumArray = {
|
||||
private _return = 0;
|
||||
{_return = _return + _x;} count (_this select 0);
|
||||
_return
|
||||
};
|
||||
@ -39,7 +37,7 @@ if (_doNotDropAmmo && {({_x in _listOfItemsToRemove} count (magazines _target))
|
||||
[_caller, _target, "Debug: Trying to drop magazine with _doNotDropAmmo flag"] call FUNC(eventTargetFinish);
|
||||
};
|
||||
|
||||
_holder = objNull;
|
||||
private _holder = objNull;
|
||||
|
||||
//If not dropping ammo, don't use an existing container
|
||||
if (!_doNotDropAmmo) then {
|
||||
@ -52,7 +50,7 @@ if (!_doNotDropAmmo) then {
|
||||
|
||||
//Create a new weapon holder
|
||||
if (isNull _holder) then {
|
||||
_dropPos = _target modelToWorld [0.4, 0.75, 0]; //offset someone unconscious isn't lying over it
|
||||
private _dropPos = _target modelToWorld [0.4, 0.75, 0]; //offset someone unconscious isn't lying over it
|
||||
_dropPos set [2, ((getPosASL _target) select 2)];
|
||||
_holder = createVehicle [DISARM_CONTAINER, _dropPos, [], 0, "CAN_COLLIDE"];
|
||||
_holder setPosASL _dropPos;
|
||||
@ -73,19 +71,19 @@ _holder setVariable [QGVAR(holderInUse), true];
|
||||
|
||||
|
||||
//Remove Magazines
|
||||
_targetMagazinesStart = magazinesAmmo _target;
|
||||
_holderMagazinesStart = magazinesAmmoCargo _holder;
|
||||
private _targetMagazinesStart = magazinesAmmo _target;
|
||||
private _holderMagazinesStart = magazinesAmmoCargo _holder;
|
||||
|
||||
{
|
||||
EXPLODE_2_PVT(_x,_xClassname,_xAmmo);
|
||||
_x params ["_xClassname", "_xAmmo"];
|
||||
if ((_xClassname in _listOfItemsToRemove) && {(getNumber (configFile >> "CfgMagazines" >> _xClassname >> "ACE_isUnique")) == 0}) then {
|
||||
_holder addMagazineAmmoCargo [_xClassname, 1, _xAmmo];
|
||||
_target removeMagazine _xClassname;
|
||||
};
|
||||
} forEach _targetMagazinesStart;
|
||||
|
||||
_targetMagazinesEnd = magazinesAmmo _target;
|
||||
_holderMagazinesEnd = magazinesAmmoCargo _holder;
|
||||
private _targetMagazinesEnd = magazinesAmmo _target;
|
||||
private _holderMagazinesEnd = magazinesAmmoCargo _holder;
|
||||
|
||||
//Verify Mags dropped from unit:
|
||||
if (({((_x select 0) in _listOfItemsToRemove) && {(getNumber (configFile >> "CfgMagazines" >> (_x select 0) >> "ACE_isUnique")) == 0}} count _targetMagazinesEnd) != 0) exitWith {
|
||||
@ -100,14 +98,14 @@ if (!([_targetMagazinesStart, _targetMagazinesEnd, _holderMagazinesStart, _holde
|
||||
};
|
||||
|
||||
//Remove Items, Assigned Items and NVG
|
||||
_holderItemsStart = getitemCargo _holder;
|
||||
_targetItemsStart = (assignedItems _target) + (items _target) - (weapons _target);
|
||||
private _holderItemsStart = getitemCargo _holder;
|
||||
private _targetItemsStart = (assignedItems _target) + (items _target) - (weapons _target);
|
||||
if ((headgear _target) != "") then {_targetItemsStart pushBack (headgear _target);};
|
||||
if ((goggles _target) != "") then {_targetItemsStart pushBack (goggles _target);};
|
||||
|
||||
|
||||
_addToCrateClassnames = [];
|
||||
_addToCrateCount = [];
|
||||
private _addToCrateClassnames = [];
|
||||
private _addToCrateCount = [];
|
||||
{
|
||||
if (_x in _listOfItemsToRemove) then {
|
||||
if (_x in (items _target)) then {
|
||||
@ -115,7 +113,7 @@ _addToCrateCount = [];
|
||||
} else {
|
||||
_target unlinkItem _x;
|
||||
};
|
||||
_index = _addToCrateClassnames find _x;
|
||||
private _index = _addToCrateClassnames find _x;
|
||||
if (_index != -1) then {
|
||||
_addToCrateCount set [_index, ((_addToCrateCount select _index) + 1)];
|
||||
} else {
|
||||
@ -130,8 +128,8 @@ _addToCrateCount = [];
|
||||
_holder addItemCargoGlobal [(_addToCrateClassnames select _forEachIndex), (_addToCrateCount select _forEachIndex)];
|
||||
} forEach _addToCrateClassnames;
|
||||
|
||||
_holderItemsEnd = getitemCargo _holder;
|
||||
_targetItemsEnd = (assignedItems _target) + (items _target) - (weapons _target);
|
||||
private _holderItemsEnd = getitemCargo _holder;
|
||||
private _targetItemsEnd = (assignedItems _target) + (items _target) - (weapons _target);
|
||||
if ((headgear _target) != "") then {_targetItemsEnd pushBack (headgear _target);};
|
||||
if ((goggles _target) != "") then {_targetItemsEnd pushBack (goggles _target);};
|
||||
|
||||
@ -158,7 +156,7 @@ if (((vest _target) != "") && {(vest _target) in _listOfItemsToRemove} && {(vest
|
||||
|
||||
//If holder is still empty, it will be 'garbage collected' while we wait for the drop 'action' to take place
|
||||
//So add a dummy item and just remove at the end
|
||||
_holderIsEmpty = ([_holder] call FUNC(getAllGearContainer)) isEqualTo [[],[]];
|
||||
private _holderIsEmpty = ([_holder] call FUNC(getAllGearContainer)) isEqualTo [[],[]];
|
||||
if (_holderIsEmpty) then {
|
||||
TRACE_1("Debug: adding dummy item to holder",_holder);
|
||||
_holder addItemCargoGlobal [DUMMY_ITEM, 1];
|
||||
@ -166,16 +164,14 @@ if (_holderIsEmpty) then {
|
||||
|
||||
//Start the PFEH to do the actions (which could take >1 frame)
|
||||
[{
|
||||
private ["_needToRemoveWeapon", "_needToRemoveMagazines", "_needToRemoveBackpack", "_needToRemoveVest", "_needToRemoveUniform", "_error", "_magsToPickup", "_index", "_magazinesInHolder"];
|
||||
params ["_args", "_pfID"];
|
||||
_args params ["_caller", "_target", "_listOfItemsToRemove", "_holder", "_holderIsEmpty", "_maxWaitTime", "_doNotDropAmmo", "_startingMagazines"];
|
||||
|
||||
PARAMS_2(_args,_pfID);
|
||||
EXPLODE_8_PVT(_args,_caller,_target,_listOfItemsToRemove,_holder,_holderIsEmpty,_maxWaitTime,_doNotDropAmmo,_startingMagazines);
|
||||
|
||||
_needToRemoveWeapon = ({_x in _listOfItemsToRemove} count (weapons _target)) > 0;
|
||||
_needToRemoveMagazines = ({_x in _listOfItemsToRemove} count (magazines _target)) > 0;
|
||||
_needToRemoveBackpack = ((backPack _target) != "") && {(backPack _target) in _listOfItemsToRemove};
|
||||
_needToRemoveVest = ((vest _target) != "") && {(vest _target) in _listOfItemsToRemove};
|
||||
_needToRemoveUniform = ((uniform _target) != "") && {(uniform _target) in _listOfItemsToRemove};
|
||||
private _needToRemoveWeapon = ({_x in _listOfItemsToRemove} count (weapons _target)) > 0;
|
||||
private _needToRemoveMagazines = ({_x in _listOfItemsToRemove} count (magazines _target)) > 0;
|
||||
private _needToRemoveBackpack = ((backPack _target) != "") && {(backPack _target) in _listOfItemsToRemove};
|
||||
private _needToRemoveVest = ((vest _target) != "") && {(vest _target) in _listOfItemsToRemove};
|
||||
private _needToRemoveUniform = ((uniform _target) != "") && {(uniform _target) in _listOfItemsToRemove};
|
||||
|
||||
if ((CBA_missionTime < _maxWaitTime) && {[_target] call FUNC(canBeDisarmed)} && {_needToRemoveWeapon || _needToRemoveMagazines || _needToRemoveBackpack}) then {
|
||||
//action drop weapons (keeps loaded magazine and attachements)
|
||||
@ -198,18 +194,18 @@ if (_holderIsEmpty) then {
|
||||
[_pfID] call CBA_fnc_removePerFrameHandler;
|
||||
|
||||
if (_doNotDropAmmo) then {
|
||||
_error = false;
|
||||
private _error = false;
|
||||
|
||||
_magsToPickup = +_startingMagazines;
|
||||
private _magsToPickup = +_startingMagazines;
|
||||
{
|
||||
_index = _magsToPickup find _x;
|
||||
private _index = _magsToPickup find _x;
|
||||
if (_index == -1) exitWith {_error = true; ERROR("More mags than when we started?")};
|
||||
_magsToPickup deleteAt _index;
|
||||
} forEach (magazinesAmmo _target);
|
||||
|
||||
_magazinesInHolder = magazinesAmmoCargo _holder;
|
||||
private _magazinesInHolder = magazinesAmmoCargo _holder;
|
||||
{
|
||||
_index = _magazinesInHolder find _x;
|
||||
private _index = _magazinesInHolder find _x;
|
||||
if (_index == -1) exitWith {_error = true; ERROR("Missing mag not in holder")};
|
||||
_magazinesInHolder deleteAt _index;
|
||||
} forEach _magsToPickup;
|
||||
|
@ -18,9 +18,7 @@
|
||||
|
||||
params ["_target"];
|
||||
|
||||
private ["_allItems", "_classnamesCount", "_index", "_uniqueClassnames"];
|
||||
|
||||
_allItems = (((items _target) + (assignedItems _target)) - (weapons _target)) + (weapons _target) + (magazines _target);
|
||||
private _allItems = (((items _target) + (assignedItems _target)) - (weapons _target)) + (weapons _target) + (magazines _target);
|
||||
|
||||
if ((backpack _target) != "") then {
|
||||
_allItems pushBack (backpack _target);
|
||||
@ -39,11 +37,11 @@ if ((goggles _target) != "") then {
|
||||
_allItems pushBack (goggles _target);
|
||||
};
|
||||
|
||||
_uniqueClassnames = [];
|
||||
_classnamesCount = [];
|
||||
private _uniqueClassnames = [];
|
||||
private _classnamesCount = [];
|
||||
//Filter unique and count
|
||||
{
|
||||
_index = _uniqueClassnames find _x;
|
||||
private _index = _uniqueClassnames find _x;
|
||||
if (_index != -1) then {
|
||||
_classnamesCount set [_index, ((_classnamesCount select _index) + 1)];
|
||||
} else {
|
||||
|
@ -48,7 +48,6 @@ GVAR(disarmTarget) = _target;
|
||||
|
||||
//Setup PFEH
|
||||
[{
|
||||
private ["_groundContainer", "_targetContainer", "_playerName", "_icon", "_rankPicture", "_targetUniqueItems", "_holderUniqueItems", "_holder"];
|
||||
disableSerialization;
|
||||
params ["_args", "_idPFH"];
|
||||
_args params ["_player", "_target", "_display"];
|
||||
@ -62,13 +61,13 @@ GVAR(disarmTarget) = _target;
|
||||
if (!isNull _display) then { closeDialog 0; }; //close dialog if still open
|
||||
} else {
|
||||
|
||||
_groundContainer = _display displayCtrl 632;
|
||||
_targetContainer = _display displayCtrl 633;
|
||||
_playerName = _display displayCtrl 111;
|
||||
_rankPicture = _display displayCtrl 1203;
|
||||
private _groundContainer = _display displayCtrl 632;
|
||||
private _targetContainer = _display displayCtrl 633;
|
||||
private _playerName = _display displayCtrl 111;
|
||||
private _rankPicture = _display displayCtrl 1203;
|
||||
|
||||
//Show rank and name (just like BIS's inventory)
|
||||
_icon = format [DEFUALTPATH, toLower (rank _target)];
|
||||
private _icon = format [DEFUALTPATH, toLower (rank _target)];
|
||||
if (_icon isEqualTo DEFUALTPATH) then {_icon = ""};
|
||||
_rankPicture ctrlSetText _icon;
|
||||
_playerName ctrlSetText ([GVAR(disarmTarget), false, true] call EFUNC(common,getName));
|
||||
@ -78,11 +77,11 @@ GVAR(disarmTarget) = _target;
|
||||
lbClear _targetContainer;
|
||||
|
||||
//Show the items in the ground disarmTarget's inventory
|
||||
_targetUniqueItems = [GVAR(disarmTarget)] call FUNC(getAllGearUnit);
|
||||
private _targetUniqueItems = [GVAR(disarmTarget)] call FUNC(getAllGearUnit);
|
||||
[_targetContainer, _targetUniqueItems] call FUNC(showItemsInListbox);
|
||||
|
||||
//Try to find a holder that the target is using to drop items into:
|
||||
_holder = objNull;
|
||||
private _holder = objNull;
|
||||
{
|
||||
if ((_x getVariable [QGVAR(disarmUnit), objNull]) == _target) exitWith {
|
||||
_holder = _x;
|
||||
@ -91,7 +90,7 @@ GVAR(disarmTarget) = _target;
|
||||
|
||||
//If a holder exists, show it's inventory
|
||||
if (!isNull _holder) then {
|
||||
_holderUniqueItems = [_holder] call FUNC(getAllGearContainer);
|
||||
private _holderUniqueItems = [_holder] call FUNC(getAllGearContainer);
|
||||
[_groundContainer, _holderUniqueItems] call FUNC(showItemsInListbox);
|
||||
};
|
||||
};
|
||||
|
@ -26,7 +26,7 @@ params ["_listBoxCtrl", "_itemsCountArray"];
|
||||
private _count = (_itemsCountArray select 1) select _forEachIndex;
|
||||
|
||||
if ((_classname != DUMMY_ITEM) && {_classname != "ACE_FakePrimaryWeapon"}) then { //Don't show the dummy potato or fake weapon
|
||||
private "_configPath";
|
||||
private _configPath = configNull;
|
||||
private _displayName = "";
|
||||
private _picture = "";
|
||||
switch (true) do {
|
||||
|
@ -21,7 +21,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_4(_startA,_endA,_startB,_endB);
|
||||
params ["_startA", "_endA", "_startB", "_endB"];
|
||||
|
||||
//Quick Lazy Count Check
|
||||
if (((count _startA) + (count _startB)) != ((count _endA) + (count _endB))) exitWith {
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
params ["_unit", "_target"];
|
||||
|
||||
if !([_unit, _target, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
if !([_unit, _target, ["isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
|
||||
// a static weapon has to be empty for dragging (ignore UAV AI)
|
||||
if ((typeOf _target) isKindOf "StaticWeapon" && {{(getText (configFile >> "CfgVehicles" >> (typeOf _x) >> "simulation")) != "UAVPilot"} count crew _target > 0}) exitWith {false};
|
||||
|
@ -18,6 +18,6 @@
|
||||
|
||||
params ["_unit", "_target"];
|
||||
|
||||
if !([_unit, _target, ["isNotDragging"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
if !([_unit, _target, ["isNotDragging", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
|
||||
_unit getVariable [QGVAR(draggedObject), objNull] == _target
|
||||
|
@ -58,7 +58,7 @@ if (_inBuilding) then {
|
||||
_unit setVariable [QGVAR(isDragging), false, true];
|
||||
_unit setVariable [QGVAR(draggedObject), objNull, true];
|
||||
|
||||
// make object accesable for other units
|
||||
// make object accessible for other units
|
||||
[objNull, _target, true] call EFUNC(common,claim);
|
||||
|
||||
if !(_target isKindOf "CAManBase") then {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user