QGVAR and fix gforces, goggles, grenades, hearing, interact_menu

This commit is contained in:
jonpas 2016-05-25 01:57:41 +02:00
parent 99675417c6
commit b54d1985f1
10 changed files with 17 additions and 17 deletions

View File

@ -19,7 +19,7 @@ GVAR(pfID) = -1;
[] call FUNC(addPFEH);
TRACE_1("adding temp PFEH [start in]",GVAR(pfID));
};
["playerVehicleChanged", {
["ace_playerVehicleChanged", {
params ["", "_vehicle"];
TRACE_2("playerVehicleChanged",_vehicle,typeOf _vehicle);
if (_vehicle isKindOf "Air") then {

View File

@ -56,7 +56,7 @@ GVAR(OldGlasses) = "<null>";
}] call CBA_fnc_addEventHandler;
// add glasses eventhandlers
["GlassesChanged", {
["ace_glassesChanged", {
params ["_unit", "_glasses"];
SETGLASSES(_unit,GLASSESDEFAULT);
@ -70,7 +70,7 @@ GVAR(OldGlasses) = "<null>";
};
}] call CBA_fnc_addEventHandler;
["GlassesCracked", {
["ace_glassesCracked", {
params ["_unit"];
_unit setVariable ["ACE_EyesDamaged", true];

View File

@ -2,7 +2,7 @@
#include "script_component.hpp"
["ace_flashbangExplosion", {_this call FUNC(flashbangExplosionEH)}] call CBA_fnc_addEventHandler;
["ace_flashbangExploded", {_this call FUNC(flashbangExplosionEH)}] call CBA_fnc_addEventHandler;
if (!hasInterface) exitWith {};

View File

@ -24,5 +24,5 @@ class ACE_newEvents {
firedNonPlayer = "ace_firedNonPlayer";
firedPlayerNonLocal = "ace_firedPlayerNonLocal";
firedPlayer = "ace_firedPlayer";
flashbangExplosion = "ace_flashbangExplosion";
flashbangExplosion = "ace_flashbangExploded";
};

View File

@ -21,5 +21,5 @@ TRACE_1("params",_projectile);
if (alive _projectile) then {
playSound3D ["A3\Sounds_F\weapons\Explosion\explosion_mine_1.wss", _projectile, false, getPosASL _projectile, 5, 1.2, 400];
["ace_flashbangExplosion", [getPosASL _projectile]] call CBA_fnc_globalEvent;
["ace_flashbangExploded", [getPosASL _projectile]] call CBA_fnc_globalEvent;
};

View File

@ -20,7 +20,7 @@ GVAR(volumeAttenuation) = 1;
//Add XEH:
["CAManBase", "FiredNear", FUNC(firedNear)] call CBA_fnc_addClassEventHandler;
["CAManBase", "Explosion", FUNC(explosionNear)] call CBA_fnc_addClassEventHandler;
// Update hearing protection now:
[] call FUNC(updateHearingProtection);
@ -32,7 +32,7 @@ GVAR(volumeAttenuation) = 1;
["ace_playerTurretChanged", {_this call FUNC(updatePlayerVehAttenuation);}] call CBA_fnc_addEventHandler;
// Reset deafness on respawn (or remote control player switch)
["playerChanged", {
["ace_playerChanged", {
GVAR(deafnessDV) = 0;
GVAR(deafnessPrior) = 0;
ACE_player setVariable [QGVAR(deaf), false];

View File

@ -15,7 +15,7 @@ GVAR(ParsedTextCached) = [];
};
}] call CBA_fnc_addEventHandler;
["SettingsInitialized", {
["ace_settingsInitialized", {
//Setup text/shadow/size/color settings matrix
[] call FUNC(setupTextColors);
// Install the render EH on the main display
@ -41,7 +41,7 @@ GVAR(ParsedTextCached) = [];
// Listens for the falling unconscious event, just in case the menu needs to be closed
["medical_onUnconscious", {
["ace_medical_onUnconscious", {
// If no menu is open just quit
if (GVAR(openedMenuType) < 0) exitWith {};
@ -57,11 +57,11 @@ GVAR(ParsedTextCached) = [];
["ace_playerChanged", {_this call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
// background options
["interactMenuOpened", {
["ace_interactMenuOpened", {
if (GVAR(menuBackground)==1) then {[QGVAR(menuBackground), true] call EFUNC(common,blurScreen);};
if (GVAR(menuBackground)==2) then {0 cutRsc[QGVAR(menuBackground), "PLAIN", 1, false];};
}] call CBA_fnc_addEventHandler;
["interactMenuClosed", {
["ace_interactMenuClosed", {
if (GVAR(menuBackground)==1) then {[QGVAR(menuBackground), false] call EFUNC(common,blurScreen);};
if (GVAR(menuBackground)==2) then {(uiNamespace getVariable [QGVAR(menuBackground), displayNull]) closeDisplay 0;};
}] call CBA_fnc_addEventHandler;

View File

@ -28,6 +28,6 @@ class ACE_newEvents {
SettingChanged = "ace_settingChanged";
playerChanged = "ace_playerChanged";
interactMenuOpened = "ace_interactMenuOpened";
clearConditionCaches = "ace_clearConditionCaches";
clearConditionCaches = QGVAR(clearConditionCaches);
interactMenuClosed = "ace_interactMenuClosed";
};

View File

@ -28,7 +28,7 @@ if(GVAR(actionSelected)) then {
private _target = GVAR(selectedTarget);
// Clear the conditions caches
["ace_clearConditionCaches", []] call CBA_fnc_localEvent;
[QGVAR(clearConditionCaches), []] call CBA_fnc_localEvent;
// exit scope if selecting an action on key release is disabled
if (!(GVAR(actionOnKeyRelease)) && !_calledByClicking) exitWith {};
@ -40,7 +40,7 @@ if(GVAR(actionSelected)) then {
[_target, _player, _actionData select 6] call (_actionData select 3);
// Clear the conditions caches again if the action was performed
["ace_clearConditionCaches", []] call CBA_fnc_localEvent;
[QGVAR(clearConditionCaches), []] call CBA_fnc_localEvent;
};
};

View File

@ -97,7 +97,7 @@ if (GVAR(openedMenuType) >= 0) then {
private _target = GVAR(selectedTarget);
// Clear the conditions caches
["ace_clearConditionCaches", []] call CBA_fnc_localEvent;
[QGVAR(clearConditionCaches), []] call CBA_fnc_localEvent;
// Check the action conditions
private _actionData = GVAR(selectedAction) select 0;
@ -106,7 +106,7 @@ if (GVAR(openedMenuType) >= 0) then {
[_target, _player, _actionData select 6] call (_actionData select 3);
// Clear the conditions caches again if the action was performed
["ace_clearConditionCaches", []] call CBA_fnc_localEvent;
[QGVAR(clearConditionCaches), []] call CBA_fnc_localEvent;
};
};
};