mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Scopes - Add 'DISABLE_DISPERSION' helper flag
* Allows you to disable vanilla dispersion for testing purposes by defining 'DISABLE_DISPERSION'
This commit is contained in:
parent
91425f8576
commit
ce825ce8d3
@ -35,6 +35,10 @@ if (_initSpeedCoef < 0) then {
|
||||
private _zeroAngle = "ace_advanced_ballistics" callExtension format ["replicateVanillaZero:%1:%2:%3", _oldZeroRange, _initSpeed, _airFriction];
|
||||
private _vanillaZero = parseNumber _zeroAngle;
|
||||
|
||||
#ifdef DISABLE_DISPERSION
|
||||
_vanillaZero = 0;
|
||||
#endif
|
||||
|
||||
private _trueZero = if (!_advancedBallistics) then {
|
||||
_zeroAngle = "ace_advanced_ballistics" callExtension format ["calcZero:%1:%2:%3:%4", _newZeroRange, _initSpeed, _airFriction, _boreHeight];
|
||||
(parseNumber _zeroAngle)
|
||||
|
@ -41,6 +41,9 @@ if (GVAR(correctZeroing)) then {
|
||||
_zeroCorrection = [_oldZeroRange, _newZeroRange, _boreHeight, _weapon, _ammo, _magazine, _advancedBallistics] call FUNC(calculateZeroAngleCorrection);
|
||||
};
|
||||
_zeroing = _zeroing vectorAdd [0, 0, _zeroCorrection - _baseAngle];
|
||||
#ifdef DISABLE_DISPERSION
|
||||
_projectile setVelocity (_unit weaponDirection currentWeapon _unit) vectorMultiply (vectorMagnitude (velocity _projectile));
|
||||
#endif
|
||||
};
|
||||
|
||||
if (_zeroing isEqualTo [0, 0, 0]) exitWith {};
|
||||
|
@ -16,6 +16,8 @@
|
||||
|
||||
#define DEFAULT_RAIL_BASE_ANGLE 0.0086
|
||||
|
||||
// #define DISABLE_DISPERSION
|
||||
|
||||
#ifdef DEBUG_ENABLED_SCOPES
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user