mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Reorder the fireEH function to allow particle effects for nearby remote players. Add a setting for that (default off).
This commit is contained in:
parent
8b7ed38990
commit
9bcabd081b
@ -13,6 +13,13 @@ class ACE_Settings {
|
|||||||
displayName = CSTRING(showParticleEffects_displayName);
|
displayName = CSTRING(showParticleEffects_displayName);
|
||||||
description = CSTRING(showParticleEffects_description);
|
description = CSTRING(showParticleEffects_description);
|
||||||
};
|
};
|
||||||
|
class GVAR(showParticleEffectsForEveryone) {
|
||||||
|
typeName = "BOOL";
|
||||||
|
isClientSettable = 1;
|
||||||
|
value = 0;
|
||||||
|
displayName = CSTRING(showParticleEffectsForEveryone_displayName);
|
||||||
|
description = CSTRING(showParticleEffectsForEveryone_description);
|
||||||
|
};
|
||||||
class GVAR(overheatingDispersion) {
|
class GVAR(overheatingDispersion) {
|
||||||
typeName = "BOOL";
|
typeName = "BOOL";
|
||||||
value = 1;
|
value = 1;
|
||||||
|
@ -88,24 +88,11 @@ if (GVAR(overheatingDispersion)) then {
|
|||||||
TRACE_PROJECTILE_INFO(_projectile);
|
TRACE_PROJECTILE_INFO(_projectile);
|
||||||
};
|
};
|
||||||
|
|
||||||
// ------ LOCAL PLAYER ONLY ------------
|
|
||||||
// Only compute jamming and show Visual Effects for the local player
|
|
||||||
if (_unit != ACE_player) exitWith {END_COUNTER(firedEH);};
|
|
||||||
|
|
||||||
_jamChance = _jamChance * ([[0.5, 1.5, 7.5, 37.5], 3 * _scaledTemperature] call EFUNC(common,interpolateFromArray));
|
// ------ LOCAL AND NEARBY PLAYERS DEPENDING ON SETTINGS ------------
|
||||||
|
// Particle effects only apply to the local player and, depending on settings, to other nearby players
|
||||||
// increase jam chance on dusty grounds if prone (and at ground level)
|
if (_unit != ACE_player && (!GVAR(showParticleEffectsForEveryone) || {_unit distance ACE_player > 20})) exitWith {
|
||||||
if ((stance _unit == "PRONE") && {((getPosATL _unit) select 2) < 1}) then {
|
END_COUNTER(firedEH);
|
||||||
private _surface = configFile >> "CfgSurfaces" >> ((surfaceType getPosASL _unit) select [1]);
|
|
||||||
if (isClass _surface) then {
|
|
||||||
TRACE_1("dust",getNumber (_surface >> "dust"));
|
|
||||||
_jamChance = _jamChance + (getNumber (_surface >> "dust")) * _jamChance;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
TRACE_3("check for random jam",_unit,_weapon,_jamChance);
|
|
||||||
if ((random 1) < _jamChance) then {
|
|
||||||
[_unit, _weapon] call FUNC(jamWeapon);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//Particle Effects:
|
//Particle Effects:
|
||||||
@ -134,4 +121,24 @@ if (GVAR(showParticleEffects) && {(ACE_time > ((_unit getVariable [QGVAR(lastDro
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// ------ LOCAL PLAYER ONLY ------------
|
||||||
|
// Only compute jamming for the local player
|
||||||
|
if (_unit != ACE_player) exitWith {END_COUNTER(firedEH);};
|
||||||
|
|
||||||
|
_jamChance = _jamChance * ([[0.5, 1.5, 7.5, 37.5], 3 * _scaledTemperature] call EFUNC(common,interpolateFromArray));
|
||||||
|
|
||||||
|
// increase jam chance on dusty grounds if prone (and at ground level)
|
||||||
|
if ((stance _unit == "PRONE") && {((getPosATL _unit) select 2) < 1}) then {
|
||||||
|
private _surface = configFile >> "CfgSurfaces" >> ((surfaceType getPosASL _unit) select [1]);
|
||||||
|
if (isClass _surface) then {
|
||||||
|
TRACE_1("dust",getNumber (_surface >> "dust"));
|
||||||
|
_jamChance = _jamChance + (getNumber (_surface >> "dust")) * _jamChance;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
TRACE_3("check for random jam",_unit,_weapon,_jamChance);
|
||||||
|
if ((random 1) < _jamChance) then {
|
||||||
|
[_unit, _weapon] call FUNC(jamWeapon);
|
||||||
|
};
|
||||||
|
|
||||||
END_COUNTER(firedEH);
|
END_COUNTER(firedEH);
|
||||||
|
@ -31,6 +31,12 @@
|
|||||||
<Key ID="STR_ACE_Overheating_showParticleEffects_description">
|
<Key ID="STR_ACE_Overheating_showParticleEffects_description">
|
||||||
<English>Show particle effects when weapon overheats</English>
|
<English>Show particle effects when weapon overheats</English>
|
||||||
</Key>
|
</Key>
|
||||||
|
<Key ID="showParticleEffectsForEveryone_displayName">
|
||||||
|
<English>Overheating Particle Effects for everyone</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="showParticleEffectsForEveryone_description">
|
||||||
|
<English>Show particle effects when other players weapon overheats</English>
|
||||||
|
</Key>
|
||||||
<Key ID="STR_ACE_Overheating_overheatingDispersion_displayName">
|
<Key ID="STR_ACE_Overheating_overheatingDispersion_displayName">
|
||||||
<English>Overheating Dispersion</English>
|
<English>Overheating Dispersion</English>
|
||||||
</Key>
|
</Key>
|
||||||
|
Loading…
Reference in New Issue
Block a user