mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
replace zeusDisplayChanged with DisplayLoad event
This commit is contained in:
parent
4335bfbfcf
commit
f43e88ff25
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
class Extended_PreInit_EventHandlers {
|
class Extended_PreInit_EventHandlers {
|
||||||
class ADDON {
|
class ADDON {
|
||||||
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
||||||
@ -9,6 +10,13 @@ class Extended_PostInit_EventHandlers {
|
|||||||
init = QUOTE(call COMPILE_FILE(XEH_postInit));
|
init = QUOTE(call COMPILE_FILE(XEH_postInit));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class Extended_DisplayUnload_EventHandlers {
|
||||||
|
class RscDisplayCurator {
|
||||||
|
ADDON = QUOTE(call FUNC(handleZeusDisplayChanged));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
//release escorted captive when entering a vehicle
|
//release escorted captive when entering a vehicle
|
||||||
class Extended_GetIn_EventHandlers {
|
class Extended_GetIn_EventHandlers {
|
||||||
class All {
|
class All {
|
||||||
|
@ -18,7 +18,6 @@ if (isServer) then {
|
|||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
|
|
||||||
["zeusDisplayChanged", {_this call FUNC(handleZeusDisplayChanged)}] call EFUNC(common,addEventHandler);
|
|
||||||
["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);
|
["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);
|
||||||
["MoveInCaptive", {_this call FUNC(vehicleCaptiveMoveIn)}] call EFUNC(common,addEventHandler);
|
["MoveInCaptive", {_this call FUNC(vehicleCaptiveMoveIn)}] call EFUNC(common,addEventHandler);
|
||||||
["MoveOutCaptive", {_this call FUNC(vehicleCaptiveMoveOut)}] call EFUNC(common,addEventHandler);
|
["MoveOutCaptive", {_this call FUNC(vehicleCaptiveMoveOut)}] call EFUNC(common,addEventHandler);
|
||||||
|
@ -17,15 +17,10 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
params ["_unit","_zeusIsOpen"];
|
if ((ACE_player getVariable [QGVAR(isHandcuffed), false]) || {ACE_player getVariable [QGVAR(isSurrendering), false]}) then {
|
||||||
|
TRACE_1("Player Change (showHUD false)",ACE_player);
|
||||||
//set showHUD based on unit status:
|
|
||||||
if (!_zeusIsOpen) then {
|
|
||||||
if ((_unit getVariable [QGVAR(isHandcuffed), false]) || {_unit getVariable [QGVAR(isSurrendering), false]}) then {
|
|
||||||
TRACE_1("Player Change (showHUD false)",_unit);
|
|
||||||
["captive", [false, false, false, false, false, false, false, false]] call EFUNC(common,showHud);
|
["captive", [false, false, false, false, false, false, false, false]] call EFUNC(common,showHud);
|
||||||
} else {
|
} else {
|
||||||
TRACE_1("Player Change (showHUD true)",_unit);
|
TRACE_1("Player Change (showHUD true)",ACE_player);
|
||||||
["captive", []] call EFUNC(common,showHud); //same as showHud true;
|
["captive", []] call EFUNC(common,showHud); //same as showHud true;
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
@ -316,17 +316,6 @@ enableCamShake true;
|
|||||||
// Set up numerous eventhanders for player controlled units
|
// Set up numerous eventhanders for player controlled units
|
||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
//CBA has events for zeus's display onLoad and onUnload (Need to delay a frame for display to be ready)
|
|
||||||
private _zeusDisplayChangedFNC = {
|
|
||||||
[{
|
|
||||||
private _data = !(isNull findDisplay 312);
|
|
||||||
["zeusDisplayChanged", [ACE_player, _data]] call FUNC(localEvent);
|
|
||||||
}, []] call FUNC(execNextFrame);
|
|
||||||
};
|
|
||||||
["CBA_curatorOpened", _zeusDisplayChangedFNC] call CBA_fnc_addEventHandler;
|
|
||||||
["CBA_curatorClosed", _zeusDisplayChangedFNC] call CBA_fnc_addEventHandler;
|
|
||||||
|
|
||||||
|
|
||||||
// default variables
|
// default variables
|
||||||
GVAR(OldPlayerVehicle) = vehicle objNull;
|
GVAR(OldPlayerVehicle) = vehicle objNull;
|
||||||
GVAR(OldPlayerTurret) = [objNull] call FUNC(getTurretIndex);
|
GVAR(OldPlayerTurret) = [objNull] call FUNC(getTurretIndex);
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
class Extended_PreInit_EventHandlers {
|
class Extended_PreInit_EventHandlers {
|
||||||
class ADDON {
|
class ADDON {
|
||||||
init = QUOTE(call COMPILE_FILE(XEH_preInit) );
|
init = QUOTE(call COMPILE_FILE(XEH_preInit) );
|
||||||
@ -6,6 +7,18 @@ class Extended_PreInit_EventHandlers {
|
|||||||
|
|
||||||
class Extended_PostInit_EventHandlers {
|
class Extended_PostInit_EventHandlers {
|
||||||
class ADDON {
|
class ADDON {
|
||||||
clientInit = QUOTE(call COMPILE_FILE(XEH_postInitClient) );
|
clientInit = QUOTE(call COMPILE_FILE(XEH_postInitClient));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class Extended_DisplayLoad_EventHandlers {
|
||||||
|
class RscDisplayCurator {
|
||||||
|
ADDON = QUOTE(_this call FUNC(updatePPEffects));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class Extended_DisplayUnload_EventHandlers {
|
||||||
|
class RscDisplayCurator {
|
||||||
|
ADDON = QUOTE(displayNull call FUNC(updatePPEffects)); // emulate zeus display being deleted
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -34,7 +34,7 @@ GVAR(ppEffectMuzzleFlash) ppEffectCommit 0;
|
|||||||
_this call FUNC(updatePPEffects);
|
_this call FUNC(updatePPEffects);
|
||||||
_this call FUNC(onVisionModeChanged);
|
_this call FUNC(onVisionModeChanged);
|
||||||
}] call EFUNC(common,addEventHandler);
|
}] call EFUNC(common,addEventHandler);
|
||||||
["zeusDisplayChanged", {_this call FUNC(updatePPEffects)}] call EFUNC(common,addEventHandler);
|
|
||||||
["cameraViewChanged", {
|
["cameraViewChanged", {
|
||||||
_this call FUNC(updatePPEffects);
|
_this call FUNC(updatePPEffects);
|
||||||
_this call FUNC(onCameraViewChanged);
|
_this call FUNC(onCameraViewChanged);
|
||||||
|
@ -17,12 +17,20 @@
|
|||||||
|
|
||||||
if (!hasInterface) exitWith {};
|
if (!hasInterface) exitWith {};
|
||||||
|
|
||||||
|
disableSerialization;
|
||||||
|
|
||||||
|
params [["_display", displayNull]];
|
||||||
|
|
||||||
|
if !(_display isEqualType displayNull) then {
|
||||||
|
_display = displayNull;
|
||||||
|
};
|
||||||
|
|
||||||
private ["_currentVehicle", "_grainSetting", "_blurSetting", "_radBlurSetting", "_config", "_hmd", "_cameraView", "_turret"];
|
private ["_currentVehicle", "_grainSetting", "_blurSetting", "_radBlurSetting", "_config", "_hmd", "_cameraView", "_turret"];
|
||||||
|
|
||||||
_currentVehicle = vehicle ACE_player;
|
_currentVehicle = vehicle ACE_player;
|
||||||
|
|
||||||
// If the Zeus display is on or the player has no nightvision
|
// If the Zeus display is on or the player has no nightvision
|
||||||
if ((!isNull findDisplay 312) || ((currentVisionMode ACE_player) != 1)) exitWith {
|
if (ctrlIDD _display == 312 || currentVisionMode ACE_player != 1) exitWith {
|
||||||
GVAR(ppEffectFilmGrain) ppEffectEnable false;
|
GVAR(ppEffectFilmGrain) ppEffectEnable false;
|
||||||
GVAR(ppEffectBlur) ppEffectEnable false;
|
GVAR(ppEffectBlur) ppEffectEnable false;
|
||||||
GVAR(ppEffectRadialBlur) ppEffectEnable false;
|
GVAR(ppEffectRadialBlur) ppEffectEnable false;
|
||||||
|
Loading…
Reference in New Issue
Block a user