tweak friction

This commit is contained in:
PabstMirror 2019-03-16 00:04:39 -05:00
parent 1d2ecdd3ff
commit 8c8e8fe199
4 changed files with 8 additions and 4 deletions

View File

@ -30,8 +30,8 @@ if ((_vehicle turretUnit [0]) != _gunner) exitWith {};
// Get airFriction
private _airFriction = -0.00005;
if (!isNull (configFile >> "CfgMagazines" >> _magazine >> QGVAR(airFriction))) then {
private _airFriction = DEFAULT_AIR_FRICTION;
if (isNumber (configFile >> "CfgMagazines" >> _magazine >> QGVAR(airFriction))) then {
_airFriction = getNumber (configFile >> "CfgMagazines" >> _magazine >> QGVAR(airFriction));
};
TRACE_1("",_airFriction);

View File

@ -42,7 +42,7 @@ _mags = _mags apply {
_magParamsArray pushBackUnique _initSpeed;
private _airFriction = 0;
if (_advCorrection) then {
_airFriction = if (isNumber (_magCfg >> _x >> QGVAR(airFriction))) then { getNumber (_magCfg >> _x >> QGVAR(airFriction)) } else { -0.00005 };
_airFriction = if (isNumber (_magCfg >> _x >> QGVAR(airFriction))) then { getNumber (_magCfg >> _x >> QGVAR(airFriction)) } else { DEFAULT_AIR_FRICTION };
};
_magParamsArray pushBackUnique _airFriction;
[getText (_magCfg >> _x >> "displayNameShort"), getText (_magCfg >> _x >> "displayName"), _initSpeed, _airFriction]

View File

@ -43,7 +43,7 @@ if ((alive _player) && {_showGunLaying > 0} && {_player == gunner _vehicle}) the
// Ugh, see FUNC(turretPFEH) for why this is needed
private _useAltElevation = (_showGunLaying == 2)
|| {(["Mortar_01_base_F", "rhs_2b14_82mm_Base", "RHS_M252_Base", "CUP_B_M1129_MC_MK19_Desert"] findIf {_typeOf isKindOf _x}) > -1;};
|| {(["Mortar_01_base_F", "rhs_2b14_82mm_Base", "RHS_M252_Base", "CUP_B_M1129_MC_MK19_Desert", "LIB_GrWr34", "LIB_BM37"] findIf {_typeOf isKindOf _x}) > -1;};
private _weaponsTurret = _vehicle weaponsTurret _turret;
if ((count _weaponsTurret) != 1) then { WARNING_2("not singular weapon in turret - %1 - %2",_typeOf,_turret); };

View File

@ -8,6 +8,10 @@
#include "\z\ace\addons\main\script_macros.hpp"
// This is a good fit for most large artillery, but a little low for lighter mortars
#define DEFAULT_AIR_FRICTION -0.00006
#define DEGTOMILS 17.7777778
#define IDC_MODECONTROLGROUP 1000