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
d1aacf3fef
commit
b7ce315240
@ -12,12 +12,16 @@ PREP(removeDustEffect);
|
|||||||
PREP(removeGlassesEffect);
|
PREP(removeGlassesEffect);
|
||||||
PREP(removeRainEffect);
|
PREP(removeRainEffect);
|
||||||
|
|
||||||
// general
|
// public
|
||||||
PREP(externalCamera);
|
PREP(externalCamera);
|
||||||
PREP(isDivingGoggles);
|
PREP(isDivingGoggles);
|
||||||
PREP(isGogglesVisible);
|
PREP(isGogglesVisible);
|
||||||
PREP(isInRotorWash);
|
|
||||||
|
// general
|
||||||
|
PREP(clearGlasses);
|
||||||
|
PREP(dustHandler);
|
||||||
PREP(getExplosionIndex);
|
PREP(getExplosionIndex);
|
||||||
|
PREP(isInRotorWash);
|
||||||
|
|
||||||
// eventhandlers
|
// eventhandlers
|
||||||
PREP(handleExplosion);
|
PREP(handleExplosion);
|
||||||
@ -27,10 +31,8 @@ PREP(handleKilled);
|
|||||||
|
|
||||||
|
|
||||||
PREP(checkGoggles);
|
PREP(checkGoggles);
|
||||||
PREP(clearGlasses);
|
|
||||||
PREP(dustHandler);
|
|
||||||
|
|
||||||
PREP(onEachFrame);
|
PREP(onEachFrame);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ADDON = true;
|
ADDON = true;
|
||||||
|
@ -10,27 +10,31 @@
|
|||||||
* None
|
* None
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* call ace_goggles_fnc_ClearGlasses;
|
* call ace_goggles_fnc_clearGlasses
|
||||||
*
|
*
|
||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_broken", "_effects"];
|
private ["_unit", "_broken", "_effects"];
|
||||||
|
|
||||||
|
_unit = ACE_player;
|
||||||
|
|
||||||
_broken = GETBROKEN;
|
_broken = GETBROKEN;
|
||||||
_effects = GLASSESDEFAULT;
|
_effects = GLASSESDEFAULT;
|
||||||
_effects set [BROKEN, _broken];
|
_effects set [BROKEN, _broken];
|
||||||
SETGLASSES(ace_player,_effects);
|
|
||||||
|
|
||||||
if ((stance ace_player) != "PRONE") then {
|
SETGLASSES(_unit,_effects);
|
||||||
ace_player playActionNow "gestureWipeFace";
|
|
||||||
|
if (stance _unit != "PRONE") then {
|
||||||
|
_unit playActionNow "gestureWipeFace";
|
||||||
};
|
};
|
||||||
|
|
||||||
[{
|
[{
|
||||||
if (cameraView == "INTERNAL") then {
|
if (cameraView == "INTERNAL") then {
|
||||||
addCamShake [5, 1.75, 2];
|
addCamShake [5, 1.75, 2];
|
||||||
};
|
};
|
||||||
}, [], 0.3, 0] call EFUNC(common,waitAndExecute);
|
}, [], 0.3] call EFUNC(common,waitAndExecute);
|
||||||
|
|
||||||
call FUNC(removeDirtEffect);
|
call FUNC(removeDirtEffect);
|
||||||
call FUNC(removeRainEffect);
|
call FUNC(removeRainEffect);
|
||||||
|
@ -9,11 +9,12 @@
|
|||||||
* None
|
* None
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* call ace_goggles_fnc_removeDirtEffect;
|
* call ace_goggles_fnc_removeDirtEffect
|
||||||
*
|
*
|
||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
if (!isNull(GETUVAR(GVAR(DisplayEffects),displayNull))) then {
|
|
||||||
|
if (!isNull (GETUVAR(GVAR(DisplayEffects),displayNull))) then {
|
||||||
(GETUVAR(GVAR(DisplayEffects),displayNull) displayCtrl 10660) ctrlSetText "";
|
(GETUVAR(GVAR(DisplayEffects),displayNull) displayCtrl 10660) ctrlSetText "";
|
||||||
};
|
};
|
||||||
|
@ -9,11 +9,12 @@
|
|||||||
* None
|
* None
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* call ace_goggles_fnc_removeDustEffect;
|
* call ace_goggles_fnc_removeDustEffect
|
||||||
*
|
*
|
||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
if (!isNull(GETUVAR(GVAR(DisplayEffects),displayNull))) then {
|
|
||||||
|
if (!isNull (GETUVAR(GVAR(DisplayEffects),displayNull))) then {
|
||||||
(GETUVAR(GVAR(DisplayEffects),displayNull) displayCtrl 10662) ctrlSetText "";
|
(GETUVAR(GVAR(DisplayEffects),displayNull) displayCtrl 10662) ctrlSetText "";
|
||||||
};
|
};
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Author: Garth 'L-H' de Wet
|
* Author: Garth 'L-H' de Wet
|
||||||
* Removes the glasses effect from the screen, removes dirt effect, removes rain effect,
|
* Removes the glasses effect from the screen, removes dirt effect, removes rain effect, removes dust effect. Does not reset array (glasses will still be broken, dirty, ect.)
|
||||||
* removes dust effect. Does not reset array (glasses will still be broken, dirty, ect.)
|
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* None
|
* None
|
||||||
@ -10,15 +9,16 @@
|
|||||||
* None
|
* None
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* call ace_goggles_fnc_removeGlassesEffect;
|
* call ace_goggles_fnc_removeGlassesEffect
|
||||||
*
|
*
|
||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
GVAR(EffectsActive) = false;
|
GVAR(EffectsActive) = false;
|
||||||
GVAR(PostProcess) ppEffectEnable false;
|
GVAR(PostProcess) ppEffectEnable false;
|
||||||
|
|
||||||
if (!isNull(GLASSDISPLAY)) then {
|
if (!isNull (GLASSDISPLAY)) then {
|
||||||
GLASSDISPLAY closeDisplay 0;
|
GLASSDISPLAY closeDisplay 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -9,13 +9,15 @@
|
|||||||
* None
|
* None
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* call ace_goggles_fnc_removeRainEffect;
|
* call ace_goggles_fnc_removeRainEffect
|
||||||
*
|
*
|
||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
if (!isNull (GVAR(RainDrops))) then {
|
|
||||||
deleteVehicle (GVAR(RainDrops));
|
if (!isNull GVAR(RainDrops)) then {
|
||||||
|
deleteVehicle GVAR(RainDrops);
|
||||||
};
|
};
|
||||||
|
|
||||||
GVAR(RainActive) = false;
|
GVAR(RainActive) = false;
|
||||||
GVAR(RainLastLevel) = 0;
|
GVAR(RainLastLevel) = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user