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