Added AdvancedBallistics module options

This commit is contained in:
ulteq 2015-04-11 22:34:19 +02:00
parent b4e36b5fab
commit 05f14d6242
3 changed files with 34 additions and 7 deletions

View File

@ -7,5 +7,31 @@ class CfgVehicles {
scope = 2;
isGlobal = 1;
icon = QUOTE(PATHTOF(UI\Icon_Module_Wind_ca.paa));
class Arguments {
class enabled {
displayName = "Advanced Ballistics";
description = "Enable Advanced Ballistics?";
typeName = "BOOL";
defaultValue = 0;
};
class enableAmmoTemperatureSimulation {
displayName = "Enable Ammo Temperature";
description = "Muzzle velocity varies with ammo temperature";
typeName = "BOOL";
defaultValue = 1;
};
class enableBarrelLengthSimulation {
displayName = "Enable Barrel Length";
description = "Muzzle velocity varies with barrel length";
typeName = "BOOL";
defaultValue = 1;
};
class enableBulletTraceEffect {
displayName = "Enable Bullet Trace";
description = "Enables the bullet trace effect";
typeName = "BOOL";
defaultValue = 1;
};
};
};
};

View File

@ -5,6 +5,11 @@
// AB is disabled by default
GVAR(enabled) = false;
//GVAR(VehicleGunnerEnabled) = true; // TODO: We currently do not have firedEHs on vehicles
GVAR(AmmoTemperatureEnabled) = true;
GVAR(BarrelLengthInfluenceEnabled) = true;
GVAR(BulletTraceEnabled) = true;
GVAR(bulletDatabase) = [];
GVAR(bulletDatabaseStartTime) = [];
GVAR(bulletDatabaseSpeed) = [];
@ -21,19 +26,15 @@ GVAR(WindInfoStart) = time;
GVAR(Protractor) = false;
GVAR(ProtractorStart) = time;
GVAR(SimulationPrecision) = 1;
// Those are only used in the pure sqf version (extension free PFH)
GVAR(SimulationPrecision) = 2;
GVAR(WindEnabled) = true;
GVAR(SpinDriftEnabled) = true;
GVAR(CoriolisEnabled) = true;
GVAR(EoetvoesEnabled) = true;
GVAR(AdvancedAirDragEnabled) = true;
GVAR(TransonicRegionEnabled) = true;
GVAR(AmmoTemperatureEnabled) = true;
GVAR(BulletTraceEnabled) = true;
GVAR(AtmosphericDensitySimulationEnabled) = true;
GVAR(BarrelLengthInfluenceEnabled) = true;
GVAR(VehicleGunnerEnabled) = true;
GVAR(currentGrid) = 0;
GVAR(INIT_MESSAGE_ENABLED) = false;

View File

@ -36,7 +36,7 @@ if (underwater _unit) exitWith {};
if (!(_ammo isKindOf "BulletBase")) exitWith {};
if (_unit distanceSqr ACE_player > 9000000) exitWith {};
if (GVAR(ONLY_ACTIVE_FOR_LOCAL_PLAYER) && _unit != ACE_player) exitWith {};
if (!GVAR(VehicleGunnerEnabled) && !(_unit isKindOf "Man")) exitWith {};
//if (!GVAR(VehicleGunnerEnabled) && !(_unit isKindOf "Man")) exitWith {};
if (GVAR(DISABLED_IN_FULL_AUTO_MODE) && getNumber(configFile >> "cfgWeapons" >> _weapon >> _mode >> "autoFire") == 1) exitWith {};
// Decide whether normal winddeflection is good enough