mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
more goggles code cleanup
This commit is contained in:
parent
2731ac360a
commit
477e9f06b6
@ -49,7 +49,7 @@ FUNC(CheckGlasses) = {
|
||||
player addEventHandler ["Explosion", {
|
||||
private "_effects";
|
||||
if (alive ace_player) then {
|
||||
call FUNC(ApplyDirtEffect);
|
||||
call FUNC(ApplyDirt);
|
||||
if (GETBROKEN) exitWith {};
|
||||
if (((_this select 1) call FUNC(GetExplosionIndex)) < getNumber(ConfigFile >> "CfgGlasses" >> GVAR(Current) >> "ACE_Resistance")) exitWith {};
|
||||
if !([ace_player] call FUNC(isGogglesVisible)) exitWith {["GlassesCracked",[ace_player]] call EFUNC(common,localEvent);};
|
||||
@ -90,7 +90,7 @@ player AddEventHandler ["Put", {call FUNC(checkGlasses);}];
|
||||
if (call FUNC(ExternalCamera)) exitWith {call FUNC(RemoveGlassesEffect)};
|
||||
|
||||
if ([ace_player] call FUNC(isGogglesVisible)) then {
|
||||
[_this select 0] call FUNC(applyGlassesEffect);
|
||||
[_this select 0] call FUNC(applyGlasses);
|
||||
} else {
|
||||
call FUNC(removeGlassesEffect);
|
||||
};
|
||||
|
@ -7,9 +7,9 @@ PREP(handleFired);
|
||||
PREP(handleKilled);
|
||||
|
||||
|
||||
PREP(applyDirtEffect);
|
||||
PREP(applyDirt);
|
||||
PREP(applyDust);
|
||||
PREP(applyGlassesEffect);
|
||||
PREP(applyGlasses);
|
||||
|
||||
PREP(checkGoggles);
|
||||
PREP(clearGlasses);
|
||||
|
@ -9,7 +9,7 @@
|
||||
* Succeeded <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* _applied = call ace_goggles_fnc_ApplyDirtEffect;
|
||||
* _applied = call ace_goggles_fnc_ApplyDirt;
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
@ -11,7 +11,7 @@
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [goggles ace_player] call ace_goggles_fnc_ApplyGlassesEffect;
|
||||
* [goggles ace_player] call ace_goggles_fnc_ApplyGlasses
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
@ -46,7 +46,7 @@ if (_glassImagePath != "") then {
|
||||
};
|
||||
|
||||
if GETDIRT then {
|
||||
call FUNC(applyDirtEffect);
|
||||
call FUNC(applyDirt);
|
||||
};
|
||||
|
||||
if GETDUSTT(DACTIVE) then {
|
@ -35,7 +35,7 @@ if (true) then {
|
||||
};
|
||||
};
|
||||
if !(GVAR(EffectsActive)) then {
|
||||
[goggles ace_player] call FUNC(applyGlassesEffect);
|
||||
[goggles ace_player] call FUNC(applyGlasses);
|
||||
} else {
|
||||
if ([goggles ace_player] call FUNC(isDivingGoggles) && {underwater ace_player}) then {
|
||||
call FUNC(removeRainEffect);
|
||||
|
@ -28,7 +28,7 @@ private ["_position", "_particleConfig", "_cloudType", "_surface", "_bullets"];
|
||||
// check if the unit really is on the ground and not in a building
|
||||
_position = getPosATL _unit;
|
||||
|
||||
if (_position select 2 > 0.2) exitWith {};
|
||||
if (_position select 2 > 0.2) exitWith {true};
|
||||
|
||||
// get weapon dust effect
|
||||
_particleConfig = configFile >> "CfgWeapons" >> _weapon >> "GunParticles";
|
||||
@ -57,7 +57,7 @@ if (_surface != GVAR(surfaceCache)) then {
|
||||
};
|
||||
|
||||
// quit if surface isn't dusty
|
||||
if (!GVAR(surfaceCacheIsDust)) exitWith {};
|
||||
if (!GVAR(surfaceCacheIsDust)) exitWith {true};
|
||||
|
||||
// increment dust value with type bullet
|
||||
_bullets = GETDUSTT(DBULLETS);
|
||||
|
Loading…
Reference in New Issue
Block a user