QGVAR and Fix laser, map, map_gestures, maptools, modules, nightvision, optics

This commit is contained in:
jonpas 2016-05-25 02:09:11 +02:00
parent b54d1985f1
commit 7ede53bbdd
18 changed files with 29 additions and 29 deletions

View File

@ -2,6 +2,6 @@
#include "initKeybinds.sqf"
["ace_laser_laserOn", {_this call DFUNC(handleLaserOn)}] call CBA_fnc_addEventHandler;
["ace_laser_laserOff", {_this call DFUNC(handleLaserOff)}] call CBA_fnc_addEventHandler;
["ace_laserOn", {_this call DFUNC(handleLaserOn)}] call CBA_fnc_addEventHandler;
["ace_laserOff", {_this call DFUNC(handleLaserOff)}] call CBA_fnc_addEventHandler;

View File

@ -14,7 +14,8 @@ class CfgPatches {
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
#include "RscInGameUI.hpp"
class ACE_newEvents {
laser_laserOff = "ace_laser_laserOff";
laser_laserOn = "ace_laser_laserOn";
laser_laserOff = "ace_laserOff";
laser_laserOn = "ace_laserOn";
};

View File

@ -13,4 +13,4 @@
private ["_uuid"];
_uuid = _this select 0;
["ace_laser_laserOff", [_uuid]] call CBA_fnc_globalEvent;
["ace_laserOff", [_uuid]] call CBA_fnc_globalEvent;

View File

@ -19,5 +19,5 @@
private ["_uuid", "_args"];
_uuid = format["%1%2%3", floor ACE_diagTime, floor random 1000, floor random 10000];
_args = [_uuid, _this];
["ace_laser_laserOn", _args] call CBA_fnc_globalEvent;
["ace_laserOn", _args] call CBA_fnc_globalEvent;
_uuid;

View File

@ -72,7 +72,7 @@ call FUNC(determineZoom);
[_this select 1] call CBA_fnc_removePerFrameHandler;
}, 0] call CBA_fnc_addPerFrameHandler;
["SettingsInitialized", {
["ace_settingsInitialized", {
if (isMultiplayer && {GVAR(DefaultChannel) != -1}) then {
//Set the chat channel once the map has finished loading
[{
@ -99,7 +99,7 @@ call FUNC(determineZoom);
GVAR(flashlightInUse) = "";
GVAR(glow) = objNull;
["playerInventoryChanged", {
["ace_playerInventoryChanged", {
private _flashlights = [ACE_player] call FUNC(getUnitFlashlights);
if ((GVAR(flashlightInUse) != "") && !(GVAR(flashlightInUse) in _flashlights)) then {
GVAR(flashlightInUse) = "";
@ -135,7 +135,7 @@ call FUNC(determineZoom);
// hide clock on map if player has no watch
GVAR(hasWatch) = true;
["playerInventoryChanged", {
["ace_playerInventoryChanged", {
if (isNull (_this select 0)) exitWith {
GVAR(hasWatch) = true;
};

View File

@ -1,3 +1,3 @@
#include "script_component.hpp"
[EVENT_PLAYER_HAS_NO_OWNER_ID, FUNC(assignClientIDOnServer)] call CBA_fnc_addEventHandler;
[QGVAR(noOwnerID), FUNC(assignClientIDOnServer)] call CBA_fnc_addEventHandler;

View File

@ -31,7 +31,7 @@ if (!GVAR(EnableTransmit) || !visibleMap) exitWith {
{
_ownerID = _x getVariable QGVAR(owner_id);
if (isNil "_ownerID") then {
[EVENT_PLAYER_HAS_NO_OWNER_ID, [name _x]] call CBA_fnc_serverEvent;
[QGVAR(noOwnerID), [name _x]] call CBA_fnc_serverEvent;
} else {
_playerOwnerID = ACE_player getVariable QGVAR(owner_id);
if (!isNil "_playerOwnerID" && _ownerID != _playerOwnerID) then {

View File

@ -15,5 +15,3 @@
#endif
#include "\z\ace\addons\main\script_macros.hpp"
#define EVENT_PLAYER_HAS_NO_OWNER_ID "PlayerNameHasNoOwnerID"

View File

@ -66,7 +66,7 @@ GVAR(drawing_controls) = [36732, 36733, 36734, 36735, 36736, 36737];
12 call _fnc_installMapEvents;
};
["visibleMapChanged", {
["ace_visibleMapChanged", {
params ["", "_mapOn"];
if (_mapOn) then {
// Show GPS if required

View File

@ -10,10 +10,10 @@ if (isServer) then {
};
//Add Event Handlers:
["ace_drawing_removeLineMarker", FUNC(removeLineMarker)] call CBA_fnc_addEventHandler;
["ace_drawing_addLineMarker", FUNC(addLineMarker)] call CBA_fnc_addEventHandler;
[QGVAR(removeLineMarker), FUNC(removeLineMarker)] call CBA_fnc_addEventHandler;
[QGVAR(addLineMarker), FUNC(addLineMarker)] call CBA_fnc_addEventHandler;
["ace_drawing_requestMarkers", FUNC(copyMapRemoteSend)] call CBA_fnc_addEventHandler;
["ace_drawing_sendbackMarkers", FUNC(copyMapReceiveMarkers)] call CBA_fnc_addEventHandler;
[QGVAR(requestMarkers), FUNC(copyMapRemoteSend)] call CBA_fnc_addEventHandler;
[QGVAR(sendbackMarkers), FUNC(copyMapReceiveMarkers)] call CBA_fnc_addEventHandler;
ADDON = true;

View File

@ -68,8 +68,8 @@ class RscDisplayServerGetReady: RscDisplayGetReady {
};
class ACE_newEvents {
drawing_sendbackMarkers = "ace_drawing_sendbackMarkers";
drawing_requestMarkers = "ace_drawing_requestMarkers";
drawing_addLineMarker = "ace_drawing_addLineMarker";
drawing_removeLineMarker = "ace_drawing_removeLineMarker";
drawing_sendbackMarkers = QGVAR(sendbackMarkers);
drawing_requestMarkers = QGVAR(requestMarkers);
drawing_addLineMarker = QGVAR(addLineMarker);
drawing_removeLineMarker = QGVAR(removeLineMarker);
};

View File

@ -14,4 +14,4 @@
params ["_requester"];
["ace_drawing_sendbackMarkers", [GVAR(drawing_lineMarkers)], _requester] call CBA_fnc_targetEvent;
[QGVAR(sendbackMarkers), [GVAR(drawing_lineMarkers)], _requester] call CBA_fnc_targetEvent;

View File

@ -19,4 +19,4 @@
params ["_player", "_target"];
["ace_drawing_requestMarkers", [_player], _target] call CBA_fnc_targetEvent;
[QGVAR(requestMarkers), [_player], _target] call CBA_fnc_targetEvent;

View File

@ -58,7 +58,7 @@ if (_code == DIK_DELETE) exitWith {
if (_lambdaLong >= 0 && _lambdaLong <= _magDiffVector && _lambdaTrasAbs <= 5) exitWith {
// Delete the line marker
if (GVAR(drawing_syncMarkers)) then {
["ace_drawing_removeLineMarker", [_x select 0]] call CBA_fnc_globalEvent;
[QGVAR(removeLineMarker), [_x select 0]] call CBA_fnc_globalEvent;
} else {
deleteMarkerLocal (_x select 0);
GVAR(drawing_lineMarkers) = GVAR(drawing_lineMarkers) - [_x];

View File

@ -42,7 +42,7 @@ if (_dir != 1) then {
// Already drawing -> Add tempLineMarker to permanent list
if (GVAR(drawing_syncMarkers)) then {
deleteMarkerLocal (GVAR(drawing_tempLineMarker) select 0);
["ace_drawing_addLineMarker", GVAR(drawing_tempLineMarker)] call CBA_fnc_globalEvent;
[QGVAR(addLineMarker), GVAR(drawing_tempLineMarker)] call CBA_fnc_globalEvent;
// Log who drew on the briefing screen
[ACE_INFOFORMAT_1("Player %1 drew on the briefing screen", profileName)] call EFUNC(common,serverLog);
} else {

View File

@ -26,6 +26,7 @@ class CfgVehicles {
};
#include "CfgEventHandlers.hpp"
class ACE_newEvents {
InitSettingsFromModules = "ace_initSettingsFromModules";
};
};

View File

@ -35,7 +35,7 @@ GVAR(ppEffectMuzzleFlash) ppEffectCommit 0;
_this call FUNC(onVisionModeChanged);
}] call CBA_fnc_addEventHandler;
["cameraViewChanged", {
["ace_cameraViewChanged", {
_this call FUNC(updatePPEffects);
_this call FUNC(onCameraViewChanged);
}] call CBA_fnc_addEventHandler;

View File

@ -35,7 +35,7 @@ GVAR(camera) = objNull;
}] call CBA_fnc_addEventHandler;
// camera has to be re-created every time another camera is created. Otherwise r2t is either black or transparent. @todo Add popular custom cameras to the event in ACE_common.
["activeCameraChanged", {
["ace_activeCameraChanged", {
if !(_this select 1) then {
GVAR(camera) cameraEffect ["TERMINATE", "BACK"];
camDestroy GVAR(camera);