mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'release'
This commit is contained in:
commit
8f3907c03f
@ -24,15 +24,15 @@ if (isServer) then {
|
||||
}];
|
||||
};
|
||||
|
||||
["ace_playerChanged", {_this call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
|
||||
[QGVAR(moveInCaptive), {_this call FUNC(vehicleCaptiveMoveIn)}] call CBA_fnc_addEventHandler;
|
||||
[QGVAR(moveOutCaptive), {_this call FUNC(vehicleCaptiveMoveOut)}] call CBA_fnc_addEventHandler;
|
||||
["unit", FUNC(handlePlayerChanged)] call CBA_fnc_addPlayerEventHandler;
|
||||
[QGVAR(moveInCaptive), FUNC(vehicleCaptiveMoveIn)] call CBA_fnc_addEventHandler;
|
||||
[QGVAR(moveOutCaptive), FUNC(vehicleCaptiveMoveOut)] call CBA_fnc_addEventHandler;
|
||||
|
||||
[QGVAR(setHandcuffed), {_this call FUNC(setHandcuffed)}] call CBA_fnc_addEventHandler;
|
||||
[QGVAR(setSurrendered), {_this call FUNC(setSurrendered)}] call CBA_fnc_addEventHandler;
|
||||
[QGVAR(setHandcuffed), FUNC(setHandcuffed)] call CBA_fnc_addEventHandler;
|
||||
[QGVAR(setSurrendered), FUNC(setSurrendered)] call CBA_fnc_addEventHandler;
|
||||
|
||||
//Medical Integration Events
|
||||
["ace_unconscious", {_this call ACE_Captives_fnc_handleOnUnconscious}] call CBA_fnc_addEventHandler;
|
||||
["ace_unconscious", FUNC(handleOnUnconscious)] call CBA_fnc_addEventHandler;
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
|
@ -284,7 +284,7 @@ enableCamShake true;
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
// Set the name for the current player
|
||||
["ace_playerChanged", {
|
||||
["unit", {
|
||||
params ["_newPlayer","_oldPlayer"];
|
||||
|
||||
if (alive _newPlayer) then {
|
||||
@ -294,124 +294,60 @@ enableCamShake true;
|
||||
if (alive _oldPlayer) then {
|
||||
[_oldPlayer] call FUNC(setName);
|
||||
};
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
}] call CBA_fnc_addPlayerEventHandler;
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// Set up numerous eventhanders for player controlled units
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
// default variables
|
||||
GVAR(OldPlayerVehicle) = vehicle objNull;
|
||||
GVAR(OldPlayerTurret) = [objNull] call FUNC(getTurretIndex);
|
||||
GVAR(OldPlayerWeapon) = currentWeapon objNull;
|
||||
GVAR(OldPlayerInventory) = [];
|
||||
GVAR(OldPlayerInventoryNoAmmo) = [];
|
||||
GVAR(OldPlayerVisionMode) = currentVisionMode objNull;
|
||||
GVAR(OldCameraView) = "";
|
||||
GVAR(OldVisibleMap) = false;
|
||||
GVAR(OldInventoryDisplayIsOpen) = nil; //@todo check this
|
||||
// "playerChanged" event
|
||||
["unit", {
|
||||
ACE_player = (_this select 0);
|
||||
["ace_playerChanged", _this] call CBA_fnc_localEvent;
|
||||
}] call CBA_fnc_addPlayerEventHandler;
|
||||
|
||||
// "playerVehicleChanged" event
|
||||
["vehicle", {
|
||||
["ace_playerVehicleChanged", _this] call CBA_fnc_localEvent;
|
||||
}] call CBA_fnc_addPlayerEventHandler;
|
||||
|
||||
// "playerTurretChanged" event
|
||||
["turret", {
|
||||
["ace_playerTurretChanged", _this] call CBA_fnc_localEvent;
|
||||
}] call CBA_fnc_addPlayerEventHandler;
|
||||
|
||||
// "playerWeaponChanged" event
|
||||
["weapon", {
|
||||
["ace_playerWeaponChanged", _this] call CBA_fnc_localEvent;
|
||||
}] call CBA_fnc_addPlayerEventHandler;
|
||||
|
||||
// "playerInventoryChanged" event
|
||||
["loadout", {
|
||||
["ace_playerInventoryChanged", [ACE_player, [ACE_player, false] call FUNC(getAllGear)]] call CBA_fnc_localEvent;
|
||||
}] call CBA_fnc_addPlayerEventHandler;
|
||||
|
||||
// "playerVisionModeChanged" event
|
||||
["visionMode", {
|
||||
["ace_playerVisionModeChanged", _this] call CBA_fnc_localEvent;
|
||||
}] call CBA_fnc_addPlayerEventHandler;
|
||||
|
||||
// "cameraViewChanged" event
|
||||
["cameraView", {
|
||||
["ace_cameraViewChanged", _this] call CBA_fnc_localEvent;
|
||||
}] call CBA_fnc_addPlayerEventHandler;
|
||||
|
||||
["visibleMap", {
|
||||
["ace_visibleMapChanged", _this] call CBA_fnc_localEvent;
|
||||
}] call CBA_fnc_addPlayerEventHandler;
|
||||
|
||||
GVAR(OldIsCamera) = false;
|
||||
|
||||
// PFH to raise varios events
|
||||
[{
|
||||
BEGIN_COUNTER(stateChecker);
|
||||
|
||||
// "playerChanged" event
|
||||
private _data = call FUNC(player);
|
||||
if !(_data isEqualTo ACE_player) then {
|
||||
private _oldPlayer = ACE_player;
|
||||
|
||||
ACE_player = _data;
|
||||
uiNamespace setVariable ["ACE_player", _data];
|
||||
|
||||
// Raise ACE event locally
|
||||
["ace_playerChanged", [ACE_player, _oldPlayer]] call CBA_fnc_localEvent;
|
||||
};
|
||||
|
||||
// "playerVehicleChanged" event
|
||||
_data = vehicle ACE_player;
|
||||
if !(_data isEqualTo GVAR(OldPlayerVehicle)) then {
|
||||
// Raise ACE event locally
|
||||
GVAR(OldPlayerVehicle) = _data;
|
||||
["ace_playerVehicleChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
|
||||
};
|
||||
|
||||
// "playerTurretChanged" event
|
||||
_data = [ACE_player] call FUNC(getTurretIndex);
|
||||
if !(_data isEqualTo GVAR(OldPlayerTurret)) then {
|
||||
// Raise ACE event locally
|
||||
GVAR(OldPlayerTurret) = _data;
|
||||
["ace_playerTurretChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
|
||||
};
|
||||
|
||||
// "playerWeaponChanged" event
|
||||
_data = currentWeapon ACE_player;
|
||||
if (_data != GVAR(OldPlayerWeapon)) then {
|
||||
// Raise ACE event locally
|
||||
GVAR(OldPlayerWeapon) = _data;
|
||||
["ace_playerWeaponChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
|
||||
};
|
||||
|
||||
// "playerInventoryChanged" event
|
||||
_data = getUnitLoadout ACE_player;
|
||||
if !(_data isEqualTo GVAR(OldPlayerInventory)) then {
|
||||
// Raise ACE event locally
|
||||
GVAR(OldPlayerInventory) = _data;
|
||||
|
||||
// we don't want to trigger this just because your ammo counter decreased.
|
||||
_data = + GVAR(OldPlayerInventory);
|
||||
|
||||
private _weaponInfo = _data param [0, []];
|
||||
if !(_weaponInfo isEqualTo []) then {
|
||||
_weaponInfo set [4, primaryWeaponMagazine ACE_player];
|
||||
_weaponInfo deleteAt 5;
|
||||
};
|
||||
|
||||
_weaponInfo = _data param [1, []];
|
||||
if !(_weaponInfo isEqualTo []) then {
|
||||
_weaponInfo set [4, secondaryWeaponMagazine ACE_player];
|
||||
_weaponInfo deleteAt 5;
|
||||
};
|
||||
|
||||
_weaponInfo = _data param [2, []];
|
||||
if !(_weaponInfo isEqualTo []) then {
|
||||
_weaponInfo set [4, handgunMagazine ACE_player];
|
||||
_weaponInfo deleteAt 5;
|
||||
};
|
||||
|
||||
if !(_data isEqualTo GVAR(OldPlayerInventoryNoAmmo)) then {
|
||||
GVAR(OldPlayerInventoryNoAmmo) = _data;
|
||||
["ace_playerInventoryChanged", [ACE_player, [ACE_player, false] call FUNC(getAllGear)]] call CBA_fnc_localEvent;
|
||||
};
|
||||
};
|
||||
|
||||
// "playerVisionModeChanged" event
|
||||
_data = currentVisionMode ACE_player;
|
||||
if !(_data isEqualTo GVAR(OldPlayerVisionMode)) then {
|
||||
// Raise ACE event locally
|
||||
GVAR(OldPlayerVisionMode) = _data;
|
||||
["ace_playerVisionModeChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
|
||||
};
|
||||
|
||||
// "cameraViewChanged" event
|
||||
_data = cameraView;
|
||||
if !(_data isEqualTo GVAR(OldCameraView)) then {
|
||||
// Raise ACE event locally
|
||||
GVAR(OldCameraView) = _data;
|
||||
["ace_cameraViewChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
|
||||
};
|
||||
|
||||
// "visibleMapChanged" event
|
||||
_data = visibleMap;
|
||||
if (!_data isEqualTo GVAR(OldVisibleMap)) then {
|
||||
// Raise ACE event locally
|
||||
GVAR(OldVisibleMap) = _data;
|
||||
["ace_visibleMapChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
|
||||
};
|
||||
|
||||
// "activeCameraChanged" event
|
||||
_data = call FUNC(isfeatureCameraActive);
|
||||
private _data = call FUNC(isfeatureCameraActive);
|
||||
if !(_data isEqualTo GVAR(OldIsCamera)) then {
|
||||
// Raise ACE event locally
|
||||
GVAR(OldIsCamera) = _data;
|
||||
@ -419,7 +355,7 @@ GVAR(OldIsCamera) = false;
|
||||
};
|
||||
|
||||
END_COUNTER(stateChecker);
|
||||
}, 0, []] call CBA_fnc_addPerFrameHandler;
|
||||
}, 0.5, []] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
|
@ -28,7 +28,7 @@ GVAR(AssignedItemsShownItems) = [
|
||||
ACE_isGPSEnabled
|
||||
];
|
||||
|
||||
["ace_playerInventoryChanged", {
|
||||
["loadout", {
|
||||
params ["_unit"];
|
||||
|
||||
private _assignedItems = getUnitLoadout _unit param [9, ["","","","","",""]]; // ["ItemMap","ItemGPS","ItemRadio","ItemCompass","ItemWatch","NVGoggles"]
|
||||
@ -48,4 +48,4 @@ GVAR(AssignedItemsShownItems) = [
|
||||
showWatch _showWatch;
|
||||
showRadio _showRadio;
|
||||
showGPS (_showGPS || {cameraOn == getConnectedUAV _unit}); //If player is activly controling a UAV, showGPS controls showing the map (m key)
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
}] call CBA_fnc_addPlayerEventHandler;
|
||||
|
@ -3,11 +3,11 @@
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
["ace_playerInventoryChanged", {
|
||||
["loadout", {
|
||||
params ["_unit"];
|
||||
[_unit] call FUNC(takeLoadedATWeapon);
|
||||
[_unit] call FUNC(updateInventoryDisplay);
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
}] call CBA_fnc_addPlayerEventHandler;
|
||||
|
||||
// Register fire event handler
|
||||
// Only for the local player and for AI. Non-local players will handle it themselves
|
||||
|
@ -20,9 +20,9 @@ if (isNil "ACE_maxWeightCarry") then {
|
||||
["isNotCarrying", {!((_this select 0) getVariable [QGVAR(isCarrying), false])}] call EFUNC(common,addCanInteractWithCondition);
|
||||
|
||||
// release object on player change. This does work when returning to lobby, but not when hard disconnecting.
|
||||
["ace_playerChanged", {_this call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
|
||||
["ace_playerVehicleChanged", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
|
||||
["ace_playerWeaponChanged", {_this call FUNC(handlePlayerWeaponChanged)}] call CBA_fnc_addEventHandler;
|
||||
["unit", FUNC(handlePlayerChanged)] call CBA_fnc_addEventHandler;
|
||||
["vehicle", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
|
||||
["weapon", FUNC(handlePlayerWeaponChanged)] call CBA_fnc_addEventHandler;
|
||||
|
||||
// handle waking up dragged unit and falling unconscious while dragging
|
||||
["ace_unconscious", {_this call FUNC(handleUnconscious)}] call CBA_fnc_addEventHandler;
|
||||
|
@ -12,7 +12,7 @@ class CfgWeapons {
|
||||
};
|
||||
class autocannon_35mm: CannonCore {
|
||||
canLock = 0;
|
||||
ballisticsComputer = 0;
|
||||
ballisticsComputer = 4; //was "4 + 2", 2 is for manual zeroing, 4 is for the lead indicator - https://community.bistudio.com/wiki/A3_Locking_Review#ballisticsComputer
|
||||
magazines[] += {"ACE_120Rnd_35mm_ABM_shells","ACE_120Rnd_35mm_ABM_shells_Tracer_Red","ACE_120Rnd_35mm_ABM_shells_Tracer_Green","ACE_120Rnd_35mm_ABM_shells_Tracer_Yellow"};
|
||||
};
|
||||
|
||||
|
@ -19,7 +19,7 @@ GVAR(pfID) = -1;
|
||||
[] call FUNC(addPFEH);
|
||||
TRACE_1("adding temp PFEH [start in]",GVAR(pfID));
|
||||
};
|
||||
["ace_playerVehicleChanged", {
|
||||
["vehicle", {
|
||||
params ["", "_vehicle"];
|
||||
TRACE_2("playerVehicleChanged",_vehicle,typeOf _vehicle);
|
||||
if (_vehicle isKindOf "Air") then {
|
||||
@ -35,5 +35,5 @@ GVAR(pfID) = -1;
|
||||
GVAR(pfID) = -1;
|
||||
};
|
||||
};
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
}] call CBA_fnc_addPlayerEventHandler;
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
@ -43,7 +43,7 @@ GVAR(surfaceCacheIsDust) = false;
|
||||
// init GlassesChanged eventhandler
|
||||
GVAR(OldGlasses) = "<null>";
|
||||
|
||||
["ace_playerInventoryChanged", {
|
||||
["loadout", {
|
||||
params ["_unit"];
|
||||
|
||||
private _currentGlasses = goggles _unit;
|
||||
@ -52,7 +52,7 @@ GVAR(OldGlasses) = "<null>";
|
||||
["ace_glassesChanged", [_unit, _currentGlasses]] call CBA_fnc_localEvent;
|
||||
GVAR(OldGlasses) = _currentGlasses;
|
||||
};
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
}] call CBA_fnc_addPlayerEventHandler;
|
||||
|
||||
// add glasses eventhandlers
|
||||
["ace_glassesChanged", {
|
||||
@ -110,7 +110,7 @@ private _fnc_checkGoggles = {
|
||||
};
|
||||
};
|
||||
|
||||
["ace_cameraViewChanged", _fnc_checkGoggles] call CBA_fnc_addEventHandler;
|
||||
["cameraView", _fnc_checkGoggles] call CBA_fnc_addPlayerEventHandler;
|
||||
["ace_activeCameraChanged", _fnc_checkGoggles] call CBA_fnc_addEventHandler;
|
||||
|
||||
// goggles effects main PFH
|
||||
|
@ -28,18 +28,18 @@ GVAR(volumeAttenuation) = 1;
|
||||
[FUNC(updateVolume), 1, [false]] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
// Update veh attunation when player veh changes
|
||||
["ace_playerVehicleChanged", FUNC(updatePlayerVehAttenuation)] call CBA_fnc_addEventHandler;
|
||||
["ace_playerTurretChanged", FUNC(updatePlayerVehAttenuation)] call CBA_fnc_addEventHandler;
|
||||
["vehicle", FUNC(updatePlayerVehAttenuation)] call CBA_fnc_addPlayerEventHandler;
|
||||
["turret", FUNC(updatePlayerVehAttenuation)] call CBA_fnc_addPlayerEventHandler;
|
||||
|
||||
// Reset deafness on respawn (or remote control player switch)
|
||||
["ace_playerChanged", {
|
||||
["unit", {
|
||||
GVAR(deafnessDV) = 0;
|
||||
GVAR(deafnessPrior) = 0;
|
||||
ACE_player setVariable [QGVAR(deaf), false];
|
||||
GVAR(time3) = 0;
|
||||
[] call FUNC(updateHearingProtection);
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
}] call CBA_fnc_addPlayerEventHandler;
|
||||
|
||||
// Update protection on possible helmet change
|
||||
["ace_playerInventoryChanged", {[] call FUNC(updateHearingProtection);}] call CBA_fnc_addEventHandler;
|
||||
["loadout", FUNC(updateHearingProtection)] call CBA_fnc_addPlayerEventHandler;
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
@ -54,7 +54,7 @@ GVAR(ParsedTextCached) = [];
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
// disable firing while the interact menu is is is opened
|
||||
["ace_playerChanged", {_this call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
|
||||
["unit", FUNC(handlePlayerChanged)] call CBA_fnc_addPlayerEventHandler;
|
||||
|
||||
// background options
|
||||
["ace_interactMenuOpened", {
|
||||
|
@ -12,8 +12,8 @@
|
||||
#define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD
|
||||
|
||||
// MINIMAL required version for the Mod. Components can specify others..
|
||||
#define REQUIRED_VERSION 1.56
|
||||
#define REQUIRED_CBA_VERSION {2,4,0}
|
||||
#define REQUIRED_VERSION 1.60
|
||||
#define REQUIRED_CBA_VERSION {2,4,1}
|
||||
|
||||
#ifdef COMPONENT_BEAUTIFIED
|
||||
#define COMPONENT_NAME QUOTE(ACE3 - COMPONENT_BEAUTIFIED)
|
||||
|
@ -100,15 +100,15 @@ call FUNC(determineZoom);
|
||||
GVAR(flashlightInUse) = "";
|
||||
GVAR(glow) = objNull;
|
||||
|
||||
["ace_playerInventoryChanged", {
|
||||
["loadout", {
|
||||
private _flashlights = [ACE_player] call FUNC(getUnitFlashlights);
|
||||
if ((GVAR(flashlightInUse) != "") && !(GVAR(flashlightInUse) in _flashlights)) then {
|
||||
GVAR(flashlightInUse) = "";
|
||||
};
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
}] 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;
|
||||
@ -136,7 +136,7 @@ call FUNC(determineZoom);
|
||||
// hide clock on map if player has no watch
|
||||
GVAR(hasWatch) = true;
|
||||
|
||||
["ace_playerInventoryChanged", {
|
||||
["loadout", {
|
||||
if (isNull (_this select 0)) exitWith {
|
||||
GVAR(hasWatch) = true;
|
||||
};
|
||||
@ -145,4 +145,4 @@ GVAR(hasWatch) = true;
|
||||
if (_x isKindOf ["ItemWatch", configFile >> "CfgWeapons"]) exitWith {GVAR(hasWatch) = true;};
|
||||
false
|
||||
} count (assignedItems ACE_player);
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
}] call CBA_fnc_addPlayerEventHandler;
|
||||
|
@ -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;
|
||||
|
@ -297,7 +297,7 @@ GVAR(lastHeartBeatSound) = CBA_missionTime;
|
||||
["isNotUnconscious", {!((_this select 0) getVariable ["ACE_isUnconscious", false])}] call EFUNC(common,addCanInteractWithCondition);
|
||||
|
||||
// Item Event Handler
|
||||
["ace_playerInventoryChanged", FUNC(itemCheck)] call CBA_fnc_addEventHandler;
|
||||
["loadout", FUNC(itemCheck)] call CBA_fnc_addPlayerEventHandler;
|
||||
|
||||
if (hasInterface) then {
|
||||
["ace_playerJIP", {
|
||||
|
@ -19,5 +19,5 @@
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
["ace_playerVehicleChanged", FUNC(handlePlayerVehicleChanged)] call CBA_fnc_addEventHandler;
|
||||
["vehicle", FUNC(handlePlayerVehicleChanged)] call CBA_fnc_addPlayerEventHandler;
|
||||
["ace_infoDisplayChanged", FUNC(turretDisplayLoaded)] call CBA_fnc_addEventHandler;
|
||||
|
@ -3,8 +3,8 @@
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
["ace_playerChanged", FUNC(handleVirtualMass)] call CBA_fnc_addEventHandler;
|
||||
["ace_playerInventoryChanged", FUNC(handleVirtualMass)] call CBA_fnc_addEventHandler;
|
||||
["unit", FUNC(handleVirtualMass)] call CBA_fnc_addPlayerEventHandler;
|
||||
["loadout", FUNC(handleVirtualMass)] call CBA_fnc_addPlayerEventHandler;
|
||||
|
||||
["ACE3 Movement", QGVAR(climb), localize LSTRING(Climb), {
|
||||
// Conditions: canInteract
|
||||
|
@ -28,14 +28,13 @@ if (isServer) then {
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
["ace_playerChanged", {
|
||||
["unit", {
|
||||
//When player changes, make sure to reset old unit's variable
|
||||
params ["", "_oldUnit"];
|
||||
if ((!isNull _oldUnit) && {_oldUnit getVariable [QGVAR(isSpeakingInGame), false]}) then {
|
||||
_oldUnit setVariable [QGVAR(isSpeakingInGame), false, true];
|
||||
};
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
}] call CBA_fnc_addPlayerEventHandler;
|
||||
|
||||
if (isClass (configFile >> "CfgPatches" >> "acre_api")) then {
|
||||
ACE_LOGINFO("ACRE Detected.");
|
||||
|
@ -29,22 +29,16 @@ GVAR(ppEffectMuzzleFlash) ppEffectAdjust [1, 1, 0, [0, 0, 0, 0], [0, 0, 0, 1], [
|
||||
GVAR(ppEffectMuzzleFlash) ppEffectCommit 0;
|
||||
|
||||
// Setup the event handlers
|
||||
["ace_playerInventoryChanged", FUNC(updatePPEffects)] call CBA_fnc_addEventHandler;
|
||||
["ace_playerVisionModeChanged", {
|
||||
_this call FUNC(updatePPEffects);
|
||||
_this call FUNC(onVisionModeChanged);
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
["ace_cameraViewChanged", {
|
||||
_this call FUNC(updatePPEffects);
|
||||
_this call FUNC(onCameraViewChanged);
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
["ace_playerVehicleChanged", {_this call FUNC(updatePPEffects)}] call CBA_fnc_addEventHandler;
|
||||
["ace_playerTurretChanged", {_this call FUNC(updatePPEffects)}] call CBA_fnc_addEventHandler;
|
||||
["loadout", FUNC(updatePPEffects)] call CBA_fnc_addPlayerEventHandler;
|
||||
["visionMode", FUNC(updatePPEffects)] call CBA_fnc_addPlayerEventHandler;
|
||||
["visionMode", FUNC(onVisionModeChanged)] call CBA_fnc_addPlayerEventHandler;
|
||||
["cameraView", FUNC(updatePPEffects)] call CBA_fnc_addPlayerEventHandler;
|
||||
["cameraView", FUNC(onCameraViewChanged)] call CBA_fnc_addPlayerEventHandler;
|
||||
["vehicle", FUNC(updatePPEffects)] call CBA_fnc_addPlayerEventHandler;
|
||||
["turret", FUNC(updatePPEffects)] call CBA_fnc_addPlayerEventHandler;
|
||||
|
||||
// Add keybinds
|
||||
["ACE3 Equipment", QGVAR(IncreaseNVGBrightness), localize LSTRING(IncreaseNVGBrightness),
|
||||
{
|
||||
["ACE3 Equipment", QGVAR(IncreaseNVGBrightness), localize LSTRING(IncreaseNVGBrightness), {
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["isNotEscorting", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
@ -53,12 +47,9 @@ GVAR(ppEffectMuzzleFlash) ppEffectCommit 0;
|
||||
// Statement
|
||||
[ACE_player, 1] call FUNC(changeNVGBrightness);
|
||||
true
|
||||
},
|
||||
{false},
|
||||
[201, [false, false, true]], false] call CBA_fnc_addKeybind; //PageUp + ALT
|
||||
}, {false}, [201, [false, false, true]], false] call CBA_fnc_addKeybind; //PageUp + ALT
|
||||
|
||||
["ACE3 Equipment", QGVAR(DecreaseNVGBrightness), localize LSTRING(DecreaseNVGBrightness),
|
||||
{
|
||||
["ACE3 Equipment", QGVAR(DecreaseNVGBrightness), localize LSTRING(DecreaseNVGBrightness), {
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["isNotEscorting", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
@ -67,9 +58,7 @@ GVAR(ppEffectMuzzleFlash) ppEffectCommit 0;
|
||||
// Statement
|
||||
[ACE_player, -1] call FUNC(changeNVGBrightness);
|
||||
true
|
||||
},
|
||||
{false},
|
||||
[209, [false, false, true]], false] call CBA_fnc_addKeybind; //PageDown + ALT
|
||||
}, {false}, [209, [false, false, true]], false] call CBA_fnc_addKeybind; //PageDown + ALT
|
||||
|
||||
// Register fire event handler
|
||||
["ace_firedPlayer", DFUNC(blending)] call CBA_fnc_addEventHandler;
|
||||
|
@ -11,7 +11,7 @@ if (isServer) then {
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
// mutes/unmutes units when the player changes
|
||||
["ace_playerChanged", {
|
||||
["unit", {
|
||||
params ["_newPlayer", "_oldPlayer"];
|
||||
|
||||
// mute the new player
|
||||
@ -21,4 +21,4 @@ if (!hasInterface) exitWith {};
|
||||
if (alive _oldPlayer) then {
|
||||
[_oldPlayer, "isPlayer"] call EFUNC(common,unmuteUnit);
|
||||
};
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
}] call CBA_fnc_addPlayerEventHandler;
|
||||
|
@ -17,8 +17,7 @@
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
["ACE3 Equipment", QGVAR(showAltimeter), localize LSTRING(showAltimeter),
|
||||
{
|
||||
["ACE3 Equipment", QGVAR(showAltimeter), localize LSTRING(showAltimeter), {
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["isNotEscorting", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
if (!('ACE_Altimeter' in assignedItems ace_player)) exitWith {false};
|
||||
@ -28,19 +27,17 @@ if (!hasInterface) exitWith {};
|
||||
call FUNC(hideAltimeter);
|
||||
};
|
||||
true
|
||||
},
|
||||
{false},
|
||||
[24, [false, false, false]], false] call CBA_fnc_addKeybind;
|
||||
}, {false}, [24, [false, false, false]], false] call CBA_fnc_addKeybind;
|
||||
|
||||
GVAR(PFH) = false;
|
||||
["ace_playerVehicleChanged",{
|
||||
["vehicle",{
|
||||
if (!GVAR(PFH) && {(vehicle ACE_player) isKindOf "ParachuteBase"}) then {
|
||||
GVAR(PFH) = true;
|
||||
[FUNC(onEachFrame), 0.1, []] call CALLSTACK(CBA_fnc_addPerFrameHandler);
|
||||
};
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
}] call CBA_fnc_addPlayerEventHandler;
|
||||
|
||||
// don't show speed and height when in expert mode
|
||||
["ace_infoDisplayChanged", {_this call FUNC(handleInfoDisplayChanged)}] call CBA_fnc_addEventHandler;
|
||||
|
||||
["ace_playerInventoryChanged", FUNC(storeParachute)] call CBA_fnc_addEventHandler;
|
||||
["loadout", FUNC(storeParachute)] call CBA_fnc_addPlayerEventHandler;
|
||||
|
@ -1,7 +1,10 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
["ace_unconscious", {_this call FUNC(handleUnconscious)}] call CBA_fnc_addEventHandler;
|
||||
["ace_playerVehicleChanged", {params ["_unit"]; [_unit] call FUNC(dropAmmo)}] call CBA_fnc_addEventHandler;
|
||||
["vehicle", {
|
||||
params ["_unit"];
|
||||
[_unit] call FUNC(dropAmmo);
|
||||
}] call CBA_fnc_addPlayerEventHandler;
|
||||
|
||||
if (isServer) then {
|
||||
addMissionEventHandler ["HandleDisconnect", {params ["_unit"]; [_unit] call FUNC(dropAmmo)}];
|
||||
|
@ -1,7 +1,7 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
["ace_rallypointMoved", {_this call FUNC(updateRallypoint)}] call CBA_fnc_addEventHandler;
|
||||
["ace_playerChanged", {_this call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler; // hide enemy rallypoint markers
|
||||
["ace_rallypointMoved", FUNC(updateRallypoint)] call CBA_fnc_addEventHandler;
|
||||
["unit", FUNC(handlePlayerChanged)] call CBA_fnc_addPlayerEventHandler; // hide enemy rallypoint markers
|
||||
|
||||
[QGVAR(showFriendlyFireMessageEvent), DFUNC(showFriendlyFireMessage)] call CBA_fnc_addEventHandler;
|
||||
[QGVAR(showFriendlyFireMessageEvent), FUNC(showFriendlyFireMessage)] call CBA_fnc_addEventHandler;
|
||||
|
@ -15,9 +15,9 @@ GVAR(deployDirection) = 0;
|
||||
["ace_interactMenuOpened", {[ACE_player] call FUNC(handleInteractMenuOpened)}] call CBA_fnc_addEventHandler;
|
||||
|
||||
// Cancel deploy on player change. This does work when returning to lobby, but not when hard disconnecting.
|
||||
["ace_playerChanged", {_this call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
|
||||
["ace_playerInventoryChanged", {_this call FUNC(handlePlayerInventoryChanged)}] call CBA_fnc_addEventHandler;
|
||||
["ace_playerVehicleChanged", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
|
||||
["unit", {_this call FUNC(handlePlayerChanged)}] call CBA_fnc_addPlayerEventHandler;
|
||||
["loadout", {_this call FUNC(handlePlayerInventoryChanged)}] call CBA_fnc_addPlayerEventHandler;
|
||||
["vehicle", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call CBA_fnc_addPlayerEventHandler;
|
||||
|
||||
// handle waking up dragged unit and falling unconscious while dragging
|
||||
["ace_unconscious", {_this call FUNC(handleUnconscious)}] call CBA_fnc_addEventHandler;
|
||||
|
@ -10,28 +10,25 @@
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
// Check inventory when it changes
|
||||
["ace_playerInventoryChanged", FUNC(inventoryCheck)] call CBA_fnc_addEventHandler;
|
||||
["loadout", FUNC(inventoryCheck)] call CBA_fnc_addPlayerEventHandler;
|
||||
|
||||
// Instantly hide knobs when scoping in
|
||||
["ace_cameraViewChanged", {
|
||||
EXPLODE_2_PVT(_this,_player,_newCameraView);
|
||||
if (_newCameraView == "GUNNER") then {
|
||||
private "_layer";
|
||||
_layer = [QGVAR(Zeroing)] call BIS_fnc_rscLayer;
|
||||
_layer cutText ["", "PLAIN", 0];
|
||||
["cameraView", {
|
||||
params ["_player", "_newCameraView"];
|
||||
|
||||
if (_newCameraView == "GUNNER") then {
|
||||
private _layer = [QGVAR(Zeroing)] call BIS_fnc_rscLayer;
|
||||
_layer cutText ["", "PLAIN", 0];
|
||||
|
||||
if !(isNil QGVAR(fadePFH)) then {
|
||||
[GVAR(fadePFH)] call CBA_fnc_removePerFrameHandler;
|
||||
GVAR(fadePFH) = nil;
|
||||
};
|
||||
};
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
}] call CBA_fnc_addPlayerEventHandler;
|
||||
|
||||
// Add keybinds
|
||||
["ACE3 Scope Adjustment", QGVAR(AdjustUpMinor), localize LSTRING(AdjustUpMinor),
|
||||
{
|
||||
["ACE3 Scope Adjustment", QGVAR(AdjustUpMinor), localize LSTRING(AdjustUpMinor), {
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
@ -41,12 +38,9 @@ if (!hasInterface) exitWith {};
|
||||
|
||||
// Statement
|
||||
[ACE_player, ELEVATION_UP, MINOR_INCREMENT] call FUNC(adjustScope);
|
||||
},
|
||||
{false},
|
||||
[201, [false, false, false]], true] call CBA_fnc_addKeybind;
|
||||
}, {false}, [201, [false, false, false]], true] call CBA_fnc_addKeybind;
|
||||
|
||||
["ACE3 Scope Adjustment", QGVAR(AdjustDownMinor), localize LSTRING(AdjustDownMinor),
|
||||
{
|
||||
["ACE3 Scope Adjustment", QGVAR(AdjustDownMinor), localize LSTRING(AdjustDownMinor), {
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
@ -56,12 +50,9 @@ if (!hasInterface) exitWith {};
|
||||
|
||||
// Statement
|
||||
[ACE_player, ELEVATION_DOWN, MINOR_INCREMENT] call FUNC(adjustScope);
|
||||
},
|
||||
{false},
|
||||
[209, [false, false, false]], true] call CBA_fnc_addKeybind;
|
||||
}, {false}, [209, [false, false, false]], true] call CBA_fnc_addKeybind;
|
||||
|
||||
["ACE3 Scope Adjustment", QGVAR(AdjustLeftMinor), localize LSTRING(AdjustLeftMinor),
|
||||
{
|
||||
["ACE3 Scope Adjustment", QGVAR(AdjustLeftMinor), localize LSTRING(AdjustLeftMinor), {
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
@ -71,12 +62,9 @@ if (!hasInterface) exitWith {};
|
||||
|
||||
// Statement
|
||||
[ACE_player, WINDAGE_LEFT, MINOR_INCREMENT] call FUNC(adjustScope);
|
||||
},
|
||||
{false},
|
||||
[209, [false, true, false]], true] call CBA_fnc_addKeybind;
|
||||
}, {false}, [209, [false, true, false]], true] call CBA_fnc_addKeybind;
|
||||
|
||||
["ACE3 Scope Adjustment", QGVAR(AdjustRightMinor), localize LSTRING(AdjustRightMinor),
|
||||
{
|
||||
["ACE3 Scope Adjustment", QGVAR(AdjustRightMinor), localize LSTRING(AdjustRightMinor), {
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
@ -86,12 +74,9 @@ if (!hasInterface) exitWith {};
|
||||
|
||||
// Statement
|
||||
[ACE_player, WINDAGE_RIGHT, MINOR_INCREMENT] call FUNC(adjustScope);
|
||||
},
|
||||
{false},
|
||||
[201, [false, true, false]], true] call CBA_fnc_addKeybind;
|
||||
}, {false}, [201, [false, true, false]], true] call CBA_fnc_addKeybind;
|
||||
|
||||
["ACE3 Scope Adjustment", QGVAR(AdjustUpMajor), localize LSTRING(AdjustUpMajor),
|
||||
{
|
||||
["ACE3 Scope Adjustment", QGVAR(AdjustUpMajor), localize LSTRING(AdjustUpMajor), {
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
@ -101,12 +86,9 @@ if (!hasInterface) exitWith {};
|
||||
|
||||
// Statement
|
||||
[ACE_player, ELEVATION_UP, MAJOR_INCREMENT] call FUNC(adjustScope);
|
||||
},
|
||||
{false},
|
||||
[201, [true, false, false]], true] call CBA_fnc_addKeybind;
|
||||
}, {false}, [201, [true, false, false]], true] call CBA_fnc_addKeybind;
|
||||
|
||||
["ACE3 Scope Adjustment", QGVAR(AdjustDownMajor), localize LSTRING(AdjustDownMajor),
|
||||
{
|
||||
["ACE3 Scope Adjustment", QGVAR(AdjustDownMajor), localize LSTRING(AdjustDownMajor), {
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
@ -116,12 +98,9 @@ if (!hasInterface) exitWith {};
|
||||
|
||||
// Statement
|
||||
[ACE_player, ELEVATION_DOWN, MAJOR_INCREMENT] call FUNC(adjustScope);
|
||||
},
|
||||
{false},
|
||||
[209, [true, false, false]], true] call CBA_fnc_addKeybind;
|
||||
}, {false}, [209, [true, false, false]], true] call CBA_fnc_addKeybind;
|
||||
|
||||
["ACE3 Scope Adjustment", QGVAR(AdjustLeftMajor), localize LSTRING(AdjustLeftMajor),
|
||||
{
|
||||
["ACE3 Scope Adjustment", QGVAR(AdjustLeftMajor), localize LSTRING(AdjustLeftMajor), {
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
@ -131,12 +110,9 @@ if (!hasInterface) exitWith {};
|
||||
|
||||
// Statement
|
||||
[ACE_player, WINDAGE_LEFT, MAJOR_INCREMENT] call FUNC(adjustScope);
|
||||
},
|
||||
{false},
|
||||
[209, [true, true, false]], true] call CBA_fnc_addKeybind;
|
||||
}, {false}, [209, [true, true, false]], true] call CBA_fnc_addKeybind;
|
||||
|
||||
["ACE3 Scope Adjustment", QGVAR(AdjustRightMajor), localize LSTRING(AdjustRightMajor),
|
||||
{
|
||||
["ACE3 Scope Adjustment", QGVAR(AdjustRightMajor), localize LSTRING(AdjustRightMajor), {
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
@ -146,9 +122,7 @@ if (!hasInterface) exitWith {};
|
||||
|
||||
// Statement
|
||||
[ACE_player, WINDAGE_RIGHT, MAJOR_INCREMENT] call FUNC(adjustScope);
|
||||
},
|
||||
{false},
|
||||
[201, [true, true, false]], true] call CBA_fnc_addKeybind;
|
||||
}, {false}, [201, [true, true, false]], true] call CBA_fnc_addKeybind;
|
||||
|
||||
|
||||
// Register fire event handler
|
||||
|
@ -17,8 +17,8 @@ GVAR(currentAngle) = 0;
|
||||
["ace_interactMenuOpened", {[ACE_player] call FUNC(handleInteractMenuOpened)}] call CBA_fnc_addEventHandler;
|
||||
|
||||
// Cancel adjusting on player change.
|
||||
["ace_playerChanged", {_this call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
|
||||
["ace_playerVehicleChanged", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
|
||||
["unit", FUNC(handlePlayerChanged)] call CBA_fnc_addPlayerEventHandler;
|
||||
["vehicle", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call CBA_fnc_addPlayerEventHandler;
|
||||
|
||||
// handle falling unconscious
|
||||
["ace_unconscious", {_this call FUNC(handleUnconscious)}] call CBA_fnc_addEventHandler;
|
||||
|
@ -16,9 +16,9 @@ GVAR(digDirection) = 0;
|
||||
["ace_interactMenuOpened", {[ACE_player] call FUNC(handleInteractMenuOpened)}] call CBA_fnc_addEventHandler;
|
||||
|
||||
// Cancel dig on player change. This does work when returning to lobby, but not when hard disconnecting.
|
||||
["ace_playerChanged", {_this call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
|
||||
["ace_playerInventoryChanged", {_this call FUNC(handlePlayerInventoryChanged)}] call CBA_fnc_addEventHandler;
|
||||
["ace_playerVehicleChanged", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
|
||||
["unit", FUNC(handlePlayerChanged)] call CBA_fnc_addPlayerEventHandler;
|
||||
["loadout", FUNC(handlePlayerInventoryChanged)] call CBA_fnc_addPlayerEventHandler;
|
||||
["vehicle", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call CBA_fnc_addPlayerEventHandler;
|
||||
|
||||
// handle waking up dragged unit and falling unconscious while dragging
|
||||
["ace_unconscious", {_this call FUNC(handleUnconscious)}] call CBA_fnc_addEventHandler;
|
||||
|
@ -10,8 +10,8 @@ GVAR(height) = 0;
|
||||
["ace_interactMenuOpened", {[ACE_player] call FUNC(handleInteractMenuOpened)}] call CBA_fnc_addEventHandler;
|
||||
|
||||
// Cancel adjusting on player change.
|
||||
["ace_playerChanged", {_this call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
|
||||
["ace_playerVehicleChanged", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
|
||||
["unit", FUNC(handlePlayerChanged)] call CBA_fnc_addPlayerEventHandler;
|
||||
["vehicle", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call CBA_fnc_addPlayerEventHandler;
|
||||
|
||||
// handle falling unconscious
|
||||
["ace_unconscious", {_this call FUNC(handleUnconscious)}] call CBA_fnc_addEventHandler;
|
||||
|
@ -23,7 +23,7 @@ if (!hasInterface) exitWith {};
|
||||
|
||||
// Set the EH which waits for a vehicle change to automatically swap between On Foot/In Land Vehicle/In Air Vehicle
|
||||
// Also run when SettingsInitialized runs (not guaranteed)
|
||||
["ace_playerVehicleChanged",{
|
||||
["vehicle",{
|
||||
[false] call FUNC(adaptViewDistance);
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
}] call CBA_fnc_addPlayerEventHandler;
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
@ -632,6 +632,9 @@ Author:
|
||||
#define CFGSETTINGS CFGSETTINGSS(PREFIX,COMPONENT)
|
||||
#define PATHTO(var1) PATHTO_SYS(PREFIX,COMPONENT_F,var1)
|
||||
#define PATHTOF(var1) PATHTOF_SYS(PREFIX,COMPONENT,var1)
|
||||
#define PATHTOEF(var1,var2) PATHTOF_SYS(PREFIX,var1,var2)
|
||||
#define QPATHTOF(var1) QUOTE(PATHTOF(var1))
|
||||
#define QPATHTOEF(var1,var2) QUOTE(PATHTOEF(var1,var2))
|
||||
|
||||
#define COMPILE_FILE(var1) COMPILE_FILE_SYS(PREFIX,COMPONENT_F,var1)
|
||||
#define COMPILE_FILE_CFG(var1) COMPILE_FILE_CFG_SYS(PREFIX,COMPONENT_F,var1)
|
||||
@ -674,6 +677,8 @@ Author:
|
||||
#define EGVAR(var1,var2) TRIPLES(PREFIX,var1,var2)
|
||||
#define QGVAR(var1) QUOTE(GVAR(var1))
|
||||
#define QEGVAR(var1,var2) QUOTE(EGVAR(var1,var2))
|
||||
#define QQGVAR(var1) QUOTE(QGVAR(var1))
|
||||
#define QQEGVAR(var1,var2) QUOTE(QEGVAR(var1,var2))
|
||||
|
||||
/* -------------------------------------------
|
||||
Macro: GVARMAIN()
|
||||
@ -693,6 +698,7 @@ Author:
|
||||
------------------------------------------- */
|
||||
#define GVARMAIN(var1) GVARMAINS(PREFIX,var1)
|
||||
#define QGVARMAIN(var1) QUOTE(GVARMAIN(var1))
|
||||
#define QQGVARMAIN(var1) QUOTE(QGVARMAIN(var1))
|
||||
// TODO: What's this?
|
||||
#define SETTINGS DOUBLES(PREFIX,settings)
|
||||
#define CREATELOGIC CREATELOGICS(PREFIX,COMPONENT)
|
||||
@ -719,6 +725,14 @@ Author:
|
||||
#define FUNCMAIN(var1) TRIPLES(PREFIX,fnc,var1)
|
||||
#define FUNC_INNER(var1,var2) TRIPLES(DOUBLES(PREFIX,var1),fnc,var2)
|
||||
#define EFUNC(var1,var2) FUNC_INNER(var1,var2)
|
||||
#define QFUNC(var1) QUOTE(FUNC(var1))
|
||||
#define QFUNCMAIN(var1) QUOTE(FUNCMAIN(var1))
|
||||
#define QFUNC_INNER(var1,var2) QUOTE(FUNC_INNER(var1,var2))
|
||||
#define QEFUNC(var1,var2) QUOTE(EFUNC(var1,var2))
|
||||
#define QQFUNC(var1) QUOTE(QFUNC(var1))
|
||||
#define QQFUNCMAIN(var1) QUOTE(QFUNCMAIN(var1))
|
||||
#define QQFUNC_INNER(var1,var2) QUOTE(QFUNC_INNER(var1,var2))
|
||||
#define QQEFUNC(var1,var2) QUOTE(QEFUNC(var1,var2))
|
||||
|
||||
#ifndef PRELOAD_ADDONS
|
||||
#define PRELOAD_ADDONS class CfgAddons \
|
||||
@ -1258,6 +1272,39 @@ Author:
|
||||
TEST_FAIL('(A OPERATOR B)') \
|
||||
};
|
||||
|
||||
/* -------------------------------------------
|
||||
Macro: TEST_DEFINED_AND_OP()
|
||||
Tests that A and B are defined and (A OPERATOR B) is true.
|
||||
If the test fails, an error is raised with the given MESSAGE.
|
||||
|
||||
Parameters:
|
||||
A - First value [Any]
|
||||
OPERATOR - Binary operator to use [Operator]
|
||||
B - Second value [Any]
|
||||
MESSSAGE - Message to display [String]
|
||||
|
||||
Example:
|
||||
(begin example)
|
||||
TEST_OP(_fish,>,5,"Too few fish!");
|
||||
(end)
|
||||
|
||||
Author:
|
||||
Killswitch, PabstMirror
|
||||
------------------------------------------- */
|
||||
#define TEST_DEFINED_AND_OP(A,OPERATOR,B,MESSAGE) \
|
||||
if (isNil #A) then { \
|
||||
TEST_FAIL('(A is not defined) ' + (MESSAGE)); \
|
||||
} else { \
|
||||
if (isNil #B) then { \
|
||||
TEST_FAIL('(B is not defined) ' + (MESSAGE)); \
|
||||
} else { \
|
||||
if ((A) OPERATOR (B)) then { \
|
||||
TEST_SUCCESS('(A OPERATOR B) ' + (MESSAGE)) \
|
||||
} else { \
|
||||
TEST_FAIL('(A OPERATOR B) ' + (MESSAGE)) \
|
||||
}; }; };
|
||||
|
||||
|
||||
/* -------------------------------------------
|
||||
Macro: TEST_DEFINED()
|
||||
Tests that a VARIABLE is defined.
|
||||
@ -1417,3 +1464,5 @@ Author:
|
||||
#define XEH_POST_INIT QUOTE(call COMPILE_FILE(XEH_PostInit_Once))
|
||||
#define XEH_POST_CINIT QUOTE(call COMPILE_FILE(XEH_PostClientInit_Once))
|
||||
#define XEH_POST_SINIT QUOTE(call COMPILE_FILE(XEH_PostServerInit_Once))
|
||||
|
||||
#define IS_LINUX (productVersion select 2 <= 154)
|
||||
|
@ -27,7 +27,9 @@ firedNear = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_fir
|
||||
fuel = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_cba_xeh_fuel"")"; \
|
||||
gear = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_gear"")"; \
|
||||
getIn = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_getIn"")"; \
|
||||
getInMan = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_getInMan"")"; \
|
||||
getOut = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_getOut"")"; \
|
||||
getOutMan = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_getOutMan"")"; \
|
||||
handleHeal = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_handleHeal"")"; \
|
||||
hit = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_hit"")"; \
|
||||
hitPart = "{_this call _x} forEach ((_this select 0 select 0) getVariable ""cba_xeh_hitPart"")"; \
|
||||
@ -42,11 +44,13 @@ respawn = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_respa
|
||||
put = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_put"")"; \
|
||||
take = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_take"")"; \
|
||||
seatSwitched = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_seatSwitched"")"; \
|
||||
seatSwitchedMan = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_seatSwitchedMan"")"; \
|
||||
soundPlayed = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_soundPlayed"")"; \
|
||||
weaponAssembled = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_weaponAssembled"")"; \
|
||||
weaponDisassembled = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_weaponDisassembled"")"; \
|
||||
weaponDeployed = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_weaponDeployed"")"; \
|
||||
weaponRested = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_weaponRested"")";
|
||||
weaponRested = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_weaponRested"")"; \
|
||||
reloaded = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_reloaded"")";
|
||||
|
||||
|
||||
/*
|
||||
@ -73,7 +77,9 @@ firedNear = ""; \
|
||||
fuel = ""; \
|
||||
gear = ""; \
|
||||
getIn = ""; \
|
||||
getInMan = ""; \
|
||||
getOut = ""; \
|
||||
getOutMan = ""; \
|
||||
handleHeal = ""; \
|
||||
hit = ""; \
|
||||
hitPart = ""; \
|
||||
@ -92,4 +98,5 @@ soundPlayed = ""; \
|
||||
weaponAssembled = ""; \
|
||||
weaponDisassembled = ""; \
|
||||
weaponDeployed = ""; \
|
||||
weaponRested = "";
|
||||
weaponRested = ""; \
|
||||
reloaded = "";
|
||||
|
Loading…
Reference in New Issue
Block a user