mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
manual merge
This commit is contained in:
commit
7512c4e52e
@ -51,7 +51,7 @@ if (_unit == _attachToVehicle) then { //Self Attachment
|
||||
|
||||
[_unit, "forceWalk", "ACE_Attach", true] call EFUNC(common,statusEffect_set);
|
||||
|
||||
[{[localize LSTRING(PlaceAction), ""] call EFUNC(interaction,showMouseHint)}, []] call EFUNC(common,execNextFrame);
|
||||
[{[localize LSTRING(PlaceAction), ""] call EFUNC(interaction,showMouseHint)}, []] call CBA_fnc_execNextFrame;
|
||||
_unit setVariable [QGVAR(placeActionEH), [_unit, "DefaultAction", {true}, {GVAR(placeAction) = PLACE_APPROVE;}] call EFUNC(common,AddActionEventHandler)];
|
||||
|
||||
_actionID = _unit addAction [format ["<t color='#FF0000'>%1</t>", localize LSTRING(CancelAction)], {GVAR(placeAction) = PLACE_CANCEL}];
|
||||
|
@ -57,7 +57,7 @@ if (toLower _itemName in ["b_ir_grenade", "o_ir_grenade", "i_ir_grenade"]) then
|
||||
detach _attachedObject;
|
||||
_attachedObject setPos ((getPos _unit) vectorAdd [0, 0, -1000]);
|
||||
// Delete attached item after 0.5 seconds
|
||||
[{deleteVehicle (_this select 0)}, [_attachedObject], 2] call EFUNC(common,waitAndExecute);
|
||||
[{deleteVehicle (_this select 0)}, [_attachedObject], 2] call CBA_fnc_waitAndExecute;
|
||||
} else {
|
||||
// Delete attached item
|
||||
deleteVehicle _attachedObject;
|
||||
|
@ -31,7 +31,7 @@ _actions = [];
|
||||
if (getText (_item >> "ACE_Attachable") != "") then {
|
||||
_displayName = getText(_item >> "displayName");
|
||||
_picture = getText(_item >> "picture");
|
||||
_action = [_x, _displayName, _picture, {[{_this call FUNC(attach)}, _this] call EFUNC(common,execNextFrame)}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction);
|
||||
_action = [_x, _displayName, _picture, {[{_this call FUNC(attach)}, _this] call CBA_fnc_execNextFrame}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction);
|
||||
_actions pushBack [_action, [], _target];
|
||||
};
|
||||
};
|
||||
@ -44,7 +44,7 @@ _actions = [];
|
||||
if (getText (_item >> "ACE_Attachable") != "") then {
|
||||
_displayName = getText(_item >> "displayName");
|
||||
_picture = getText(_item >> "picture");
|
||||
_action = [_x, _displayName, _picture, {[{_this call FUNC(attach)}, _this] call EFUNC(common,execNextFrame)}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction);
|
||||
_action = [_x, _displayName, _picture, {[{_this call FUNC(attach)}, _this] call CBA_fnc_execNextFrame}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction);
|
||||
_actions pushBack [_action, [], _target];
|
||||
};
|
||||
};
|
||||
|
@ -36,7 +36,7 @@ if (!isNull _xObject) then {
|
||||
params ["_detachedLight"];
|
||||
TRACE_1("delayed delete",_detachedLight);
|
||||
deleteVehicle _detachedLight;
|
||||
}, [_xObject], 2] call EFUNC(common,waitAndExecute);
|
||||
}, [_xObject], 2] call CBA_fnc_waitAndExecute;
|
||||
(_attachedList select 0) set [0, objNull];
|
||||
};
|
||||
|
||||
|
@ -32,7 +32,7 @@ if ((count _attachedList) == 0) exitWith {};
|
||||
//If it's a vehicle, also delete the attached
|
||||
if (!(_deadUnit isKindOf "CAManBase")) then {
|
||||
_xObject setPos ((getPos _deadUnit) vectorAdd [0, 0, -1000]);
|
||||
[{deleteVehicle (_this select 0)}, [_xObject], 2] call EFUNC(common,waitAndExecute);
|
||||
[{deleteVehicle (_this select 0)}, [_xObject], 2] call CBA_fnc_waitAndExecute;
|
||||
};
|
||||
} forEach _attachedList;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
// Hold on a little bit longer to ensure anims will work
|
||||
[{
|
||||
GVAR(captivityEnabled) = true;
|
||||
}, [], 0.05] call EFUNC(common,waitAndExecute);
|
||||
}, [], 0.05] call CBA_fnc_waitAndExecute;
|
||||
}] call EFUNC(common,addEventHandler);
|
||||
|
||||
//Handles when someone starts escorting and then disconnects, leaving the captive attached
|
||||
|
@ -32,7 +32,7 @@ if (!isServer) exitWith {};
|
||||
TRACE_2("event",_x,local _x);
|
||||
["SetHandcuffed", [_x], [_x, true]] call EFUNC(common,targetEvent);
|
||||
} forEach _units;
|
||||
}, [_units], 0.05] call EFUNC(common,waitAndExecute);
|
||||
}, [_units], 0.05] call CBA_fnc_waitAndExecute;
|
||||
|
||||
if (!isNull _logic) then {
|
||||
deleteVehicle _logic;
|
||||
|
@ -32,7 +32,7 @@ if (!isServer) exitWith {};
|
||||
TRACE_2("event",_x,local _x);
|
||||
["SetSurrendered", [_x], [_x, true]] call EFUNC(common,targetEvent);
|
||||
} forEach _units;
|
||||
}, [_units], 0.05] call EFUNC(common,waitAndExecute);
|
||||
}, [_units], 0.05] call CBA_fnc_waitAndExecute;
|
||||
|
||||
if (!isNull _logic) then {
|
||||
deleteVehicle _logic;
|
||||
|
@ -27,7 +27,7 @@ if !(missionNamespace getVariable [QGVAR(captivityEnabled), false]) exitWith {
|
||||
// It's to soon to call this function, delay it
|
||||
if (EGVAR(common,settingsInitFinished)) then {
|
||||
// Settings are already initialized, but the small wait isn't over
|
||||
[DFUNC(setHandCuffed), _this, 0.05] call EFUNC(common,waitAndExecute);
|
||||
[DFUNC(setHandCuffed), _this, 0.05] call CBA_fnc_waitAndExecute;
|
||||
} else {
|
||||
// Settings are not initialized yet
|
||||
[DFUNC(setHandCuffed), _this] call EFUNC(common,runAfterSettingsInit);
|
||||
@ -98,7 +98,7 @@ if (_state) then {
|
||||
TRACE_2("Adding animChangedEH",_unit,_animChangedEHID);
|
||||
_unit setVariable [QGVAR(handcuffAnimEHID), _animChangedEHID];
|
||||
|
||||
}, [_unit], 0.01] call EFUNC(common,waitAndExecute);
|
||||
}, [_unit], 0.01] call CBA_fnc_waitAndExecute;
|
||||
} else {
|
||||
_unit setVariable [QGVAR(isHandcuffed), false, true];
|
||||
[_unit, "setCaptive", QGVAR(Handcuffed), false] call EFUNC(common,statusEffect_set);
|
||||
|
@ -27,7 +27,7 @@ if !(missionNamespace getVariable [QGVAR(captivityEnabled), false]) exitWith {
|
||||
// It's to soon to call this function, delay it
|
||||
if (EGVAR(common,settingsInitFinished)) then {
|
||||
// Settings are already initialized, but the small wait isn't over
|
||||
[DFUNC(setSurrendered), _this, 0.05] call EFUNC(common,waitAndExecute);
|
||||
[DFUNC(setSurrendered), _this, 0.05] call CBA_fnc_waitAndExecute;
|
||||
} else {
|
||||
// Settings are not initialized yet
|
||||
[DFUNC(setSurrendered), _this] call EFUNC(common,runAfterSettingsInit);
|
||||
@ -73,7 +73,7 @@ if (_state) then {
|
||||
}];
|
||||
_unit setVariable [QGVAR(surrenderAnimEHID), _animChangedEHID];
|
||||
};
|
||||
}, [_unit], 0.01] call EFUNC(common,waitAndExecute);
|
||||
}, [_unit], 0.01] call CBA_fnc_waitAndExecute;
|
||||
} else {
|
||||
_unit setVariable [QGVAR(isSurrendering), false, true];
|
||||
[_unit, "setCaptive", QGVAR(Surrendered), false] call EFUNC(common,statusEffect_set);
|
||||
|
@ -33,7 +33,7 @@ class Extended_InitPost_EventHandlers {
|
||||
};
|
||||
class CAManBase {
|
||||
class GVAR(setName) {
|
||||
init = QUOTE(if (local (_this select 0)) then {[ARR_2(FUNC(setName),_this)] call FUNC(execNextFrame)};);
|
||||
init = QUOTE(if (local (_this select 0)) then {[ARR_2(FUNC(setName),_this)] call CBA_fnc_execNextFrame};);
|
||||
};
|
||||
class GVAR(muteUnit) {
|
||||
init = QUOTE(_this call FUNC(muteUnitHandleInitPost));
|
||||
|
@ -3,47 +3,6 @@
|
||||
// #define DEBUG_MODE_FULL
|
||||
#include "script_component.hpp"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// PFHs
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
//Singe PFEH to handle execNextFrame, waitAndExec and waitUntilAndExec:
|
||||
[{
|
||||
BEGIN_COUNTER(waitAndExec);
|
||||
|
||||
//Handle the waitAndExec array:
|
||||
while {!(GVAR(waitAndExecArray) isEqualTo []) && {GVAR(waitAndExecArray) select 0 select 0 <= CBA_missionTime}} do {
|
||||
private _entry = GVAR(waitAndExecArray) deleteAt 0;
|
||||
(_entry select 2) call (_entry select 1);
|
||||
};
|
||||
|
||||
//Handle the execNextFrame array:
|
||||
{
|
||||
(_x select 0) call (_x select 1);
|
||||
false
|
||||
} count GVAR(nextFrameBufferA);
|
||||
|
||||
//Swap double-buffer:
|
||||
GVAR(nextFrameBufferA) = GVAR(nextFrameBufferB);
|
||||
GVAR(nextFrameBufferB) = [];
|
||||
GVAR(nextFrameNo) = diag_frameno + 1;
|
||||
|
||||
//Handle the waitUntilAndExec array:
|
||||
{
|
||||
// if condition is satisifed call statement
|
||||
if ((_x select 2) call (_x select 0)) then {
|
||||
// make sure to delete the correct handle when multiple conditions are met in one frame
|
||||
GVAR(waitUntilAndExecArray) deleteAt (GVAR(waitUntilAndExecArray) find _x);
|
||||
(_x select 2) call (_x select 1);
|
||||
};
|
||||
nil
|
||||
} count +GVAR(waitUntilAndExecArray);
|
||||
|
||||
END_COUNTER(waitAndExec);
|
||||
}, 0, []] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// Get Map Data
|
||||
//////////////////////////////////////////////////
|
||||
@ -334,6 +293,7 @@ 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;
|
||||
@ -385,7 +345,32 @@ GVAR(OldIsCamera) = false;
|
||||
if !(_data isEqualTo GVAR(OldPlayerInventory)) then {
|
||||
// Raise ACE event locally
|
||||
GVAR(OldPlayerInventory) = _data;
|
||||
["playerInventoryChanged", [ACE_player, [ACE_player, false] call FUNC(getAllGear) ]] call FUNC(localEvent);
|
||||
|
||||
// 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;
|
||||
["playerInventoryChanged", [ACE_player, [ACE_player, false] call FUNC(getAllGear)]] call FUNC(localEvent);
|
||||
};
|
||||
};
|
||||
|
||||
// "playerVisionModeChanged" event
|
||||
|
@ -46,6 +46,8 @@ if (isServer) then {
|
||||
GVAR(statusEffect_Names) = [];
|
||||
GVAR(statusEffect_isGlobal) = [];
|
||||
|
||||
GVAR(setHearingCapabilityMap) = [];
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// Set up PlayerChanged eventhandler for pre init (EH is installed in postInit)
|
||||
//////////////////////////////////////////////////
|
||||
|
@ -15,18 +15,6 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params [["_unit", objNull, [objNull]]];
|
||||
ACE_DEPRECATED("ace_common_fnc_binocularMagazine","3.8.0","CBA_fnc_binocularMagazine");
|
||||
|
||||
private _binocular = binocular _unit;
|
||||
|
||||
scopeName "main";
|
||||
|
||||
{
|
||||
if ((_x select 0) isEqualTo _binocular) then {
|
||||
// note: if there is no magazine, _x(4,0) will be nil, which skips the breakOut.
|
||||
(_x select 4 select 0) breakOut "main";
|
||||
};
|
||||
false
|
||||
} count weaponsitems _unit;
|
||||
|
||||
""
|
||||
_this call CBA_fnc_binocularMagazine
|
||||
|
@ -79,7 +79,7 @@ if (!isServer) then {
|
||||
params ["_rscLayer"];
|
||||
TRACE_2("Hiding Error message after 10 seconds",time,_rscLayer);
|
||||
_rscLayer cutFadeOut 0.2;
|
||||
}, [_rscLayer], 10] call FUNC(waitAndExecute);
|
||||
}, [_rscLayer], 10] call CBA_fnc_waitAndExecute;
|
||||
};
|
||||
};
|
||||
|
||||
@ -89,7 +89,7 @@ if (!isServer) then {
|
||||
TRACE_2("Player is alive, showing msg and exiting",time,_text);
|
||||
_text = composeText [parseText format ["<t align='center'>%1</t>", _text]];
|
||||
["[ACE] ERROR", _text, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);
|
||||
}, [_text]] call FUNC(waitUntilAndExecute);
|
||||
}, [_text]] call CBA_fnc_waitUntilAndExecute;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -104,7 +104,7 @@ if (_show) then {
|
||||
if (_timeAlive >= 0) then {
|
||||
[{
|
||||
[_this select 0, false, "", [0,0,0], 0] call FUNC(displayIcon);
|
||||
}, [_iconId], _timeAlive, _timeAlive] call FUNC(waitAndExecute);
|
||||
}, [_iconId], _timeAlive, _timeAlive] call CBA_fnc_waitAndExecute;
|
||||
};
|
||||
|
||||
} else {
|
||||
|
@ -33,5 +33,5 @@ if (_time > _lastHintTime + _delay || {_priority >= _lastHintPriority}) then {
|
||||
GVAR(lastHint) set [0, _time];
|
||||
GVAR(lastHint) set [1, _priority];
|
||||
|
||||
[{if ((_this select 0) == GVAR(lastHint) select 0) then {hintSilent ""};}, [_time], _delay, 0] call FUNC(waitAndExecute);
|
||||
[{if ((_this select 0) == GVAR(lastHint) select 0) then {hintSilent ""};}, [_time], _delay, 0] call CBA_fnc_waitAndExecute;
|
||||
};
|
||||
|
@ -13,10 +13,6 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_func", "_params"];
|
||||
ACE_DEPRECATED("ace_common_fnc_execNextFrame","3.8.0","CBA_fnc_execNextFrame");
|
||||
|
||||
if (diag_frameno != GVAR(nextFrameNo)) then {
|
||||
GVAR(nextFrameBufferA) pushBack [_params, _func];
|
||||
} else {
|
||||
GVAR(nextFrameBufferB) pushBack [_params, _func];
|
||||
};
|
||||
_this call CBA_fnc_execNextFrame;
|
||||
|
@ -19,4 +19,4 @@ if (!local _this) exitWith {};
|
||||
[_this, "blockDamage", "fixCollision", true] call FUNC(statusEffect_set);
|
||||
|
||||
// re-allow damage after 2 seconds
|
||||
[{[_this, "blockDamage", "fixCollision", false] call FUNC(statusEffect_set);}, _this, 2] call EFUNC(common,waitAndExecute);
|
||||
[{[_this, "blockDamage", "fixCollision", false] call FUNC(statusEffect_set);}, _this, 2] call CBA_fnc_waitAndExecute;
|
||||
|
@ -64,5 +64,5 @@ if (isNull _unit) exitWith {[
|
||||
handgunWeapon _unit, handgunItems _unit, handgunMagazine _unit,
|
||||
assignedItems _unit,
|
||||
binocular _unit,
|
||||
[_unit] call FUNC(binocularMagazine)
|
||||
[_unit] call CBA_fnc_binocularMagazine
|
||||
]
|
||||
|
@ -12,12 +12,6 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_item"];
|
||||
ACE_DEPRECATED("ace_common_fnc_getConfigType","3.8.0","CBA_fnc_getItemConfig");
|
||||
|
||||
if (isClass (configFile >> "CfgWeapons" >> _item)) exitWith {"CfgWeapons"};
|
||||
|
||||
if (isClass (configFile >> "CfgMagazines" >> _item)) exitWith {"CfgMagazines"};
|
||||
|
||||
if (isClass (configFile >> "CfgGlasses" >> _item)) exitWith {"CfgGlasses"};
|
||||
|
||||
""
|
||||
configName (configHierarchy (_item call CBA_fnc_getItemConfig) param [1, configNull])
|
||||
|
@ -12,10 +12,6 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_object"];
|
||||
ACE_DEPRECATED("ace_common_fnc_getConfigTypeObject","3.8.0","CBA_fnc_getObjectConfig");
|
||||
|
||||
if (isClass (configFile >> "CfgVehicles" >> _object)) exitWith {"CfgVehicles"};
|
||||
|
||||
if (isClass (configFile >> "CfgAmmo" >> _object)) exitWith {"CfgAmmo"};
|
||||
|
||||
""
|
||||
configName (configHierarchy (_item call CBA_fnc_getObjectConfig) param [1, configNull])
|
||||
|
@ -15,9 +15,11 @@
|
||||
|
||||
params ["_item"];
|
||||
|
||||
private _cfgType = [_item] call FUNC(getConfigType);
|
||||
private _config = _item call CBA_fnc_getItemConfig;
|
||||
|
||||
if (_cfgType == "") exitWith {["", ""]};
|
||||
if (isNull _config) exitWith {["", ""]};
|
||||
|
||||
private _cfgType = configName ((configHierarchy _config) param [1, configNull]);
|
||||
|
||||
if (_cfgType == "CfgGlasses") exitWith {["item", "glasses"]};
|
||||
|
||||
|
@ -14,19 +14,4 @@
|
||||
|
||||
params [["_vehicle", objNull, [objNull]]];
|
||||
|
||||
private _turrets = allTurrets [_vehicle, true];
|
||||
|
||||
private _turret = [];
|
||||
|
||||
{
|
||||
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
|
||||
_config = [_config, _x] call FUNC(getTurretConfigPath);
|
||||
|
||||
if (getNumber (_config >> "primaryObserver") == 1) exitWith {
|
||||
_turret = _x;
|
||||
};
|
||||
false
|
||||
} count _turrets;
|
||||
|
||||
_turret
|
||||
fullCrew [_vehicle, "commander", true] apply {_x select 3} param [0, []] // return
|
||||
|
@ -14,19 +14,6 @@
|
||||
|
||||
params [["_vehicle", objNull, [objNull]]];
|
||||
|
||||
private _turrets = allTurrets [_vehicle, true];
|
||||
|
||||
private _turret = [];
|
||||
|
||||
{
|
||||
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
|
||||
_config = [_config, _x] call FUNC(getTurretConfigPath);
|
||||
|
||||
if (getNumber (_config >> "isCopilot") == 1 && {getNumber (_config >> "primaryGunner") != 1} && {getNumber (_config >> "primaryObserver") != 1}) exitWith {
|
||||
_turret = _x;
|
||||
};
|
||||
false
|
||||
} count _turrets;
|
||||
|
||||
_turret
|
||||
fullCrew [_vehicle, "turret", true] apply {_x select 3} select {
|
||||
getNumber ([_vehicle, _x] call CBA_fnc_getTurret >> "isCopilot") == 1
|
||||
} param [0, []] // return
|
||||
|
@ -14,19 +14,4 @@
|
||||
|
||||
params [["_vehicle", objNull, [objNull]]];
|
||||
|
||||
private _turrets = allTurrets [_vehicle, true];
|
||||
|
||||
private _turret = [];
|
||||
|
||||
{
|
||||
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
|
||||
_config = [_config, _x] call FUNC(getTurretConfigPath);
|
||||
|
||||
if (getNumber (_config >> "primaryGunner") == 1) exitWith {
|
||||
_turret = _x;
|
||||
};
|
||||
false
|
||||
} count _turrets;
|
||||
|
||||
_turret
|
||||
fullCrew [_vehicle, "gunner", true] apply {_x select 3} param [0, []] // return
|
||||
|
@ -8,12 +8,14 @@
|
||||
* Return Value:
|
||||
* Turret Indecies <ARRAY>
|
||||
*
|
||||
* Public: Yes
|
||||
* Public: No
|
||||
*
|
||||
* Note: It's advised to use allTurrets [_vehicle, true] instead whenever possible
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
ACE_DEPRECATED("ace_common_fnc_getTurrets","3.7.0","allTurrets [_vehicle, true]");
|
||||
|
||||
params ["_type"];
|
||||
|
||||
private _varName = format [QGVAR(CachedTurrets_%1), _type];
|
||||
|
@ -14,19 +14,4 @@
|
||||
|
||||
params [["_vehicle", objNull, [objNull]]];
|
||||
|
||||
private _turrets = allTurrets [_vehicle, true];
|
||||
|
||||
private _turret = [];
|
||||
|
||||
{
|
||||
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
|
||||
_config = [_config, _x] call FUNC(getTurretConfigPath);
|
||||
|
||||
if (getNumber (_config >> "isPersonTurret") == 1) then {
|
||||
_turret pushBack _x;
|
||||
};
|
||||
false
|
||||
} count _turrets;
|
||||
|
||||
_turret
|
||||
fullCrew [_vehicle, "turret", true] select {_x select 4} apply {_x select 3} // return
|
||||
|
@ -14,24 +14,6 @@
|
||||
|
||||
params [["_vehicle", objNull, [objNull]]];
|
||||
|
||||
private _turrets = allTurrets [_vehicle, true];
|
||||
|
||||
private _turret = [];
|
||||
|
||||
{
|
||||
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
|
||||
_config = [_config, _x] call FUNC(getTurretConfigPath);
|
||||
|
||||
if (
|
||||
getNumber (_config >> "isCopilot") != 1
|
||||
&& {getNumber (_config >> "primaryGunner") != 1}
|
||||
&& {getNumber (_config >> "primaryObserver") != 1}
|
||||
&& {getNumber (_config >> "isPersonTurret") != 1}
|
||||
) then {
|
||||
_turret pushBack _x;
|
||||
};
|
||||
false
|
||||
} count _turrets;
|
||||
|
||||
_turret
|
||||
fullCrew [_vehicle, "turret", true] select {!(_x select 4)} apply {_x select 3} select {
|
||||
getNumber ([_vehicle, _x] call CBA_fnc_getTurret >> "isCopilot") != 1
|
||||
} // return
|
||||
|
@ -15,13 +15,6 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params [["_unit", objNull, [objNull]]];
|
||||
ACE_DEPRECATED("ace_common_fnc_removeBinocularMagazine","3.8.0","CBA_fnc_removeBinocularMagazine");
|
||||
|
||||
private _binocular = binocular _unit;
|
||||
private _selectBinocular = currentWeapon _unit == _binocular;
|
||||
|
||||
_unit addWeapon _binocular;
|
||||
|
||||
if (_selectBinocular) then {
|
||||
_unit selectWeapon _binocular;
|
||||
};
|
||||
_this call CBA_fnc_removeBinocularMagazine
|
||||
|
@ -5,48 +5,44 @@
|
||||
* Arguments:
|
||||
* 0: id <STRING>
|
||||
* 1: settings <NUMBER>
|
||||
* 2: add (default: true) <BOOL>
|
||||
* 2: add [true] OR remove [false] (default: true) <BOOL>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Public: Yes
|
||||
* Example:
|
||||
* ["earwax", 0.5, true] call ace_common_fnc_setHearingCapability
|
||||
*
|
||||
* Note: uses player
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_id", "_settings", ["_add", true]];
|
||||
|
||||
private _map = missionNamespace getVariable [QGVAR(setHearingCapabilityMap),[]];
|
||||
params ["_id", "_setting", ["_add", true]];
|
||||
|
||||
private _exists = false;
|
||||
|
||||
{
|
||||
if (_id == _x select 0) exitWith {
|
||||
_exists = true;
|
||||
if (_add) then {
|
||||
_x set [1, _settings];
|
||||
} else {
|
||||
_map set [_forEachIndex, 0];
|
||||
_map = _map - [0];
|
||||
};
|
||||
};
|
||||
} forEach _map;
|
||||
|
||||
if (!_exists && _add) then {
|
||||
_map pushBack [_id, _settings];
|
||||
};
|
||||
|
||||
missionNamespace setVariable [QGVAR(setHearingCapabilityMap), _map];
|
||||
|
||||
// find lowest volume
|
||||
private _lowestVolume = 1;
|
||||
|
||||
{
|
||||
_lowestVolume = (_x select 1) min _lowestVolume;
|
||||
false
|
||||
} count _map;
|
||||
GVAR(setHearingCapabilityMap) = GVAR(setHearingCapabilityMap) select {
|
||||
_x params ["_xID", "_xSetting"];
|
||||
if (_id == _xID) then {
|
||||
_exists = true;
|
||||
if (_add) then {
|
||||
_x set [1, _setting];
|
||||
_lowestVolume = _lowestVolume min _setting;
|
||||
true
|
||||
} else {
|
||||
false
|
||||
};
|
||||
} else {
|
||||
_lowestVolume = _lowestVolume min _xSetting;
|
||||
true
|
||||
};
|
||||
};
|
||||
|
||||
if (!_exists && _add) then {
|
||||
_lowestVolume = _lowestVolume min _setting;
|
||||
GVAR(setHearingCapabilityMap) pushBack [_id, _setting];
|
||||
};
|
||||
|
||||
// in game sounds
|
||||
0 fadeSound _lowestVolume;
|
||||
|
@ -50,4 +50,4 @@ TRACE_2("Starting Embargo", _varName, _delay);
|
||||
if (!(_value isEqualTo _curValue)) then {
|
||||
_this call FUNC(setVariablePublic);
|
||||
};
|
||||
}, _this, _delay] call FUNC(waitAndExecute);
|
||||
}, _this, _delay] call CBA_fnc_waitAndExecute;
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
#define GROUP_SWITCH_ID QUOTE(FUNC(loadPerson))
|
||||
#define GROUP_SWITCH_ID QFUNC(loadPerson)
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
#define GROUP_SWITCH_ID QUOTE(FUNC(loadPerson))
|
||||
#define GROUP_SWITCH_ID QFUNC(loadPerson)
|
||||
|
||||
params ["_unit", "_vehicle", ["_unloader", objNull]];
|
||||
TRACE_3("params",_unit,_vehicle,_unloader);
|
||||
@ -58,10 +58,10 @@ _unit action ["Eject", vehicle _unit];
|
||||
if ((_unit getVariable "ACE_isUnconscious") and (animationState _unit != _anim)) then {
|
||||
[_unit, _anim, 2, true] call FUNC(doAnimation);
|
||||
};
|
||||
}, [_unit, _anim], 0.5] call FUNC(waitAndExecute);
|
||||
}, [_unit, _anim], 0.5] call CBA_fnc_waitAndExecute;
|
||||
};
|
||||
};
|
||||
}, [_unit, _emptyPos], 0.5] call FUNC(waitAndExecute);
|
||||
}, [_unit, _emptyPos], 0.5] call CBA_fnc_waitAndExecute;
|
||||
|
||||
[_unit, false, GROUP_SWITCH_ID, side group _unit] call FUNC(switchToGroupSide);
|
||||
|
||||
|
@ -17,7 +17,6 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_func", "_params", "_delay"];
|
||||
ACE_DEPRECATED("ace_common_fnc_waitAndExecute","3.8.0","CBA_fnc_waitAndExecute");
|
||||
|
||||
GVAR(waitAndExecArray) pushBack [CBA_missionTime + _delay, _func, _params];
|
||||
GVAR(waitAndExecArray) sort true;
|
||||
_this call CBA_fnc_waitAndExecute;
|
||||
|
@ -17,7 +17,8 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
TRACE_1("Adding",_this);
|
||||
ACE_DEPRECATED("ace_common_fnc_waitUntilAndExecute","3.8.0","CBA_fnc_waitUntilAndExecute");
|
||||
|
||||
_this call CBA_fnc_waitUntilAndExecute;
|
||||
|
||||
GVAR(waitUntilAndExecArray) pushBack _this;
|
||||
nil
|
||||
|
@ -134,7 +134,7 @@ class CfgVehicles {
|
||||
distance = 4;
|
||||
condition = "true";
|
||||
//wait a frame to handle "Do When releasing action menu key" option:
|
||||
statement = QUOTE([ARR_2({_this call FUNC(deploy)}, [ARR_2(_target,_player)])] call EFUNC(common,execNextFrame));
|
||||
statement = QUOTE([ARR_2({_this call FUNC(deploy)}, [ARR_2(_target,_player)])] call CBA_fnc_execNextFrame);
|
||||
showDisabled = 0;
|
||||
exceptions[] = {};
|
||||
priority = 5;
|
||||
|
@ -18,7 +18,7 @@
|
||||
if (uiNamespace getVariable [QEGVAR(interact_menu,cursorMenuOpened),false]) exitWith {
|
||||
[{
|
||||
_this call FUNC(dismount);
|
||||
}, _this] call EFUNC(common,execNextFrame);
|
||||
}, _this] call CBA_fnc_execNextFrame;
|
||||
};
|
||||
params ["_wire", "_unit"];
|
||||
|
||||
|
@ -114,7 +114,7 @@ if (_mode == 1) then {
|
||||
_vDir = getDir _vehicle;
|
||||
_vehicle setPosASL (_vPos vectorAdd [-0.35 * sin(_vDir), -0.35 * cos(_vDir), 0]);
|
||||
// TODO: Needs to be placed in safe distance to wire, so we do not constantly re-spawn new wires
|
||||
}, [_vehicle, _wire], 0.1] call EFUNC(common,waitAndExecute);
|
||||
}, [_vehicle, _wire], 0.1] call CBA_fnc_waitAndExecute;
|
||||
};
|
||||
|
||||
//TODO: Create broken geoless wire (two version)
|
||||
|
@ -67,7 +67,7 @@ if (isNull _holder) exitWith {
|
||||
if (_holder getVariable [QGVAR(holderInUse), false]) exitWith {
|
||||
[{
|
||||
_this call FUNC(disarmDropItems);
|
||||
}, _this] call EFUNC(common,execNextFrame);
|
||||
}, _this] call CBA_fnc_execNextFrame;
|
||||
};
|
||||
_holder setVariable [QGVAR(holderInUse), true];
|
||||
|
||||
|
@ -39,7 +39,7 @@ _unit selectWeapon primaryWeapon _unit;
|
||||
[_unit, _target, true] call EFUNC(common,claim);
|
||||
|
||||
// can't play action that depends on weapon if it was added the same frame
|
||||
[{_this playActionNow "grabDrag";}, _unit] call EFUNC(common,execNextFrame);
|
||||
[{_this playActionNow "grabDrag";}, _unit] call CBA_fnc_execNextFrame;
|
||||
|
||||
// move a bit closer and adjust direction when trying to pick up a person
|
||||
if (_target isKindOf "CAManBase") then {
|
||||
|
@ -3,7 +3,7 @@ class ACE_ModuleExplosive: ACE_Module {
|
||||
author = ECSTRING(common,ACETeam);
|
||||
category = "ACE";
|
||||
displayName = CSTRING(Module_DisplayName);
|
||||
function = QUOTE(FUNC(module));
|
||||
function = QFUNC(module);
|
||||
scope = 2;
|
||||
isGlobal = 1;
|
||||
isSingular = 1;
|
||||
|
@ -45,7 +45,7 @@ _children = [];
|
||||
format ["Explosive_%1", _forEachIndex],
|
||||
format [_name + " (%1)", _itemCount select _forEachIndex],
|
||||
getText(_x >> "picture"),
|
||||
{[{_this call FUNC(setupExplosive)}, _this] call EFUNC(common,execNextFrame)},
|
||||
{[{_this call FUNC(setupExplosive)}, _this] call CBA_fnc_execNextFrame},
|
||||
{true},
|
||||
{},
|
||||
(configName _x)
|
||||
|
@ -49,6 +49,6 @@ if (getNumber (ConfigFile >> "CfgAmmo" >> typeOf (_item select 0) >> "TriggerWhe
|
||||
if (!isNull _explosive) then {
|
||||
_explosive setDamage 1;
|
||||
};
|
||||
}, [_item select 0], (_item select 1)] call EFUNC(common,waitAndExecute);
|
||||
}, [_item select 0], (_item select 1)] call CBA_fnc_waitAndExecute;
|
||||
|
||||
_result
|
||||
|
@ -40,7 +40,7 @@ if (_unit == ace_player) then {
|
||||
[{
|
||||
playSound3D [QUOTE(PATHTO_R(Data\Audio\Cellphone_Ring.wss)),objNull, false, getPosASL (_this select 1),3.16228,1,75];
|
||||
(_this select 0) setVariable [QGVAR(Dialing), false, true];
|
||||
}, [_unit,_explosive select 0], 0.25 * (count _arr - 4)] call EFUNC(common,waitAndExecute);
|
||||
}, [_unit,_explosive select 0], 0.25 * (count _arr - 4)] call CBA_fnc_waitAndExecute;
|
||||
[_explosive select 0,(0.25 * (count _arr - 1)) + (_explosive select 2)] call FUNC(startTimer);
|
||||
};
|
||||
};
|
||||
|
@ -187,7 +187,7 @@ GVAR(TweakedAngle) = 0;
|
||||
_unit removeMagazine _magClassname;
|
||||
_unit playActionNow "PutDown";
|
||||
_unit setVariable [QGVAR(PlantingExplosive), true];
|
||||
[{_this setVariable [QGVAR(PlantingExplosive), false]}, _unit, 1.5] call EFUNC(common,waitAndExecute);
|
||||
[{_this setVariable [QGVAR(PlantingExplosive), false]}, _unit, 1.5] call CBA_fnc_waitAndExecute;
|
||||
|
||||
};
|
||||
} else {
|
||||
|
@ -56,7 +56,7 @@ if (ACE_player != _unit) then {
|
||||
[_unit, _target] call FUNC(defuseExplosive);
|
||||
_unit enableAI "MOVE";
|
||||
_unit enableAI "TARGET";
|
||||
}, [_unit, _target], _defuseTime] call EFUNC(common,waitAndExecute);
|
||||
}, [_unit, _target], _defuseTime] call CBA_fnc_waitAndExecute;
|
||||
};
|
||||
} else {
|
||||
_unit playActionNow _actionToPlay;
|
||||
|
@ -25,4 +25,4 @@ TRACE_2("params",_explosive,_delay);
|
||||
if (!isNull _explosive) then {
|
||||
[_explosive, -1, [_explosive, 0]] call FUNC(detonateExplosive);
|
||||
};
|
||||
}, [_explosive], _delay] call EFUNC(common,waitAndExecute);
|
||||
}, [_explosive], _delay] call CBA_fnc_waitAndExecute;
|
||||
|
@ -22,7 +22,7 @@ class CfgVehicles {
|
||||
displayName = CSTRING(Module_FRIES_DisplayName);
|
||||
icon = QUOTE(PATHTOF(UI\Icon_Module_FRIES_ca.paa));
|
||||
category = "ACE";
|
||||
function = QUOTE(FUNC(moduleEquipFRIES));
|
||||
function = QFUNC(moduleEquipFRIES);
|
||||
functionPriority = 10;
|
||||
isGlobal = 0;
|
||||
isTriggerActivated = 0;
|
||||
|
@ -21,5 +21,5 @@ params ["_vehicle", "_fries"];
|
||||
if (isNull _vehicle) then {
|
||||
deleteVehicle _fries;
|
||||
} else {
|
||||
[FUNC(checkVehicleThread), _this, 5] call EFUNC(common,waitAndExecute);
|
||||
[FUNC(checkVehicleThread), _this, 5] call CBA_fnc_waitAndExecute;
|
||||
};
|
||||
|
@ -36,7 +36,7 @@ _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []];
|
||||
//Only delete the hook first so the rope falls down.
|
||||
//Note: ropeDetach was used here before, but the command seems a bit broken.
|
||||
deleteVehicle _hook;
|
||||
[{{deleteVehicle _x} count _this}, [_ropeTop, _ropeBottom, _dummy], 60] call EFUNC(common,waitAndExecute);
|
||||
[{{deleteVehicle _x} count _this}, [_ropeTop, _ropeBottom, _dummy], 60] call CBA_fnc_waitAndExecute;
|
||||
} count _deployedRopes;
|
||||
|
||||
_vehicle setVariable [QGVAR(deployedRopes), [], true];
|
||||
@ -50,4 +50,4 @@ if (isText (_config >> QGVAR(onCut))) then {
|
||||
|
||||
[{
|
||||
_this setVariable [QGVAR(deploymentStage), 0, true];
|
||||
}, _vehicle, _waitTime] call EFUNC(common,waitAndExecute);
|
||||
}, _vehicle, _waitTime] call CBA_fnc_waitAndExecute;
|
||||
|
@ -64,7 +64,7 @@ _deployTime = 0;
|
||||
if (getText (_config >> QGVAR(onPrepare)) != "") then {
|
||||
_deployTime = [_vehicle] call (missionNamespace getVariable (getText (_config >> QGVAR(onPrepare))));
|
||||
};
|
||||
[{[_this] call FUNC(deployRopes)}, _vehicle, _deployTime] call EFUNC(common,waitAndExecute);
|
||||
[{[_this] call FUNC(deployRopes)}, _vehicle, _deployTime] call CBA_fnc_waitAndExecute;
|
||||
driver _vehicle disableAI "MOVE";
|
||||
|
||||
DFUNC(deployAIRecursive) = {
|
||||
@ -80,8 +80,8 @@ DFUNC(deployAIRecursive) = {
|
||||
params ["_vehicle"];
|
||||
private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []];
|
||||
({!(_x select 5)} count (_deployedRopes)) > 0
|
||||
}, FUNC(deployAIRecursive), _this] call EFUNC(common,waitUntilAndExecute);
|
||||
}, [_vehicle, _unitsToDeploy], 1] call EFUNC(common,waitAndExecute);
|
||||
}, FUNC(deployAIRecursive), _this] call CBA_fnc_waitUntilAndExecute;
|
||||
}, [_vehicle, _unitsToDeploy], 1] call CBA_fnc_waitAndExecute;
|
||||
} else {
|
||||
[{
|
||||
private _deployedRopes = _this getVariable [QGVAR(deployedRopes), []];
|
||||
@ -89,8 +89,8 @@ DFUNC(deployAIRecursive) = {
|
||||
}, {
|
||||
[_this] call FUNC(cutRopes);
|
||||
driver _this enableAI "MOVE";
|
||||
}, _vehicle] call EFUNC(common,waitUntilAndExecute);
|
||||
}, _vehicle] call CBA_fnc_waitUntilAndExecute;
|
||||
};
|
||||
};
|
||||
|
||||
[FUNC(deployAIRecursive), [_vehicle, _unitsToDeploy], _deployTime + 4] call EFUNC(common,waitAndExecute);
|
||||
[FUNC(deployAIRecursive), [_vehicle, _unitsToDeploy], _deployTime + 4] call CBA_fnc_waitAndExecute;
|
||||
|
@ -35,6 +35,6 @@ if !(isNumber (_config >> QGVAR(enabled))) then {
|
||||
[_vehicle] call FUNC(cutRopes);
|
||||
};
|
||||
}];
|
||||
[FUNC(checkVehicleThread), [_vehicle, _fries], 5] call EFUNC(common,waitAndExecute);
|
||||
[FUNC(checkVehicleThread), [_vehicle, _fries], 5] call CBA_fnc_waitAndExecute;
|
||||
};
|
||||
};
|
||||
|
@ -30,7 +30,7 @@ if !(isNull _fries) then {
|
||||
_this animate ["dvere1_posunZ", 0];
|
||||
_this animate ["dvere2_posunZ", 0];
|
||||
_this setVariable [QGVAR(doorsLocked), false, true];
|
||||
}, _vehicle, 2] call EFUNC(common,waitAndExecute);
|
||||
}, _vehicle, 2] call CBA_fnc_waitAndExecute;
|
||||
|
||||
4
|
||||
} else {
|
||||
|
@ -35,7 +35,7 @@ if !(isNull _fries) then {
|
||||
[{
|
||||
_this animate ["extendHookRight", 1];
|
||||
_this animate ["extendHookLeft", 1];
|
||||
}, _fries, 2] call EFUNC(common,waitAndExecute);
|
||||
}, _fries, 2] call CBA_fnc_waitAndExecute;
|
||||
_waitTime = 4;
|
||||
};
|
||||
|
||||
|
@ -29,4 +29,4 @@ if (isText (_config >> QGVAR(onPrepare))) then {
|
||||
|
||||
[{
|
||||
_this setVariable [QGVAR(deploymentStage), 2, true];
|
||||
}, _vehicle, _waitTime] call EFUNC(common,waitAndExecute);
|
||||
}, _vehicle, _waitTime] call CBA_fnc_waitAndExecute;
|
||||
|
@ -22,6 +22,7 @@ private _min = getNumber (_turretConfig >> QGVAR(MinDistance));
|
||||
private _max = getNumber (_turretConfig >> QGVAR(MaxDistance));
|
||||
|
||||
private _distance = _vehicle getVariable [format ["%1_%2", QGVAR(Distance), _turret], _min];
|
||||
TRACE_4("",_distance,_delta,_min,_max);
|
||||
|
||||
_distance = _distance + _delta;
|
||||
_distance = _distance min _max;
|
||||
|
@ -15,6 +15,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
params ["_vehicle","_turret","_distance","_angleTarget"];
|
||||
TRACE_4("params",_vehicle,_turret,_distance,_angleTarget);
|
||||
|
||||
private _FCSMagazines = [];
|
||||
private _FCSElevation = [];
|
||||
|
@ -8,9 +8,13 @@
|
||||
* Return Value:
|
||||
* Boolean <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [] call ace_fcs_fnc_canUseFCS
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
getNumber ([configFile >> "CfgVehicles" >> typeOf vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex)] call EFUNC(common,getTurretConfigPath) >> QGVAR(Enabled)) == 1
|
||||
&& {cameraView == "GUNNER"} // return
|
||||
&& {cameraView == "GUNNER"}
|
||||
&& {!([ACE_player] call CBA_fnc_canUseWeapon)} //Not Turned Out
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_vehicle", "_turret", "_distance", ["_showHint", false], ["_playSound", true]];
|
||||
TRACE_5("params",_vehicle,_turret,_distance,_showHint,_playSound);
|
||||
|
||||
private _turretConfig = [configFile >> "CfgVehicles" >> typeOf _vehicle, _turret] call EFUNC(common,getTurretConfigPath);
|
||||
|
||||
@ -23,6 +24,8 @@ if (isNil "_distance") then {
|
||||
getNumber (_turretConfig >> QGVAR(MaxDistance)),
|
||||
getNumber (_turretConfig >> QGVAR(MinDistance))
|
||||
] call FUNC(getRange);
|
||||
} else {
|
||||
((uiNamespace getVariable ["ACE_dlgRangefinder", displayNull]) displayCtrl 1713151) ctrlSetText ([_distance, 4, 0] call CBA_fnc_formatNumber);
|
||||
};
|
||||
|
||||
// MOVING TARGETS
|
||||
|
@ -29,32 +29,73 @@ class asdg_MuzzleSlot_45ACP_SMG: asdg_MuzzleSlot { // for .45ACP universal mount
|
||||
ACE_muzzle_mzls_smg_01 = 1;
|
||||
};
|
||||
};
|
||||
class asdg_MuzzleSlot_762MG: asdg_MuzzleSlot { // for 7.62, 6.5 and 5.56 universal mount MG suppressors
|
||||
class compatibleItems {
|
||||
ACE_muzzle_mzls_B = 1;
|
||||
};
|
||||
};
|
||||
|
||||
class MuzzleSlot;
|
||||
|
||||
class CfgWeapons {
|
||||
|
||||
/* MX */
|
||||
|
||||
class Rifle;
|
||||
class Rifle_Base_F: Rifle {
|
||||
class Rifle_Base_F;
|
||||
|
||||
class Rifle_Long_Base_F: Rifle_Base_F {
|
||||
class WeaponSlotsInfo;
|
||||
};
|
||||
|
||||
class arifle_MX_Base_F: Rifle_Base_F {
|
||||
/* MX */
|
||||
class arifle_MX_Base_F: Rifle_Base_F {
|
||||
class WeaponSlotsInfo;
|
||||
};
|
||||
|
||||
class arifle_MXC_F: arifle_MX_Base_F {
|
||||
class WeaponSlotsInfo: WeaponSlotsInfo {
|
||||
class MuzzleSlot: MuzzleSlot {
|
||||
compatibleItems[] += {"ACE_muzzle_mzls_H"};
|
||||
class MuzzleSlot: asdg_MuzzleSlot_762 {
|
||||
class compatibleItems: compatibleItems {
|
||||
ACE_muzzle_mzls_H = 1;
|
||||
ACE_muzzle_mzls_B = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
class arifle_MX_F: arifle_MX_Base_F {
|
||||
class WeaponSlotsInfo: WeaponSlotsInfo {
|
||||
class MuzzleSlot: asdg_MuzzleSlot_762 {
|
||||
class compatibleItems: compatibleItems {
|
||||
ACE_muzzle_mzls_H = 1;
|
||||
ACE_muzzle_mzls_B = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
class arifle_MX_GL_F: arifle_MX_Base_F {
|
||||
class WeaponSlotsInfo: WeaponSlotsInfo {
|
||||
class MuzzleSlot: asdg_MuzzleSlot_762 {
|
||||
class compatibleItems: compatibleItems {
|
||||
ACE_muzzle_mzls_H = 1;
|
||||
ACE_muzzle_mzls_B = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class arifle_MX_SW_F: arifle_MX_Base_F {
|
||||
class WeaponSlotsInfo: WeaponSlotsInfo {
|
||||
class MuzzleSlot: MuzzleSlot {
|
||||
// Shit is broken again
|
||||
//compatibleItems[] += {"ACE_muzzle_mzls_H"};
|
||||
compatibleItems[] = {"muzzle_snds_H","muzzle_snds_H_SW","ACE_muzzle_mzls_H"};
|
||||
class MuzzleSlot: asdg_MuzzleSlot_762MG {
|
||||
class compatibleItems: compatibleItems {
|
||||
ACE_muzzle_mzls_H = 1;
|
||||
ACE_muzzle_mzls_B = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
class arifle_MXM_F: arifle_MX_Base_F {
|
||||
class WeaponSlotsInfo: WeaponSlotsInfo {
|
||||
class MuzzleSlot: asdg_MuzzleSlot_762 {
|
||||
class compatibleItems: compatibleItems {
|
||||
ACE_muzzle_mzls_H = 1;
|
||||
ACE_muzzle_mzls_B = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -62,41 +103,49 @@ class CfgWeapons {
|
||||
|
||||
/* Katiba */
|
||||
|
||||
class arifle_katiba_Base_F: Rifle_Base_F {
|
||||
class arifle_Katiba_Base_F: Rifle_Base_F {
|
||||
class WeaponSlotsInfo;
|
||||
};
|
||||
class arifle_Katiba_F: arifle_Katiba_Base_F {
|
||||
class WeaponSlotsInfo: WeaponSlotsInfo {
|
||||
class MuzzleSlot: MuzzleSlot {
|
||||
compatibleItems[] += {"ACE_muzzle_mzls_H"};
|
||||
class MuzzleSlot: asdg_MuzzleSlot_762 {
|
||||
class compatibleItems: compatibleItems {
|
||||
ACE_muzzle_mzls_H = 1;
|
||||
ACE_muzzle_mzls_B = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
class arifle_Katiba_C_F: arifle_Katiba_Base_F {
|
||||
class WeaponSlotsInfo: WeaponSlotsInfo {
|
||||
class MuzzleSlot: asdg_MuzzleSlot_762 {
|
||||
class compatibleItems: compatibleItems {
|
||||
ACE_muzzle_mzls_H = 1;
|
||||
ACE_muzzle_mzls_B = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
class arifle_Katiba_GL_F: arifle_Katiba_Base_F {
|
||||
class WeaponSlotsInfo: WeaponSlotsInfo {
|
||||
class MuzzleSlot: asdg_MuzzleSlot_762 {
|
||||
class compatibleItems: compatibleItems {
|
||||
ACE_muzzle_mzls_H = 1;
|
||||
ACE_muzzle_mzls_B = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
/* Other */
|
||||
|
||||
class Rifle_Long_Base_F: Rifle_Base_F {
|
||||
class WeaponSlotsInfo;
|
||||
};
|
||||
|
||||
class DMR_01_base_F: Rifle_Long_Base_F {
|
||||
class WeaponSlotsInfo: WeaponSlotsInfo {
|
||||
class MuzzleSlot: MuzzleSlot {
|
||||
compatibleItems[] += {"ACE_muzzle_mzls_B"};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class LMG_Mk200_F: Rifle_Long_Base_F {
|
||||
class WeaponSlotsInfo: WeaponSlotsInfo {
|
||||
class MuzzleSlot: MuzzleSlot {
|
||||
compatibleItems[] += {"ACE_muzzle_mzls_H"};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class LMG_Zafir_F: Rifle_Long_Base_F {
|
||||
class WeaponSlotsInfo: WeaponSlotsInfo {
|
||||
class MuzzleSlot: MuzzleSlot {
|
||||
compatibleItems[] += {"ACE_muzzle_mzls_B"};
|
||||
class MuzzleSlot: asdg_MuzzleSlot_762MG {
|
||||
class compatibleItems: compatibleItems {
|
||||
ACE_muzzle_mzls_H = 1;
|
||||
ACE_muzzle_mzls_B = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -21,7 +21,7 @@ if ((_this select 0) <= (count GVAR(spallHPData))) then {
|
||||
// diag_log text format["%1: %2", _forEachIndex, _x];
|
||||
// } forEach _hp;
|
||||
// } forEach (_this select 1);
|
||||
[DFUNC(doSpall), [_this, _forEachIndex]] call EFUNC(common,execNextFrame);
|
||||
[DFUNC(doSpall), [_this, _forEachIndex]] call CBA_fnc_execNextFrame;
|
||||
// player sideChat "WEEE";
|
||||
} forEach (_this select 1);
|
||||
};
|
||||
|
@ -22,7 +22,7 @@ if (count _intersectsWith > 0) then {
|
||||
if(!(_x in _foundObjects)) then {
|
||||
// diag_log text format["Adding HP: %1", _x];
|
||||
_index = (count GVAR(spallHPData));
|
||||
_hpId = _x addEventHandler ["hitPart", compile format["[%1, _this] call " + QUOTE(FUNC(spallHP)), _index]];
|
||||
_hpId = _x addEventHandler ["hitPart", compile format["[%1, _this] call " + QFUNC(spallHP), _index]];
|
||||
_foundObjects set[(count _foundObjects), _x];
|
||||
_foundObjectHPIds set[(count _foundObjectHPIds), _hpId];
|
||||
_data = [_hpId, _x, typeOf _round, _round, _curPos, _velocity, 0, _foundObjects, _foundObjectHPIds];
|
||||
|
@ -25,7 +25,7 @@ _display displayAddEventHandler ["KeyDown", {
|
||||
};
|
||||
|
||||
TRACE_2("Reloading, blocking gestures",_weapon,_duration);
|
||||
[{GVAR(ReloadMutex) = true;}, [], _duration] call EFUNC(common,waitAndExecute);
|
||||
[{GVAR(ReloadMutex) = true;}, [], _duration] call CBA_fnc_waitAndExecute;
|
||||
};
|
||||
};
|
||||
false
|
||||
|
@ -12,8 +12,7 @@ class CfgPatches {
|
||||
};
|
||||
};
|
||||
|
||||
#include "ACE_Settings.hpp"
|
||||
#include "CfgEventHandlers.hpp"
|
||||
|
||||
#include "CfgWeapons.hpp"
|
||||
|
||||
#include "CfgVehicles.hpp"
|
||||
|
@ -90,9 +90,9 @@ GVAR(OldGlasses) = "<null>";
|
||||
|
||||
_unit setVariable ["ACE_EyesDamaged", false];
|
||||
|
||||
}, _this, 5] call EFUNC(common,waitAndExecute);
|
||||
}, _this, 5] call CBA_fnc_waitAndExecute;
|
||||
|
||||
}, _unit, 25] call EFUNC(common,waitAndExecute);
|
||||
}, _unit, 25] call CBA_fnc_waitAndExecute;
|
||||
|
||||
}] call EFUNC(common,addEventHandler);
|
||||
|
||||
|
@ -71,7 +71,7 @@ GVAR(DustHandler) = [{
|
||||
if (GVAR(DustHandler) == -1) then {
|
||||
GVAR(PostProcessEyes) ppEffectEnable false
|
||||
};
|
||||
}, [], 2] call EFUNC(common,waitAndExecute);
|
||||
}, [], 2] call CBA_fnc_waitAndExecute;
|
||||
|
||||
[GVAR(DustHandler)] call CBA_fnc_removePerFrameHandler;
|
||||
GVAR(DustHandler) = -1;
|
||||
|
@ -50,7 +50,7 @@ if !(_rotorWash select 0) exitWith {
|
||||
if (GVAR(DustHandler) == -1) then {
|
||||
GVAR(PostProcessEyes) ppEffectEnable false;
|
||||
}
|
||||
}, [], 2] call EFUNC(common,waitAndExecute);
|
||||
}, [], 2] call CBA_fnc_waitAndExecute;
|
||||
|
||||
[GVAR(DustHandler)] call CBA_fnc_removePerFrameHandler;
|
||||
GVAR(DustHandler) = -1;
|
||||
|
@ -34,7 +34,7 @@ if ((stance _unit != "PRONE") && {primaryWeapon _unit != ""} && {currentWeapon _
|
||||
if (cameraView == "INTERNAL") then {
|
||||
addCamShake [5, 1.75, 2];
|
||||
};
|
||||
}, [], 0.3] call EFUNC(common,waitAndExecute);
|
||||
}, [], 0.3] call CBA_fnc_waitAndExecute;
|
||||
|
||||
call FUNC(removeDirtEffect);
|
||||
call FUNC(removeRainEffect);
|
||||
|
@ -36,4 +36,4 @@ _light setLightDayLight true;
|
||||
_light lightAttachObject [_projectile, [0,0,0]];
|
||||
//_light attachTo [_projectile, [0,0,0]];
|
||||
|
||||
[{deleteVehicle _this}, _light, _timeToLive, 1] call EFUNC(common,waitAndExecute);
|
||||
[{deleteVehicle _this}, _light, _timeToLive, 1] call CBA_fnc_waitAndExecute;
|
||||
|
@ -36,8 +36,8 @@ if (hasInterface) then {
|
||||
[{
|
||||
params ["_light"];
|
||||
deleteVehicle _light;
|
||||
}, [_light], 0.2] call EFUNC(common,waitAndExecute);
|
||||
}, [_light], 0.1] call EFUNC(common,waitAndExecute);
|
||||
}, [_light], 0.2] call CBA_fnc_waitAndExecute;
|
||||
}, [_light], 0.1] call CBA_fnc_waitAndExecute;
|
||||
};
|
||||
|
||||
// Affect local AI
|
||||
@ -67,7 +67,7 @@ _affected = _affected - [ACE_player];
|
||||
};
|
||||
|
||||
_unit setSkill (skill _unit * 50);
|
||||
}, [_x], 7 * _strength] call EFUNC(common,waitAndExecute);
|
||||
}, [_x], 7 * _strength] call CBA_fnc_waitAndExecute;
|
||||
};
|
||||
} count _affected;
|
||||
|
||||
@ -126,12 +126,12 @@ if (hasInterface && {!isNull ACE_player} && {alive ACE_player}) then {
|
||||
|
||||
GVAR(flashbangPPEffectCC) ppEffectAdjust [1,1,0,[1,1,1,0],[0,0,0,1],[0,0,0,0]];
|
||||
GVAR(flashbangPPEffectCC) ppEffectCommit (10 * _strength);
|
||||
}, [_strength], 7 * _strength] call EFUNC(common,waitAndExecute);
|
||||
}, [_strength], 7 * _strength] call CBA_fnc_waitAndExecute;
|
||||
|
||||
//FULLRECOVERY - end effect
|
||||
[{
|
||||
GVAR(flashbangPPEffectCC) ppEffectEnable false;
|
||||
}, [], 17 * _strength] call EFUNC(common,waitAndExecute);
|
||||
}, [], 17 * _strength] call CBA_fnc_waitAndExecute;
|
||||
};
|
||||
|
||||
if (_strength > 0.2) then {
|
||||
|
@ -32,7 +32,7 @@ if (local _unit) then {
|
||||
if (getNumber (_config >> QGVAR(flashbang)) == 1) then {
|
||||
private _fuzeTime = getNumber (_config >> "explosionTime");
|
||||
|
||||
[FUNC(flashbangThrownFuze), [_projectile], _fuzeTime] call EFUNC(common,waitAndExecute);
|
||||
[FUNC(flashbangThrownFuze), [_projectile], _fuzeTime] call CBA_fnc_waitAndExecute;
|
||||
};
|
||||
};
|
||||
|
||||
@ -42,7 +42,7 @@ if (getNumber (_config >> QGVAR(flare)) == 1) then {
|
||||
private _color = getArray (_config >> QGVAR(color));
|
||||
private _intensity = _color deleteAt 3;
|
||||
|
||||
[FUNC(flare), [_projectile, _color, _intensity, _timeToLive], _fuzeTime, 0] call EFUNC(common,waitAndExecute);
|
||||
[FUNC(flare), [_projectile, _color, _intensity, _timeToLive], _fuzeTime, 0] call CBA_fnc_waitAndExecute;
|
||||
};
|
||||
|
||||
// handle throw modes
|
||||
|
@ -25,22 +25,6 @@ class Extended_Init_EventHandlers {
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_FiredNear_EventHandlers {
|
||||
class AllVehicles {
|
||||
class GVAR(FiredNear) {
|
||||
clientFiredNear = QUOTE(_this call FUNC(firedNear););
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_Explosion_EventHandlers {
|
||||
class CAManBase {
|
||||
class GVAR(ExplosionNear) {
|
||||
clientExplosion = QUOTE(_this call FUNC(explosionNear););
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_Respawn_EventHandlers {
|
||||
class CAManBase {
|
||||
class ADDON {
|
||||
|
@ -17,6 +17,10 @@ GVAR(volumeAttenuation) = 1;
|
||||
// Only run PFEH and install event handlers if combat deafness is enabled
|
||||
if (!GVAR(EnableCombatDeafness)) exitWith {};
|
||||
|
||||
//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);
|
||||
|
||||
|
@ -16,9 +16,6 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
// Only run if combat deafness is enabled
|
||||
if (!GVAR(EnableCombatDeafness)) exitWith {};
|
||||
|
||||
params ["_unit", "_damage"];
|
||||
|
||||
if (_unit != ACE_player) exitWith {};
|
||||
|
@ -22,9 +22,6 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
// Only run if combat deafness is enabled
|
||||
if (!GVAR(EnableCombatDeafness)) exitWith {};
|
||||
|
||||
params ["_object", "_firer", "_distance", "_weapon", "", "", "_ammo"];
|
||||
|
||||
//Only run if firedNear object is player or player's vehicle:
|
||||
|
@ -16,6 +16,12 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (!alive ACE_player) exitWith {
|
||||
if (missionNameSpace getVariable [QGVAR(disableVolumeUpdate), false]) exitWith {};
|
||||
TRACE_1("dead - removing hearing effects",ACE_player);
|
||||
[QUOTE(ADDON), 1, true] call EFUNC(common,setHearingCapability);
|
||||
};
|
||||
|
||||
(_this select 0) params ["_justUpdateVolume"];
|
||||
|
||||
GVAR(deafnessDV) = (GVAR(deafnessDV) min 20) max 0;
|
||||
@ -54,9 +60,4 @@ if (ACE_player getVariable ["ACE_isUnconscious", false]) then {
|
||||
_volume = _volume min GVAR(UnconsciousnessVolume);
|
||||
};
|
||||
|
||||
private _soundTransitionTime = if (_justUpdateVolume) then {0.1} else {1};
|
||||
|
||||
_soundTransitionTime fadeSound _volume;
|
||||
_soundTransitionTime fadeSpeech _volume;
|
||||
ACE_player setVariable ["tf_globalVolume", _volume];
|
||||
if (!isNil "acre_api_fnc_setGlobalVolume") then {[_volume^(0.33)] call acre_api_fnc_setGlobalVolume;};
|
||||
[QUOTE(ADDON), _volume, true] call EFUNC(common,setHearingCapability);
|
||||
|
@ -31,7 +31,7 @@ if (_unit == ACE_player) then {
|
||||
};
|
||||
|
||||
// play scream sound
|
||||
if (!isNil QUOTE(EFUNC(medical,playInjuredSound))) then {
|
||||
if (!isNil QEFUNC(medical,playInjuredSound)) then {
|
||||
[_unit] call EFUNC(medical,playInjuredSound);
|
||||
};
|
||||
|
||||
|
@ -26,6 +26,7 @@ class CfgAmmo {
|
||||
soundHit6[] = {"",3.16228,1,2000};
|
||||
soundHit7[] = {"",3.16228,1,2000};
|
||||
soundHit8[] = {"",3.16228,1,2000};
|
||||
SoundSetExplosion[] = {};
|
||||
multiSoundHit[] = {};
|
||||
class HitEffects {};
|
||||
soundFakeFall0[] = {"",3.16228,1,1000};
|
||||
|
@ -50,5 +50,5 @@ if (!hasInterface) exitWith {};
|
||||
_huntir setVectorUp [0, 0, 1];
|
||||
};
|
||||
}, 0, [_huntir]] call CBA_fnc_addPerFrameHandler;
|
||||
}, [getPosATL _projectile vectorAdd [0, 0, 50]], 2, 0] call EFUNC(common,waitAndExecute);
|
||||
}, [_projectile], 5, 0] call EFUNC(common,waitAndExecute);
|
||||
}, [getPosATL _projectile vectorAdd [0, 0, 50]], 2, 0] call CBA_fnc_waitAndExecute;
|
||||
}, [_projectile], 5, 0] call CBA_fnc_waitAndExecute;
|
||||
|
@ -90,9 +90,9 @@ createDialog "ace_huntir_cam_dialog_off";
|
||||
GVAR(done) = true;
|
||||
closedialog 0;
|
||||
HUNTIR_BACKGROUND_LAYER_ID cutText ["", "PLAIN"];
|
||||
}, [], 3, 0] call EFUNC(common,waitAndExecute);
|
||||
}, [], 3, 0] call CBA_fnc_waitAndExecute;
|
||||
};
|
||||
};
|
||||
}, __TYPE_WRITER_DELAY, []] call CBA_fnc_addPerFrameHandler;
|
||||
}, [], 0.5, 0] call EFUNC(common,waitAndExecute);
|
||||
}, [], 1, 0] call EFUNC(common,waitAndExecute);
|
||||
}, [], 0.5, 0] call CBA_fnc_waitAndExecute;
|
||||
}, [], 1, 0] call CBA_fnc_waitAndExecute;
|
||||
|
@ -53,7 +53,7 @@ _filter ctrlAddEventHandler ["LBSelChanged", {_this call FUNC(onLBSelChanged)}];
|
||||
// readd "All" filter to last position and select it
|
||||
_index = _filter lbAdd _nameAll;
|
||||
_filter lbSetCurSel _index;
|
||||
}, [_filter]] call EFUNC(common,execNextFrame);
|
||||
}, [_filter]] call CBA_fnc_execNextFrame;
|
||||
|
||||
// monitor changes that can happen and force our update
|
||||
private _dummyControl = _display ctrlCreate ["RscMapControl", -1];
|
||||
|
@ -24,4 +24,4 @@ GVAR(selectedFilterIndex) = _index;
|
||||
params ["_display"];
|
||||
|
||||
[_display] call FUNC(forceItemListUpdate);
|
||||
}, [ctrlParent _filter]] call EFUNC(common,execNextFrame);
|
||||
}, [ctrlParent _filter]] call CBA_fnc_execNextFrame;
|
||||
|
@ -9,9 +9,6 @@
|
||||
#define DFUNC(var1) TRIPLES(ADDON,fnc,var1)
|
||||
#define DEFUNC(var1,var2) TRIPLES(DOUBLES(PREFIX,var1),fnc,var2)
|
||||
|
||||
#define QFUNC(var1) QUOTE(DFUNC(var1))
|
||||
#define QEFUNC(var1,var2) QUOTE(DEFUNC(var1,var2))
|
||||
|
||||
#define PATHTOEF(var1,var2) PATHTOF_SYS(PREFIX,var1,var2)
|
||||
|
||||
#define GETVAR_SYS(var1,var2) getVariable [ARR_2(QUOTE(var1),var2)]
|
||||
|
@ -1,48 +1,54 @@
|
||||
class CfgAmmo {
|
||||
|
||||
class FlareCore;
|
||||
|
||||
class FlareBase: FlareCore {};
|
||||
class F_20mm_White: FlareBase {};
|
||||
|
||||
class ACE_FlashlightProxy_White: F_20mm_White {
|
||||
|
||||
class Chemlight_base;
|
||||
|
||||
class ACE_FlashlightProxy_White: Chemlight_base {
|
||||
model = "\A3\Weapons_f\empty";
|
||||
effectFlare = "FlareShell";
|
||||
|
||||
triggerTime = 0;
|
||||
intensity = 0.5;
|
||||
flareSize = 1;
|
||||
timeToLive = 10e10;
|
||||
|
||||
lightColor[] = {1,1,1,1};
|
||||
|
||||
grenadeBurningSound[] = {};
|
||||
grenadeFireSound[] = {};
|
||||
soundTrigger[] = {};
|
||||
SmokeShellSoundHit1[] = {};
|
||||
SmokeShellSoundHit2[] = {};
|
||||
SmokeShellSoundHit3[] = {};
|
||||
SmokeShellSoundLoop1[] = {};
|
||||
SmokeShellSoundLoop2[] = {};
|
||||
effectsSmoke = "ACE_FlashlightEffect_White";
|
||||
explosionTime = 0.01;
|
||||
timeToLive = 1e10;
|
||||
|
||||
soundImpactHard1[] = {"",1,1};
|
||||
soundImpactHard2[] = {"",1,1};
|
||||
soundImpactHard3[] = {"",1,1};
|
||||
soundImpactHard4[] = {"",1,1};
|
||||
soundImpactHard5[] = {"",1,1};
|
||||
soundImpactHard6[] = {"",1,1};
|
||||
soundImpactHard7[] = {"",1,1};
|
||||
soundImpactIron1[] = {"",1,1};
|
||||
soundImpactIron2[] = {"",1,1};
|
||||
soundImpactIron3[] = {"",1,1};
|
||||
soundImpactIron4[] = {"",1,1};
|
||||
soundImpactIron5[] = {"",1,1};
|
||||
soundImpactSoft1[] = {"",1,1};
|
||||
soundImpactSoft2[] = {"",1,1};
|
||||
soundImpactSoft3[] = {"",1,1};
|
||||
soundImpactSoft4[] = {"",1,1};
|
||||
soundImpactSoft5[] = {"",1,1};
|
||||
soundImpactSoft6[] = {"",1,1};
|
||||
soundImpactSoft7[] = {"",1,1};
|
||||
soundImpactWater1[] = {"",1,1};
|
||||
soundImpactWater2[] = {"",1,1};
|
||||
soundImpactWater3[] = {"",1,1};
|
||||
soundImpactWoodExt1[] = {"",1,1};
|
||||
soundImpactWoodExt2[] = {"",1,1};
|
||||
soundImpactWoodExt3[] = {"",1,1};
|
||||
soundImpactWoodExt4[] = {"",1,1};
|
||||
};
|
||||
|
||||
|
||||
class ACE_FlashlightProxy_Red: ACE_FlashlightProxy_White {
|
||||
intensity = 1;
|
||||
lightColor[] = {1,0,0,1};
|
||||
effectsSmoke = "ACE_FlashlightEffect_Red";
|
||||
};
|
||||
|
||||
class ACE_FlashlightProxy_Green: ACE_FlashlightProxy_White {
|
||||
intensity = 1;
|
||||
lightColor[] = {0,1,0,1};
|
||||
};
|
||||
|
||||
|
||||
class ACE_FlashlightProxy_Blue: ACE_FlashlightProxy_White {
|
||||
intensity = 1.5;
|
||||
lightColor[] = {0.25,0.25,1,1};
|
||||
effectsSmoke = "ACE_FlashlightEffect_Blue";
|
||||
};
|
||||
|
||||
|
||||
class ACE_FlashlightProxy_Green: ACE_FlashlightProxy_White {
|
||||
effectsSmoke = "ACE_FlashlightEffect_Green";
|
||||
};
|
||||
|
||||
class ACE_FlashlightProxy_Yellow: ACE_FlashlightProxy_White {
|
||||
intensity = 1;
|
||||
lightColor[] = {1,1,0.5,1};
|
||||
effectsSmoke = "ACE_FlashlightEffect_Yellow";
|
||||
};
|
||||
};
|
||||
};
|
35
addons/map/CfgLights.hpp
Normal file
35
addons/map/CfgLights.hpp
Normal file
@ -0,0 +1,35 @@
|
||||
class CfgLights {
|
||||
|
||||
class Chemlight_Blue;
|
||||
|
||||
class ACE_FlashlightLight_White: Chemlight_Blue {
|
||||
brightness = 100;
|
||||
color[] = {1,1,1,1};
|
||||
diffuse[] = {1,1,1};
|
||||
intensity = 100;
|
||||
position[] = {0,0,0};
|
||||
|
||||
class Attenuation {
|
||||
constant = 0;
|
||||
linear = 0;
|
||||
quadratic = 10000;
|
||||
start = 0.075;
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_FlashlightLight_Red: ACE_FlashlightLight_White {
|
||||
diffuse[] = {1,0,0};
|
||||
};
|
||||
|
||||
class ACE_FlashlightLight_Blue: ACE_FlashlightLight_White {
|
||||
diffuse[] = {0.25,0.25,1};
|
||||
};
|
||||
|
||||
class ACE_FlashlightLight_Green: ACE_FlashlightLight_White {
|
||||
diffuse[] = {0,1,0};
|
||||
};
|
||||
|
||||
class ACE_FlashlightLight_Yellow: ACE_FlashlightLight_White {
|
||||
diffuse[] = {1,1,0.4};
|
||||
};
|
||||
};
|
36
addons/map/Effects.hpp
Normal file
36
addons/map/Effects.hpp
Normal file
@ -0,0 +1,36 @@
|
||||
// "Smoke" effect classes for global flashlight glow
|
||||
|
||||
class ACE_FlashlightEffect_White {
|
||||
class Light1 {
|
||||
simulation = "light";
|
||||
type = "ACE_FlashlightLight_White";
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_FlashlightEffect_Red {
|
||||
class Light1 {
|
||||
simulation = "light";
|
||||
type = "ACE_FlashlightLight_Red";
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_FlashlightEffect_Blue {
|
||||
class Light1 {
|
||||
simulation = "light";
|
||||
type = "ACE_FlashlightLight_Blue";
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_FlashlightEffect_Green {
|
||||
class Light1 {
|
||||
simulation = "light";
|
||||
type = "ACE_FlashlightLight_Green";
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_FlashlightEffect_Yellow {
|
||||
class Light1 {
|
||||
simulation = "light";
|
||||
type = "ACE_FlashlightLight_Yellow";
|
||||
};
|
||||
};
|
@ -9,6 +9,7 @@ if (isServer) then {
|
||||
{
|
||||
if (_x isKindOf "ACE_FlashlightProxy_White") then {
|
||||
// ACE_LOGINFO_2("Deleting leftover light [%1:%2] from DC player [%3]", _x, typeOf _x, _disconnectedPlayer);
|
||||
detach _x;
|
||||
deleteVehicle _x;
|
||||
};
|
||||
} forEach attachedObjects _disconnectedPlayer;
|
||||
|
@ -29,6 +29,8 @@ class RscEdit;
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "CfgAmmo.hpp"
|
||||
#include "CfgSounds.hpp"
|
||||
#include "CfgLights.hpp"
|
||||
#include "Effects.hpp"
|
||||
|
||||
class RscMapControl {
|
||||
maxSatelliteAlpha = 0.5;
|
||||
@ -160,4 +162,4 @@ class RscDisplayServerGetReady: RscDisplayGetReady {
|
||||
#include "MapControls.hpp"
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
@ -20,7 +20,10 @@ private ["_light", "_color", "_class"];
|
||||
params ["_flashlight"];
|
||||
|
||||
_light = GVAR(glow);
|
||||
if (!isNull _light) then {deleteVehicle _light};
|
||||
if (!isNull _light) then {
|
||||
detach _light;
|
||||
deleteVehicle _light;
|
||||
};
|
||||
|
||||
if (_flashlight != "") then {
|
||||
_color = getText (configFile >> "CfgWeapons" >> _flashlight >> "ItemInfo" >> "FlashLight" >> "ACE_Flashlight_Colour");
|
||||
@ -28,9 +31,9 @@ if (_flashlight != "") then {
|
||||
_class = format["ACE_FlashlightProxy_%1", _color];
|
||||
|
||||
_light = _class createVehicle [0,0,0];
|
||||
_light attachTo [ACE_player, [0,0.5,-0.1], "head"];
|
||||
_light attachTo [ACE_player, [0,0.1,-0.05], "neck"];
|
||||
} else {
|
||||
_light = objNull;
|
||||
};
|
||||
|
||||
GVAR(glow) = _light;
|
||||
GVAR(glow) = _light;
|
@ -238,4 +238,4 @@
|
||||
//Update now and add eventHandler:
|
||||
[_aceAngleSlider, _curSelAngle] call FUNC(onSliderPosChangedAngle);
|
||||
_aceAngleSlider ctrlAddEventHandler ["SliderPosChanged", {_this call FUNC(onSliderPosChangedAngle)}];
|
||||
}, _this] call EFUNC(common,execNextFrame);
|
||||
}, _this] call CBA_fnc_execNextFrame;
|
||||
|
@ -32,5 +32,5 @@ if (_closeNum == 1) then {
|
||||
]
|
||||
]] call EFUNC(common,globalEvent);
|
||||
|
||||
}, []] call EFUNC(common,execNextFrame);
|
||||
}, []] call CBA_fnc_execNextFrame;
|
||||
};
|
||||
|
@ -158,7 +158,7 @@ class CfgVehicles {
|
||||
displayName = CSTRING(BasicMedicalSettings_Module_DisplayName);
|
||||
icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa));
|
||||
category = "ACE_medical";
|
||||
function = QUOTE(FUNC(moduleBasicMedicalSettings));
|
||||
function = QFUNC(moduleBasicMedicalSettings);
|
||||
functionPriority = 10;
|
||||
isGlobal = 2;
|
||||
isSingular = 1;
|
||||
@ -200,7 +200,7 @@ class CfgVehicles {
|
||||
displayName = CSTRING(AdvancedMedicalSettings_Module_DisplayName);
|
||||
icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa));
|
||||
category = "ACE_medical";
|
||||
function = QUOTE(FUNC(moduleAdvancedMedicalSettings));
|
||||
function = QFUNC(moduleAdvancedMedicalSettings);
|
||||
functionPriority = 10;
|
||||
isGlobal = 2;
|
||||
isSingular = 1;
|
||||
@ -366,7 +366,7 @@ class CfgVehicles {
|
||||
displayName = CSTRING(AssignMedicRoles_Module_DisplayName);
|
||||
icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa));
|
||||
category = "ACE_medical";
|
||||
function = QUOTE(FUNC(moduleAssignMedicRoles));
|
||||
function = QFUNC(moduleAssignMedicRoles);
|
||||
functionPriority = 10;
|
||||
isGlobal = 2;
|
||||
isTriggerActivated = 0;
|
||||
@ -413,7 +413,7 @@ class CfgVehicles {
|
||||
displayName = CSTRING(AssignMedicVehicle_Module_DisplayName);
|
||||
icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa));
|
||||
category = "ACE_medical";
|
||||
function = QUOTE(FUNC(moduleAssignMedicalVehicle));
|
||||
function = QFUNC(moduleAssignMedicalVehicle);
|
||||
functionPriority = 10;
|
||||
isGlobal = 2;
|
||||
isTriggerActivated = 0;
|
||||
@ -457,7 +457,7 @@ class CfgVehicles {
|
||||
displayName = CSTRING(AssignMedicalFacility_Module_DisplayName);
|
||||
icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa));
|
||||
category = "ACE_medical";
|
||||
function = QUOTE(FUNC(moduleAssignMedicalFacility));
|
||||
function = QFUNC(moduleAssignMedicalFacility);
|
||||
functionPriority = 10;
|
||||
isGlobal = 2;
|
||||
isTriggerActivated = 0;
|
||||
|
@ -37,19 +37,15 @@ if (isServer) then {["placedInBodyBag", FUNC(serverRemoveBody)] call EFUNC(commo
|
||||
params ["_unit", "_status"];
|
||||
if (local _unit) then {
|
||||
if (_status) then {
|
||||
_unit setVariable ["tf_globalVolume", 0.4];
|
||||
_unit setVariable ["tf_voiceVolume", 0, true];
|
||||
_unit setVariable ["tf_unable_to_use_radio", true, true];
|
||||
|
||||
_unit setVariable ["acre_sys_core_isDisabled", true, true];
|
||||
if (!isNil "acre_api_fnc_setGlobalVolume") then { [0.4^0.33] call acre_api_fnc_setGlobalVolume; };
|
||||
} else {
|
||||
_unit setVariable ["tf_globalVolume", 1];
|
||||
_unit setVariable ["tf_voiceVolume", 1, true];
|
||||
_unit setVariable ["tf_unable_to_use_radio", false, true];
|
||||
|
||||
_unit setVariable ["acre_sys_core_isDisabled", false, true];
|
||||
if (!isNil "acre_api_fnc_setGlobalVolume") then { [1] call acre_api_fnc_setGlobalVolume; };
|
||||
};
|
||||
};
|
||||
}] call EFUNC(common,addEventHandler);
|
||||
@ -143,11 +139,11 @@ GVAR(effectTimeBlood) = CBA_missionTime;
|
||||
[{
|
||||
GVAR(effectBlindingCC) ppEffectAdjust [1,1,0, [1,1,1,0], [0,0,0,1], [0,0,0,0]];
|
||||
GVAR(effectBlindingCC) ppEffectCommit ((_this select 0) * 2);
|
||||
}, [_strength], 0.01, 0] call EFUNC(common,waitAndExecute);
|
||||
}, [_strength], 0.01, 0] call CBA_fnc_waitAndExecute;
|
||||
|
||||
[{
|
||||
GVAR(effectBlindingCC) ppEffectEnable false;
|
||||
}, [], (_strength * 2) + 0.5, 0] call EFUNC(common,waitAndExecute);
|
||||
}, [], (_strength * 2) + 0.5, 0] call CBA_fnc_waitAndExecute;
|
||||
|
||||
GVAR(effectBlind) = false;
|
||||
};
|
||||
@ -210,15 +206,15 @@ GVAR(lastHeartBeatSound) = CBA_missionTime;
|
||||
[{
|
||||
GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false];
|
||||
GVAR(effectPainCA) ppEffectCommit (_this select 1);
|
||||
}, [_strength * 0.1, _interval * 0.2], _interval * 0.05, 0] call EFUNC(common,waitAndExecute);
|
||||
}, [_strength * 0.1, _interval * 0.2], _interval * 0.05, 0] call CBA_fnc_waitAndExecute;
|
||||
[{
|
||||
GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false];
|
||||
GVAR(effectPainCA) ppEffectCommit 0.01;
|
||||
}, [_strength * 0.7], _interval * 0.3, 0] call EFUNC(common,waitAndExecute);
|
||||
}, [_strength * 0.7], _interval * 0.3, 0] call CBA_fnc_waitAndExecute;
|
||||
[{
|
||||
GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false];
|
||||
GVAR(effectPainCA) ppEffectCommit (_this select 1);
|
||||
}, [_strength * 0.1, _interval * 0.55], _interval * 0.4, 0] call EFUNC(common,waitAndExecute);
|
||||
}, [_strength * 0.1, _interval * 0.55], _interval * 0.4, 0] call CBA_fnc_waitAndExecute;
|
||||
} else {
|
||||
GVAR(effectPainCA) ppEffectEnable false;
|
||||
};
|
||||
@ -232,15 +228,15 @@ GVAR(lastHeartBeatSound) = CBA_missionTime;
|
||||
[{
|
||||
GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - (_this select 0),1 - (_this select 0),0,0,0,0.2,2]];
|
||||
GVAR(effectPainCC) ppEffectCommit (_this select 1);
|
||||
}, [_strength * 0.1, _interval * 0.2], _interval * 0.05, 0] call EFUNC(common,waitAndExecute);
|
||||
}, [_strength * 0.1, _interval * 0.2], _interval * 0.05, 0] call CBA_fnc_waitAndExecute;
|
||||
[{
|
||||
GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - (_this select 0),1 - (_this select 0),0,0,0,0.2,2]];
|
||||
GVAR(effectPainCC) ppEffectCommit 0.01;
|
||||
}, [_strength * 0.7], _interval * 0.3, 0] call EFUNC(common,waitAndExecute);
|
||||
}, [_strength * 0.7], _interval * 0.3, 0] call CBA_fnc_waitAndExecute;
|
||||
[{
|
||||
GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - (_this select 0),1 - (_this select 0),0,0,0,0.2,2]];
|
||||
GVAR(effectPainCC) ppEffectCommit (_this select 1);
|
||||
}, [_strength * 0.1, _interval * 0.55], _interval * 0.4, 0] call EFUNC(common,waitAndExecute);
|
||||
}, [_strength * 0.1, _interval * 0.55], _interval * 0.4, 0] call CBA_fnc_waitAndExecute;
|
||||
} else {
|
||||
GVAR(effectPainCC) ppEffectEnable false;
|
||||
};
|
||||
|
@ -35,7 +35,7 @@ private _fixStatic = {
|
||||
1 preloadObject (_this select 0);
|
||||
}, {
|
||||
TRACE_1("preload done",_this);
|
||||
}, [_vehType]] call EFUNC(common,waitUntilAndExecute);
|
||||
}, [_vehType]] call CBA_fnc_waitUntilAndExecute;
|
||||
};
|
||||
};
|
||||
["StaticWeapon", "init", _fixStatic] call CBA_fnc_addClassEventHandler;
|
||||
@ -47,7 +47,7 @@ addMissionEventHandler ["Loaded",{
|
||||
1 preloadObject (_this select 0);
|
||||
}, {
|
||||
TRACE_1("preload done",_this);
|
||||
}, [_x]] call EFUNC(common,waitUntilAndExecute);
|
||||
}, [_x]] call CBA_fnc_waitUntilAndExecute;
|
||||
} forEach GVAR(fixedStatics);
|
||||
}];
|
||||
|
||||
|
@ -54,7 +54,7 @@ private _debugCode = {
|
||||
ACE_LOGERROR_6("addDamageToUnit - FAILED - [unit:%1, partNo:%2, addDmg:%3] results:[alive:%4 old:%5 new:%6]", _unit, _partNumber, _damageToAdd, alive _unit, _startDmg, _endDmg);
|
||||
};
|
||||
};
|
||||
[{diag_frameno > (_this select 0)}, _debugCode, [_checkAtFrame, _unit, _startDmg, _damageToAdd, _partNumber]] call EFUNC(common,waitUntilAndExecute);
|
||||
[{diag_frameno > (_this select 0)}, _debugCode, [_checkAtFrame, _unit, _startDmg, _damageToAdd, _partNumber]] call CBA_fnc_waitUntilAndExecute;
|
||||
#endif
|
||||
|
||||
private _return = [_unit, _selection, (_currentDamage + _damageToAdd), _unit, _typeOfDamage, _hitpointIndex] call FUNC(handleDamage);
|
||||
|
@ -27,4 +27,4 @@ if ((_unit getVariable[QGVAR(addedToUnitLoop),false] || !alive _unit) && !_force
|
||||
// Schedule the loop to be executed again 1 sec later
|
||||
// @todo: should the loop be started righ away instead?
|
||||
_unit setVariable [QGVAR(addedToUnitLoop), true, true];
|
||||
[DFUNC(vitalLoop), [_unit, CBA_missionTime], 1] call EFUNC(common,waitAndExecute);
|
||||
[DFUNC(vitalLoop), [_unit, CBA_missionTime], 1] call CBA_fnc_waitAndExecute;
|
||||
|
@ -27,4 +27,4 @@ if (GVAR(bodiesToDelete) isEqualTo []) exitWith {
|
||||
};
|
||||
|
||||
// Schedule the loop to be executed again 20 sec later
|
||||
[DFUNC(bodyCleanupLoop), [], 20] call EFUNC(common,waitAndExecute);
|
||||
[DFUNC(bodyCleanupLoop), [], 20] call CBA_fnc_waitAndExecute;
|
||||
|
@ -117,5 +117,5 @@ if (random(1) <= _reopeningChance) then {
|
||||
};
|
||||
// Otherwise something went wrong, we we don't reopen them..
|
||||
//};
|
||||
}, [_target, _impact, _part, _injuryIndex, +_injury], _delay] call EFUNC(common,waitAndExecute);
|
||||
}, [_target, _impact, _part, _injuryIndex, +_injury], _delay] call CBA_fnc_waitAndExecute;
|
||||
};
|
||||
|
@ -29,7 +29,7 @@ _litterObject = _litterClass createVehicleLocal _position;
|
||||
_litterObject setDir _direction;
|
||||
_litterObject setPosATL _position;
|
||||
// Move the litter next frame to get rid of HORRIBLE spacing, fixes #1112
|
||||
[{ params ["_object", "_pos"]; _object setPosATL _pos; }, [_litterObject, _position]] call EFUNC(common,execNextFrame);
|
||||
[{ params ["_object", "_pos"]; _object setPosATL _pos; }, [_litterObject, _position]] call CBA_fnc_execNextFrame;
|
||||
|
||||
_maxLitterCount = getArray (configFile >> "ACE_Settings" >> QGVAR(litterSimulationDetail) >> "_values") select GVAR(litterSimulationDetail);
|
||||
if((count GVAR(allCreatedLitter)) > _maxLitterCount ) then {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user