change remaining ace events to CBA 'addPlayerEventHandler'

This commit is contained in:
commy2 2016-06-22 11:16:55 +02:00
parent 047ac8c3f2
commit 08886f413c
3 changed files with 9 additions and 10 deletions

View File

@ -284,7 +284,7 @@ enableCamShake true;
//////////////////////////////////////////////////
// Set the name for the current player
["ace_playerChanged", {
["unit", {
params ["_newPlayer","_oldPlayer"];
if (alive _newPlayer) then {
@ -294,7 +294,7 @@ enableCamShake true;
if (alive _oldPlayer) then {
[_oldPlayer] call FUNC(setName);
};
}] call CBA_fnc_addEventHandler;
}] call CBA_fnc_addPlayerEventHandler;
//////////////////////////////////////////////////
@ -328,20 +328,19 @@ enableCamShake true;
}] call CBA_fnc_addPlayerEventHandler;
// "playerVisionModeChanged" event
["visionmode", {
["visionMode", {
["ace_playerVisionModeChanged", _this] call CBA_fnc_localEvent;
}] call CBA_fnc_addPlayerEventHandler;
// "cameraViewChanged" event
["cameraview", {
["cameraView", {
["ace_cameraViewChanged", _this] call CBA_fnc_localEvent;
}] call CBA_fnc_addPlayerEventHandler;
["visiblemap", {
["visibleMap", {
["ace_visibleMapChanged", _this] call CBA_fnc_localEvent;
}] call CBA_fnc_addPlayerEventHandler;
GVAR(OldIsCamera) = false;
[{

View File

@ -108,7 +108,7 @@ call FUNC(determineZoom);
}] call CBA_fnc_addPlayerEventHandler;
if (GVAR(mapGlow)) then {
["ace_visibleMapChanged", {
["visibleMap", {
params ["_player", "_mapOn"];
if (_mapOn) then {
if (!alive _player && !isNull GVAR(glow)) then {
@ -128,7 +128,7 @@ call FUNC(determineZoom);
[""] call FUNC(flashlightGlow);
};
};
}] call CBA_fnc_addEventHandler;
}] call CBA_fnc_addPlayerEventHandler;
};
};
}] call CBA_fnc_addEventHandler;

View File

@ -22,7 +22,7 @@ GVAR(mapTool_isRotating) = false;
((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["Draw", {_this call FUNC(updateMapToolMarkers);}];
}, []] call CBA_fnc_waitUntilAndExecute;
["ace_visibleMapChanged", {
["visibleMap", {
params ["", "_mapOn"];
if (_mapOn) then {
// Show GPS if required
@ -31,4 +31,4 @@ GVAR(mapTool_isRotating) = false;
// Hide GPS
[false] call FUNC(openMapGps);
};
}] call CBA_fnc_addEventHandler;
}] call CBA_fnc_addPlayerEventHandler;