mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Added a new module option for advanced ballistics:
* alwaysSimulateForGroupMembers
This commit is contained in:
parent
9e8283ebab
commit
96b92ac172
@ -11,6 +11,12 @@ class ACE_Settings {
|
|||||||
typeName = "BOOL";
|
typeName = "BOOL";
|
||||||
value = 1;
|
value = 1;
|
||||||
};
|
};
|
||||||
|
class GVAR(alwaysSimulateForGroupMembers) {
|
||||||
|
displayName = "Always Enabled For Group Members";
|
||||||
|
description = "Always enables advanced ballistics when a group member fires";
|
||||||
|
typeName = "BOOL";
|
||||||
|
value = 0;
|
||||||
|
};
|
||||||
class GVAR(disabledInFullAutoMode) {
|
class GVAR(disabledInFullAutoMode) {
|
||||||
displayName = "Disabled In FullAuto Mode";
|
displayName = "Disabled In FullAuto Mode";
|
||||||
description = "Disables the advanced ballistics during full auto fire";
|
description = "Disables the advanced ballistics during full auto fire";
|
||||||
|
@ -23,6 +23,12 @@ class CfgVehicles {
|
|||||||
typeName = "BOOL";
|
typeName = "BOOL";
|
||||||
defaultValue = 1;
|
defaultValue = 1;
|
||||||
};
|
};
|
||||||
|
class alwaysSimulateForGroupMembers {
|
||||||
|
displayName = "$STR_ACE_AdvancedBallistics_alwaysSimulateForGroupMembers_DisplayName";
|
||||||
|
description = "$STR_ACE_AdvancedBallistics_alwaysSimulateForGroupMembers_Description";
|
||||||
|
typeName = "BOOL";
|
||||||
|
defaultValue = 0;
|
||||||
|
};
|
||||||
class disabledInFullAutoMode {
|
class disabledInFullAutoMode {
|
||||||
displayName = "$STR_ACE_AdvancedBallistics_disabledInFullAutoMod_DisplayName";
|
displayName = "$STR_ACE_AdvancedBallistics_disabledInFullAutoMod_DisplayName";
|
||||||
description = "$STR_ACE_AdvancedBallistics_disabledInFullAutoMod_Description";
|
description = "$STR_ACE_AdvancedBallistics_disabledInFullAutoMod_Description";
|
||||||
|
@ -36,15 +36,17 @@ if (underwater _unit) exitWith {};
|
|||||||
if (!(_ammo isKindOf "BulletBase")) exitWith {};
|
if (!(_ammo isKindOf "BulletBase")) exitWith {};
|
||||||
if (_unit distance ACE_player > GVAR(simulationRadius)) exitWith {};
|
if (_unit distance ACE_player > GVAR(simulationRadius)) exitWith {};
|
||||||
if (GVAR(onlyActiveForLocalPlayers) && !(local _unit)) then {
|
if (GVAR(onlyActiveForLocalPlayers) && !(local _unit)) then {
|
||||||
if (GVAR(alwaysSimulateForSnipers)) then {
|
|
||||||
// The shooter is non local
|
// The shooter is non local
|
||||||
|
_abort = true;
|
||||||
|
if (GVAR(alwaysSimulateForSnipers)) then {
|
||||||
if (currentWeapon _unit == primaryWeapon _unit && count primaryWeaponItems _unit > 2) then {
|
if (currentWeapon _unit == primaryWeapon _unit && count primaryWeaponItems _unit > 2) then {
|
||||||
_opticsName = (primaryWeaponItems _unit) select 2;
|
_opticsName = (primaryWeaponItems _unit) select 2;
|
||||||
_opticType = getNumber(configFile >> "CfgWeapons" >> _opticsName >> "ItemInfo" >> "opticType");
|
_opticType = getNumber(configFile >> "CfgWeapons" >> _opticsName >> "ItemInfo" >> "opticType");
|
||||||
_abort = _opticType != 2; // We only abort if the non local shooter is not a sniper
|
_abort = _opticType != 2; // We only abort if the non local shooter is not a sniper
|
||||||
};
|
};
|
||||||
} else {
|
};
|
||||||
_abort = true;
|
if (GVAR(alwaysSimulateForGroupMembers) && _abort) then {
|
||||||
|
_abort = (group ACE_player) != (group _unit);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
//if (!GVAR(vehicleGunnerEnabled) && !(_unit isKindOf "Man")) then { _abort = true; }; // We currently do not have firedEHs on vehicles
|
//if (!GVAR(vehicleGunnerEnabled) && !(_unit isKindOf "Man")) then { _abort = true; }; // We currently do not have firedEHs on vehicles
|
||||||
|
@ -29,6 +29,7 @@ if !(_activated) exitWith {};
|
|||||||
[_logic, QGVAR(onlyActiveForLocalPlayers), "onlyActiveForLocalPlayers"] call EFUNC(common,readSettingFromModule);
|
[_logic, QGVAR(onlyActiveForLocalPlayers), "onlyActiveForLocalPlayers"] call EFUNC(common,readSettingFromModule);
|
||||||
[_logic, QGVAR(disabledInFullAutoMode), "disabledInFullAutoMode"] call EFUNC(common,readSettingFromModule);
|
[_logic, QGVAR(disabledInFullAutoMode), "disabledInFullAutoMode"] call EFUNC(common,readSettingFromModule);
|
||||||
[_logic, QGVAR(alwaysSimulateForSnipers), "alwaysSimulateForSnipers"] call EFUNC(common,readSettingFromModule);
|
[_logic, QGVAR(alwaysSimulateForSnipers), "alwaysSimulateForSnipers"] call EFUNC(common,readSettingFromModule);
|
||||||
|
[_logic, QGVAR(alwaysSimulateForGroupMembers), "alwaysSimulateForGroupMembers"] call EFUNC(common,readSettingFromModule);
|
||||||
[_logic, QGVAR(simulationInterval), "simulationInterval"] call EFUNC(common,readSettingFromModule);
|
[_logic, QGVAR(simulationInterval), "simulationInterval"] call EFUNC(common,readSettingFromModule);
|
||||||
[_logic, QGVAR(simulationRadius), "simulationRadius"] call EFUNC(common,readSettingFromModule);
|
[_logic, QGVAR(simulationRadius), "simulationRadius"] call EFUNC(common,readSettingFromModule);
|
||||||
|
|
||||||
|
@ -45,6 +45,12 @@
|
|||||||
<English>Always enables advanced ballistics when high power optics are used</English>
|
<English>Always enables advanced ballistics when high power optics are used</English>
|
||||||
<Polish>Aktywuje zaawansowaną balistykę zawsze, kiedy używana jest optyka</Polish>
|
<Polish>Aktywuje zaawansowaną balistykę zawsze, kiedy używana jest optyka</Polish>
|
||||||
</Key>
|
</Key>
|
||||||
|
<Key ID="STR_ACE_AdvancedBallistics_alwaysSimulateForGroupMembers_DisplayName">
|
||||||
|
<English>Always Enabled For Group Members</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_AdvancedBallistics_alwaysSimulateForGroupMembers_Description">
|
||||||
|
<English>Always enables advanced ballistics when a group member fires</English>
|
||||||
|
</Key>
|
||||||
<Key ID="STR_ACE_AdvancedBallistics_disabledInFullAutoMod_DisplayName">
|
<Key ID="STR_ACE_AdvancedBallistics_disabledInFullAutoMod_DisplayName">
|
||||||
<English>Disabled In FullAuto Mode</English>
|
<English>Disabled In FullAuto Mode</English>
|
||||||
<Polish>Wył. podczas ognia auto.</Polish>
|
<Polish>Wył. podczas ognia auto.</Polish>
|
||||||
|
Loading…
Reference in New Issue
Block a user