manual merge

This commit is contained in:
commy2 2016-05-30 21:14:34 +02:00
commit 7512c4e52e
171 changed files with 870 additions and 531 deletions

View File

@ -51,7 +51,7 @@ if (_unit == _attachToVehicle) then { //Self Attachment
[_unit, "forceWalk", "ACE_Attach", true] call EFUNC(common,statusEffect_set); [_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)]; _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}]; _actionID = _unit addAction [format ["<t color='#FF0000'>%1</t>", localize LSTRING(CancelAction)], {GVAR(placeAction) = PLACE_CANCEL}];

View File

@ -57,7 +57,7 @@ if (toLower _itemName in ["b_ir_grenade", "o_ir_grenade", "i_ir_grenade"]) then
detach _attachedObject; detach _attachedObject;
_attachedObject setPos ((getPos _unit) vectorAdd [0, 0, -1000]); _attachedObject setPos ((getPos _unit) vectorAdd [0, 0, -1000]);
// Delete attached item after 0.5 seconds // 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 { } else {
// Delete attached item // Delete attached item
deleteVehicle _attachedObject; deleteVehicle _attachedObject;

View File

@ -31,7 +31,7 @@ _actions = [];
if (getText (_item >> "ACE_Attachable") != "") then { if (getText (_item >> "ACE_Attachable") != "") then {
_displayName = getText(_item >> "displayName"); _displayName = getText(_item >> "displayName");
_picture = getText(_item >> "picture"); _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]; _actions pushBack [_action, [], _target];
}; };
}; };
@ -44,7 +44,7 @@ _actions = [];
if (getText (_item >> "ACE_Attachable") != "") then { if (getText (_item >> "ACE_Attachable") != "") then {
_displayName = getText(_item >> "displayName"); _displayName = getText(_item >> "displayName");
_picture = getText(_item >> "picture"); _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]; _actions pushBack [_action, [], _target];
}; };
}; };

View File

@ -36,7 +36,7 @@ if (!isNull _xObject) then {
params ["_detachedLight"]; params ["_detachedLight"];
TRACE_1("delayed delete",_detachedLight); TRACE_1("delayed delete",_detachedLight);
deleteVehicle _detachedLight; deleteVehicle _detachedLight;
}, [_xObject], 2] call EFUNC(common,waitAndExecute); }, [_xObject], 2] call CBA_fnc_waitAndExecute;
(_attachedList select 0) set [0, objNull]; (_attachedList select 0) set [0, objNull];
}; };

View File

@ -32,7 +32,7 @@ if ((count _attachedList) == 0) exitWith {};
//If it's a vehicle, also delete the attached //If it's a vehicle, also delete the attached
if (!(_deadUnit isKindOf "CAManBase")) then { if (!(_deadUnit isKindOf "CAManBase")) then {
_xObject setPos ((getPos _deadUnit) vectorAdd [0, 0, -1000]); _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; } forEach _attachedList;

View File

@ -4,7 +4,7 @@
// Hold on a little bit longer to ensure anims will work // Hold on a little bit longer to ensure anims will work
[{ [{
GVAR(captivityEnabled) = true; GVAR(captivityEnabled) = true;
}, [], 0.05] call EFUNC(common,waitAndExecute); }, [], 0.05] call CBA_fnc_waitAndExecute;
}] call EFUNC(common,addEventHandler); }] call EFUNC(common,addEventHandler);
//Handles when someone starts escorting and then disconnects, leaving the captive attached //Handles when someone starts escorting and then disconnects, leaving the captive attached

View File

@ -32,7 +32,7 @@ if (!isServer) exitWith {};
TRACE_2("event",_x,local _x); TRACE_2("event",_x,local _x);
["SetHandcuffed", [_x], [_x, true]] call EFUNC(common,targetEvent); ["SetHandcuffed", [_x], [_x, true]] call EFUNC(common,targetEvent);
} forEach _units; } forEach _units;
}, [_units], 0.05] call EFUNC(common,waitAndExecute); }, [_units], 0.05] call CBA_fnc_waitAndExecute;
if (!isNull _logic) then { if (!isNull _logic) then {
deleteVehicle _logic; deleteVehicle _logic;

View File

@ -32,7 +32,7 @@ if (!isServer) exitWith {};
TRACE_2("event",_x,local _x); TRACE_2("event",_x,local _x);
["SetSurrendered", [_x], [_x, true]] call EFUNC(common,targetEvent); ["SetSurrendered", [_x], [_x, true]] call EFUNC(common,targetEvent);
} forEach _units; } forEach _units;
}, [_units], 0.05] call EFUNC(common,waitAndExecute); }, [_units], 0.05] call CBA_fnc_waitAndExecute;
if (!isNull _logic) then { if (!isNull _logic) then {
deleteVehicle _logic; deleteVehicle _logic;

View File

@ -27,7 +27,7 @@ if !(missionNamespace getVariable [QGVAR(captivityEnabled), false]) exitWith {
// It's to soon to call this function, delay it // It's to soon to call this function, delay it
if (EGVAR(common,settingsInitFinished)) then { if (EGVAR(common,settingsInitFinished)) then {
// Settings are already initialized, but the small wait isn't over // 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 { } else {
// Settings are not initialized yet // Settings are not initialized yet
[DFUNC(setHandCuffed), _this] call EFUNC(common,runAfterSettingsInit); [DFUNC(setHandCuffed), _this] call EFUNC(common,runAfterSettingsInit);
@ -98,7 +98,7 @@ if (_state) then {
TRACE_2("Adding animChangedEH",_unit,_animChangedEHID); TRACE_2("Adding animChangedEH",_unit,_animChangedEHID);
_unit setVariable [QGVAR(handcuffAnimEHID), _animChangedEHID]; _unit setVariable [QGVAR(handcuffAnimEHID), _animChangedEHID];
}, [_unit], 0.01] call EFUNC(common,waitAndExecute); }, [_unit], 0.01] call CBA_fnc_waitAndExecute;
} else { } else {
_unit setVariable [QGVAR(isHandcuffed), false, true]; _unit setVariable [QGVAR(isHandcuffed), false, true];
[_unit, "setCaptive", QGVAR(Handcuffed), false] call EFUNC(common,statusEffect_set); [_unit, "setCaptive", QGVAR(Handcuffed), false] call EFUNC(common,statusEffect_set);

View File

@ -27,7 +27,7 @@ if !(missionNamespace getVariable [QGVAR(captivityEnabled), false]) exitWith {
// It's to soon to call this function, delay it // It's to soon to call this function, delay it
if (EGVAR(common,settingsInitFinished)) then { if (EGVAR(common,settingsInitFinished)) then {
// Settings are already initialized, but the small wait isn't over // 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 { } else {
// Settings are not initialized yet // Settings are not initialized yet
[DFUNC(setSurrendered), _this] call EFUNC(common,runAfterSettingsInit); [DFUNC(setSurrendered), _this] call EFUNC(common,runAfterSettingsInit);
@ -73,7 +73,7 @@ if (_state) then {
}]; }];
_unit setVariable [QGVAR(surrenderAnimEHID), _animChangedEHID]; _unit setVariable [QGVAR(surrenderAnimEHID), _animChangedEHID];
}; };
}, [_unit], 0.01] call EFUNC(common,waitAndExecute); }, [_unit], 0.01] call CBA_fnc_waitAndExecute;
} else { } else {
_unit setVariable [QGVAR(isSurrendering), false, true]; _unit setVariable [QGVAR(isSurrendering), false, true];
[_unit, "setCaptive", QGVAR(Surrendered), false] call EFUNC(common,statusEffect_set); [_unit, "setCaptive", QGVAR(Surrendered), false] call EFUNC(common,statusEffect_set);

View File

@ -33,7 +33,7 @@ class Extended_InitPost_EventHandlers {
}; };
class CAManBase { class CAManBase {
class GVAR(setName) { 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) { class GVAR(muteUnit) {
init = QUOTE(_this call FUNC(muteUnitHandleInitPost)); init = QUOTE(_this call FUNC(muteUnitHandleInitPost));

View File

@ -3,47 +3,6 @@
// #define DEBUG_MODE_FULL // #define DEBUG_MODE_FULL
#include "script_component.hpp" #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 // Get Map Data
////////////////////////////////////////////////// //////////////////////////////////////////////////
@ -334,6 +293,7 @@ GVAR(OldPlayerVehicle) = vehicle objNull;
GVAR(OldPlayerTurret) = [objNull] call FUNC(getTurretIndex); GVAR(OldPlayerTurret) = [objNull] call FUNC(getTurretIndex);
GVAR(OldPlayerWeapon) = currentWeapon objNull; GVAR(OldPlayerWeapon) = currentWeapon objNull;
GVAR(OldPlayerInventory) = []; GVAR(OldPlayerInventory) = [];
GVAR(OldPlayerInventoryNoAmmo) = [];
GVAR(OldPlayerVisionMode) = currentVisionMode objNull; GVAR(OldPlayerVisionMode) = currentVisionMode objNull;
GVAR(OldCameraView) = ""; GVAR(OldCameraView) = "";
GVAR(OldVisibleMap) = false; GVAR(OldVisibleMap) = false;
@ -385,7 +345,32 @@ GVAR(OldIsCamera) = false;
if !(_data isEqualTo GVAR(OldPlayerInventory)) then { if !(_data isEqualTo GVAR(OldPlayerInventory)) then {
// Raise ACE event locally // Raise ACE event locally
GVAR(OldPlayerInventory) = _data; 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 // "playerVisionModeChanged" event

View File

@ -46,6 +46,8 @@ if (isServer) then {
GVAR(statusEffect_Names) = []; GVAR(statusEffect_Names) = [];
GVAR(statusEffect_isGlobal) = []; GVAR(statusEffect_isGlobal) = [];
GVAR(setHearingCapabilityMap) = [];
////////////////////////////////////////////////// //////////////////////////////////////////////////
// Set up PlayerChanged eventhandler for pre init (EH is installed in postInit) // Set up PlayerChanged eventhandler for pre init (EH is installed in postInit)
////////////////////////////////////////////////// //////////////////////////////////////////////////

View File

@ -15,18 +15,6 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
params [["_unit", objNull, [objNull]]]; ACE_DEPRECATED("ace_common_fnc_binocularMagazine","3.8.0","CBA_fnc_binocularMagazine");
private _binocular = binocular _unit; _this call CBA_fnc_binocularMagazine
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;
""

View File

@ -79,7 +79,7 @@ if (!isServer) then {
params ["_rscLayer"]; params ["_rscLayer"];
TRACE_2("Hiding Error message after 10 seconds",time,_rscLayer); TRACE_2("Hiding Error message after 10 seconds",time,_rscLayer);
_rscLayer cutFadeOut 0.2; _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); TRACE_2("Player is alive, showing msg and exiting",time,_text);
_text = composeText [parseText format ["<t align='center'>%1</t>", _text]]; _text = composeText [parseText format ["<t align='center'>%1</t>", _text]];
["[ACE] ERROR", _text, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage); ["[ACE] ERROR", _text, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);
}, [_text]] call FUNC(waitUntilAndExecute); }, [_text]] call CBA_fnc_waitUntilAndExecute;
}; };
}; };

View File

@ -104,7 +104,7 @@ if (_show) then {
if (_timeAlive >= 0) then { if (_timeAlive >= 0) then {
[{ [{
[_this select 0, false, "", [0,0,0], 0] call FUNC(displayIcon); [_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 { } else {

View File

@ -33,5 +33,5 @@ if (_time > _lastHintTime + _delay || {_priority >= _lastHintPriority}) then {
GVAR(lastHint) set [0, _time]; GVAR(lastHint) set [0, _time];
GVAR(lastHint) set [1, _priority]; 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;
}; };

View File

@ -13,10 +13,6 @@
*/ */
#include "script_component.hpp" #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 { _this call CBA_fnc_execNextFrame;
GVAR(nextFrameBufferA) pushBack [_params, _func];
} else {
GVAR(nextFrameBufferB) pushBack [_params, _func];
};

View File

@ -19,4 +19,4 @@ if (!local _this) exitWith {};
[_this, "blockDamage", "fixCollision", true] call FUNC(statusEffect_set); [_this, "blockDamage", "fixCollision", true] call FUNC(statusEffect_set);
// re-allow damage after 2 seconds // 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;

View File

@ -64,5 +64,5 @@ if (isNull _unit) exitWith {[
handgunWeapon _unit, handgunItems _unit, handgunMagazine _unit, handgunWeapon _unit, handgunItems _unit, handgunMagazine _unit,
assignedItems _unit, assignedItems _unit,
binocular _unit, binocular _unit,
[_unit] call FUNC(binocularMagazine) [_unit] call CBA_fnc_binocularMagazine
] ]

View File

@ -12,12 +12,6 @@
*/ */
#include "script_component.hpp" #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"}; configName (configHierarchy (_item call CBA_fnc_getItemConfig) param [1, configNull])
if (isClass (configFile >> "CfgMagazines" >> _item)) exitWith {"CfgMagazines"};
if (isClass (configFile >> "CfgGlasses" >> _item)) exitWith {"CfgGlasses"};
""

View File

@ -12,10 +12,6 @@
*/ */
#include "script_component.hpp" #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"}; configName (configHierarchy (_item call CBA_fnc_getObjectConfig) param [1, configNull])
if (isClass (configFile >> "CfgAmmo" >> _object)) exitWith {"CfgAmmo"};
""

View File

@ -15,9 +15,11 @@
params ["_item"]; 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"]}; if (_cfgType == "CfgGlasses") exitWith {["item", "glasses"]};

View File

@ -14,19 +14,4 @@
params [["_vehicle", objNull, [objNull]]]; params [["_vehicle", objNull, [objNull]]];
private _turrets = allTurrets [_vehicle, true]; fullCrew [_vehicle, "commander", true] apply {_x select 3} param [0, []] // return
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

View File

@ -14,19 +14,6 @@
params [["_vehicle", objNull, [objNull]]]; params [["_vehicle", objNull, [objNull]]];
private _turrets = allTurrets [_vehicle, true]; fullCrew [_vehicle, "turret", true] apply {_x select 3} select {
getNumber ([_vehicle, _x] call CBA_fnc_getTurret >> "isCopilot") == 1
private _turret = []; } param [0, []] // return
{
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

View File

@ -14,19 +14,4 @@
params [["_vehicle", objNull, [objNull]]]; params [["_vehicle", objNull, [objNull]]];
private _turrets = allTurrets [_vehicle, true]; fullCrew [_vehicle, "gunner", true] apply {_x select 3} param [0, []] // return
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

View File

@ -8,12 +8,14 @@
* Return Value: * Return Value:
* Turret Indecies <ARRAY> * Turret Indecies <ARRAY>
* *
* Public: Yes * Public: No
* *
* Note: It's advised to use allTurrets [_vehicle, true] instead whenever possible * Note: It's advised to use allTurrets [_vehicle, true] instead whenever possible
*/ */
#include "script_component.hpp" #include "script_component.hpp"
ACE_DEPRECATED("ace_common_fnc_getTurrets","3.7.0","allTurrets [_vehicle, true]");
params ["_type"]; params ["_type"];
private _varName = format [QGVAR(CachedTurrets_%1), _type]; private _varName = format [QGVAR(CachedTurrets_%1), _type];

View File

@ -14,19 +14,4 @@
params [["_vehicle", objNull, [objNull]]]; params [["_vehicle", objNull, [objNull]]];
private _turrets = allTurrets [_vehicle, true]; fullCrew [_vehicle, "turret", true] select {_x select 4} apply {_x select 3} // return
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

View File

@ -14,24 +14,6 @@
params [["_vehicle", objNull, [objNull]]]; params [["_vehicle", objNull, [objNull]]];
private _turrets = allTurrets [_vehicle, true]; fullCrew [_vehicle, "turret", true] select {!(_x select 4)} apply {_x select 3} select {
getNumber ([_vehicle, _x] call CBA_fnc_getTurret >> "isCopilot") != 1
private _turret = []; } // return
{
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

View File

@ -15,13 +15,6 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
params [["_unit", objNull, [objNull]]]; ACE_DEPRECATED("ace_common_fnc_removeBinocularMagazine","3.8.0","CBA_fnc_removeBinocularMagazine");
private _binocular = binocular _unit; _this call CBA_fnc_removeBinocularMagazine
private _selectBinocular = currentWeapon _unit == _binocular;
_unit addWeapon _binocular;
if (_selectBinocular) then {
_unit selectWeapon _binocular;
};

View File

@ -5,48 +5,44 @@
* Arguments: * Arguments:
* 0: id <STRING> * 0: id <STRING>
* 1: settings <NUMBER> * 1: settings <NUMBER>
* 2: add (default: true) <BOOL> * 2: add [true] OR remove [false] (default: true) <BOOL>
* *
* Return Value: * Return Value:
* None * None
* *
* Public: Yes * Example:
* ["earwax", 0.5, true] call ace_common_fnc_setHearingCapability
* *
* Note: uses player * Public: Yes
*/ */
#include "script_component.hpp" #include "script_component.hpp"
params ["_id", "_settings", ["_add", true]]; params ["_id", "_setting", ["_add", true]];
private _map = missionNamespace getVariable [QGVAR(setHearingCapabilityMap),[]];
private _exists = false; 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; private _lowestVolume = 1;
{ GVAR(setHearingCapabilityMap) = GVAR(setHearingCapabilityMap) select {
_lowestVolume = (_x select 1) min _lowestVolume; _x params ["_xID", "_xSetting"];
false if (_id == _xID) then {
} count _map; _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 // in game sounds
0 fadeSound _lowestVolume; 0 fadeSound _lowestVolume;

View File

@ -50,4 +50,4 @@ TRACE_2("Starting Embargo", _varName, _delay);
if (!(_value isEqualTo _curValue)) then { if (!(_value isEqualTo _curValue)) then {
_this call FUNC(setVariablePublic); _this call FUNC(setVariablePublic);
}; };
}, _this, _delay] call FUNC(waitAndExecute); }, _this, _delay] call CBA_fnc_waitAndExecute;

View File

@ -15,7 +15,7 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
#define GROUP_SWITCH_ID QUOTE(FUNC(loadPerson)) #define GROUP_SWITCH_ID QFUNC(loadPerson)
params ["_unit"]; params ["_unit"];

View File

@ -14,7 +14,7 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
#define GROUP_SWITCH_ID QUOTE(FUNC(loadPerson)) #define GROUP_SWITCH_ID QFUNC(loadPerson)
params ["_unit", "_vehicle", ["_unloader", objNull]]; params ["_unit", "_vehicle", ["_unloader", objNull]];
TRACE_3("params",_unit,_vehicle,_unloader); 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 { if ((_unit getVariable "ACE_isUnconscious") and (animationState _unit != _anim)) then {
[_unit, _anim, 2, true] call FUNC(doAnimation); [_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); [_unit, false, GROUP_SWITCH_ID, side group _unit] call FUNC(switchToGroupSide);

View File

@ -17,7 +17,6 @@
*/ */
#include "script_component.hpp" #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]; _this call CBA_fnc_waitAndExecute;
GVAR(waitAndExecArray) sort true;

View File

@ -17,7 +17,8 @@
*/ */
#include "script_component.hpp" #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 nil

View File

@ -134,7 +134,7 @@ class CfgVehicles {
distance = 4; distance = 4;
condition = "true"; condition = "true";
//wait a frame to handle "Do When releasing action menu key" option: //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; showDisabled = 0;
exceptions[] = {}; exceptions[] = {};
priority = 5; priority = 5;

View File

@ -18,7 +18,7 @@
if (uiNamespace getVariable [QEGVAR(interact_menu,cursorMenuOpened),false]) exitWith { if (uiNamespace getVariable [QEGVAR(interact_menu,cursorMenuOpened),false]) exitWith {
[{ [{
_this call FUNC(dismount); _this call FUNC(dismount);
}, _this] call EFUNC(common,execNextFrame); }, _this] call CBA_fnc_execNextFrame;
}; };
params ["_wire", "_unit"]; params ["_wire", "_unit"];

View File

@ -114,7 +114,7 @@ if (_mode == 1) then {
_vDir = getDir _vehicle; _vDir = getDir _vehicle;
_vehicle setPosASL (_vPos vectorAdd [-0.35 * sin(_vDir), -0.35 * cos(_vDir), 0]); _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 // 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) //TODO: Create broken geoless wire (two version)

View File

@ -67,7 +67,7 @@ if (isNull _holder) exitWith {
if (_holder getVariable [QGVAR(holderInUse), false]) exitWith { if (_holder getVariable [QGVAR(holderInUse), false]) exitWith {
[{ [{
_this call FUNC(disarmDropItems); _this call FUNC(disarmDropItems);
}, _this] call EFUNC(common,execNextFrame); }, _this] call CBA_fnc_execNextFrame;
}; };
_holder setVariable [QGVAR(holderInUse), true]; _holder setVariable [QGVAR(holderInUse), true];

View File

@ -39,7 +39,7 @@ _unit selectWeapon primaryWeapon _unit;
[_unit, _target, true] call EFUNC(common,claim); [_unit, _target, true] call EFUNC(common,claim);
// can't play action that depends on weapon if it was added the same frame // 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 // move a bit closer and adjust direction when trying to pick up a person
if (_target isKindOf "CAManBase") then { if (_target isKindOf "CAManBase") then {

View File

@ -3,7 +3,7 @@ class ACE_ModuleExplosive: ACE_Module {
author = ECSTRING(common,ACETeam); author = ECSTRING(common,ACETeam);
category = "ACE"; category = "ACE";
displayName = CSTRING(Module_DisplayName); displayName = CSTRING(Module_DisplayName);
function = QUOTE(FUNC(module)); function = QFUNC(module);
scope = 2; scope = 2;
isGlobal = 1; isGlobal = 1;
isSingular = 1; isSingular = 1;

View File

@ -45,7 +45,7 @@ _children = [];
format ["Explosive_%1", _forEachIndex], format ["Explosive_%1", _forEachIndex],
format [_name + " (%1)", _itemCount select _forEachIndex], format [_name + " (%1)", _itemCount select _forEachIndex],
getText(_x >> "picture"), getText(_x >> "picture"),
{[{_this call FUNC(setupExplosive)}, _this] call EFUNC(common,execNextFrame)}, {[{_this call FUNC(setupExplosive)}, _this] call CBA_fnc_execNextFrame},
{true}, {true},
{}, {},
(configName _x) (configName _x)

View File

@ -49,6 +49,6 @@ if (getNumber (ConfigFile >> "CfgAmmo" >> typeOf (_item select 0) >> "TriggerWhe
if (!isNull _explosive) then { if (!isNull _explosive) then {
_explosive setDamage 1; _explosive setDamage 1;
}; };
}, [_item select 0], (_item select 1)] call EFUNC(common,waitAndExecute); }, [_item select 0], (_item select 1)] call CBA_fnc_waitAndExecute;
_result _result

View File

@ -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]; 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]; (_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); [_explosive select 0,(0.25 * (count _arr - 1)) + (_explosive select 2)] call FUNC(startTimer);
}; };
}; };

View File

@ -187,7 +187,7 @@ GVAR(TweakedAngle) = 0;
_unit removeMagazine _magClassname; _unit removeMagazine _magClassname;
_unit playActionNow "PutDown"; _unit playActionNow "PutDown";
_unit setVariable [QGVAR(PlantingExplosive), true]; _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 { } else {

View File

@ -56,7 +56,7 @@ if (ACE_player != _unit) then {
[_unit, _target] call FUNC(defuseExplosive); [_unit, _target] call FUNC(defuseExplosive);
_unit enableAI "MOVE"; _unit enableAI "MOVE";
_unit enableAI "TARGET"; _unit enableAI "TARGET";
}, [_unit, _target], _defuseTime] call EFUNC(common,waitAndExecute); }, [_unit, _target], _defuseTime] call CBA_fnc_waitAndExecute;
}; };
} else { } else {
_unit playActionNow _actionToPlay; _unit playActionNow _actionToPlay;

View File

@ -25,4 +25,4 @@ TRACE_2("params",_explosive,_delay);
if (!isNull _explosive) then { if (!isNull _explosive) then {
[_explosive, -1, [_explosive, 0]] call FUNC(detonateExplosive); [_explosive, -1, [_explosive, 0]] call FUNC(detonateExplosive);
}; };
}, [_explosive], _delay] call EFUNC(common,waitAndExecute); }, [_explosive], _delay] call CBA_fnc_waitAndExecute;

View File

@ -22,7 +22,7 @@ class CfgVehicles {
displayName = CSTRING(Module_FRIES_DisplayName); displayName = CSTRING(Module_FRIES_DisplayName);
icon = QUOTE(PATHTOF(UI\Icon_Module_FRIES_ca.paa)); icon = QUOTE(PATHTOF(UI\Icon_Module_FRIES_ca.paa));
category = "ACE"; category = "ACE";
function = QUOTE(FUNC(moduleEquipFRIES)); function = QFUNC(moduleEquipFRIES);
functionPriority = 10; functionPriority = 10;
isGlobal = 0; isGlobal = 0;
isTriggerActivated = 0; isTriggerActivated = 0;

View File

@ -21,5 +21,5 @@ params ["_vehicle", "_fries"];
if (isNull _vehicle) then { if (isNull _vehicle) then {
deleteVehicle _fries; deleteVehicle _fries;
} else { } else {
[FUNC(checkVehicleThread), _this, 5] call EFUNC(common,waitAndExecute); [FUNC(checkVehicleThread), _this, 5] call CBA_fnc_waitAndExecute;
}; };

View File

@ -36,7 +36,7 @@ _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []];
//Only delete the hook first so the rope falls down. //Only delete the hook first so the rope falls down.
//Note: ropeDetach was used here before, but the command seems a bit broken. //Note: ropeDetach was used here before, but the command seems a bit broken.
deleteVehicle _hook; 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; } count _deployedRopes;
_vehicle setVariable [QGVAR(deployedRopes), [], true]; _vehicle setVariable [QGVAR(deployedRopes), [], true];
@ -50,4 +50,4 @@ if (isText (_config >> QGVAR(onCut))) then {
[{ [{
_this setVariable [QGVAR(deploymentStage), 0, true]; _this setVariable [QGVAR(deploymentStage), 0, true];
}, _vehicle, _waitTime] call EFUNC(common,waitAndExecute); }, _vehicle, _waitTime] call CBA_fnc_waitAndExecute;

View File

@ -64,7 +64,7 @@ _deployTime = 0;
if (getText (_config >> QGVAR(onPrepare)) != "") then { if (getText (_config >> QGVAR(onPrepare)) != "") then {
_deployTime = [_vehicle] call (missionNamespace getVariable (getText (_config >> QGVAR(onPrepare)))); _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"; driver _vehicle disableAI "MOVE";
DFUNC(deployAIRecursive) = { DFUNC(deployAIRecursive) = {
@ -80,8 +80,8 @@ DFUNC(deployAIRecursive) = {
params ["_vehicle"]; params ["_vehicle"];
private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []]; private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []];
({!(_x select 5)} count (_deployedRopes)) > 0 ({!(_x select 5)} count (_deployedRopes)) > 0
}, FUNC(deployAIRecursive), _this] call EFUNC(common,waitUntilAndExecute); }, FUNC(deployAIRecursive), _this] call CBA_fnc_waitUntilAndExecute;
}, [_vehicle, _unitsToDeploy], 1] call EFUNC(common,waitAndExecute); }, [_vehicle, _unitsToDeploy], 1] call CBA_fnc_waitAndExecute;
} else { } else {
[{ [{
private _deployedRopes = _this getVariable [QGVAR(deployedRopes), []]; private _deployedRopes = _this getVariable [QGVAR(deployedRopes), []];
@ -89,8 +89,8 @@ DFUNC(deployAIRecursive) = {
}, { }, {
[_this] call FUNC(cutRopes); [_this] call FUNC(cutRopes);
driver _this enableAI "MOVE"; 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;

View File

@ -35,6 +35,6 @@ if !(isNumber (_config >> QGVAR(enabled))) then {
[_vehicle] call FUNC(cutRopes); [_vehicle] call FUNC(cutRopes);
}; };
}]; }];
[FUNC(checkVehicleThread), [_vehicle, _fries], 5] call EFUNC(common,waitAndExecute); [FUNC(checkVehicleThread), [_vehicle, _fries], 5] call CBA_fnc_waitAndExecute;
}; };
}; };

View File

@ -30,7 +30,7 @@ if !(isNull _fries) then {
_this animate ["dvere1_posunZ", 0]; _this animate ["dvere1_posunZ", 0];
_this animate ["dvere2_posunZ", 0]; _this animate ["dvere2_posunZ", 0];
_this setVariable [QGVAR(doorsLocked), false, true]; _this setVariable [QGVAR(doorsLocked), false, true];
}, _vehicle, 2] call EFUNC(common,waitAndExecute); }, _vehicle, 2] call CBA_fnc_waitAndExecute;
4 4
} else { } else {

View File

@ -35,7 +35,7 @@ if !(isNull _fries) then {
[{ [{
_this animate ["extendHookRight", 1]; _this animate ["extendHookRight", 1];
_this animate ["extendHookLeft", 1]; _this animate ["extendHookLeft", 1];
}, _fries, 2] call EFUNC(common,waitAndExecute); }, _fries, 2] call CBA_fnc_waitAndExecute;
_waitTime = 4; _waitTime = 4;
}; };

View File

@ -29,4 +29,4 @@ if (isText (_config >> QGVAR(onPrepare))) then {
[{ [{
_this setVariable [QGVAR(deploymentStage), 2, true]; _this setVariable [QGVAR(deploymentStage), 2, true];
}, _vehicle, _waitTime] call EFUNC(common,waitAndExecute); }, _vehicle, _waitTime] call CBA_fnc_waitAndExecute;

View File

@ -22,6 +22,7 @@ private _min = getNumber (_turretConfig >> QGVAR(MinDistance));
private _max = getNumber (_turretConfig >> QGVAR(MaxDistance)); private _max = getNumber (_turretConfig >> QGVAR(MaxDistance));
private _distance = _vehicle getVariable [format ["%1_%2", QGVAR(Distance), _turret], _min]; private _distance = _vehicle getVariable [format ["%1_%2", QGVAR(Distance), _turret], _min];
TRACE_4("",_distance,_delta,_min,_max);
_distance = _distance + _delta; _distance = _distance + _delta;
_distance = _distance min _max; _distance = _distance min _max;

View File

@ -15,6 +15,7 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
params ["_vehicle","_turret","_distance","_angleTarget"]; params ["_vehicle","_turret","_distance","_angleTarget"];
TRACE_4("params",_vehicle,_turret,_distance,_angleTarget);
private _FCSMagazines = []; private _FCSMagazines = [];
private _FCSElevation = []; private _FCSElevation = [];

View File

@ -8,9 +8,13 @@
* Return Value: * Return Value:
* Boolean <BOOL> * Boolean <BOOL>
* *
* Example:
* [] call ace_fcs_fnc_canUseFCS
*
* Public: No * Public: No
*/ */
#include "script_component.hpp" #include "script_component.hpp"
getNumber ([configFile >> "CfgVehicles" >> typeOf vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex)] call EFUNC(common,getTurretConfigPath) >> QGVAR(Enabled)) == 1 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

View File

@ -14,6 +14,7 @@
#include "script_component.hpp" #include "script_component.hpp"
params ["_vehicle", "_turret", "_distance", ["_showHint", false], ["_playSound", true]]; 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); 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(MaxDistance)),
getNumber (_turretConfig >> QGVAR(MinDistance)) getNumber (_turretConfig >> QGVAR(MinDistance))
] call FUNC(getRange); ] call FUNC(getRange);
} else {
((uiNamespace getVariable ["ACE_dlgRangefinder", displayNull]) displayCtrl 1713151) ctrlSetText ([_distance, 4, 0] call CBA_fnc_formatNumber);
}; };
// MOVING TARGETS // MOVING TARGETS

View File

@ -29,32 +29,73 @@ class asdg_MuzzleSlot_45ACP_SMG: asdg_MuzzleSlot { // for .45ACP universal mount
ACE_muzzle_mzls_smg_01 = 1; 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 MuzzleSlot;
class CfgWeapons { class CfgWeapons {
class Rifle_Base_F;
/* MX */
class Rifle_Long_Base_F: Rifle_Base_F {
class Rifle;
class Rifle_Base_F: Rifle {
class WeaponSlotsInfo; 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 WeaponSlotsInfo: WeaponSlotsInfo {
class MuzzleSlot: MuzzleSlot { class MuzzleSlot: asdg_MuzzleSlot_762 {
compatibleItems[] += {"ACE_muzzle_mzls_H"}; 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 arifle_MX_SW_F: arifle_MX_Base_F {
class WeaponSlotsInfo: WeaponSlotsInfo { class WeaponSlotsInfo: WeaponSlotsInfo {
class MuzzleSlot: MuzzleSlot { class MuzzleSlot: asdg_MuzzleSlot_762MG {
// Shit is broken again class compatibleItems: compatibleItems {
//compatibleItems[] += {"ACE_muzzle_mzls_H"}; ACE_muzzle_mzls_H = 1;
compatibleItems[] = {"muzzle_snds_H","muzzle_snds_H_SW","ACE_muzzle_mzls_H"}; 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 */ /* 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 WeaponSlotsInfo: WeaponSlotsInfo {
class MuzzleSlot: MuzzleSlot { class MuzzleSlot: asdg_MuzzleSlot_762 {
compatibleItems[] += {"ACE_muzzle_mzls_H"}; 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 */ /* 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 LMG_Mk200_F: Rifle_Long_Base_F {
class WeaponSlotsInfo: WeaponSlotsInfo { class WeaponSlotsInfo: WeaponSlotsInfo {
class MuzzleSlot: MuzzleSlot { class MuzzleSlot: asdg_MuzzleSlot_762MG {
compatibleItems[] += {"ACE_muzzle_mzls_H"}; class compatibleItems: compatibleItems {
}; ACE_muzzle_mzls_H = 1;
}; ACE_muzzle_mzls_B = 0;
}; };
class LMG_Zafir_F: Rifle_Long_Base_F {
class WeaponSlotsInfo: WeaponSlotsInfo {
class MuzzleSlot: MuzzleSlot {
compatibleItems[] += {"ACE_muzzle_mzls_B"};
}; };
}; };
}; };

View File

@ -21,7 +21,7 @@ if ((_this select 0) <= (count GVAR(spallHPData))) then {
// diag_log text format["%1: %2", _forEachIndex, _x]; // diag_log text format["%1: %2", _forEachIndex, _x];
// } forEach _hp; // } forEach _hp;
// } forEach (_this select 1); // } forEach (_this select 1);
[DFUNC(doSpall), [_this, _forEachIndex]] call EFUNC(common,execNextFrame); [DFUNC(doSpall), [_this, _forEachIndex]] call CBA_fnc_execNextFrame;
// player sideChat "WEEE"; // player sideChat "WEEE";
} forEach (_this select 1); } forEach (_this select 1);
}; };

View File

@ -22,7 +22,7 @@ if (count _intersectsWith > 0) then {
if(!(_x in _foundObjects)) then { if(!(_x in _foundObjects)) then {
// diag_log text format["Adding HP: %1", _x]; // diag_log text format["Adding HP: %1", _x];
_index = (count GVAR(spallHPData)); _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]; _foundObjects set[(count _foundObjects), _x];
_foundObjectHPIds set[(count _foundObjectHPIds), _hpId]; _foundObjectHPIds set[(count _foundObjectHPIds), _hpId];
_data = [_hpId, _x, typeOf _round, _round, _curPos, _velocity, 0, _foundObjects, _foundObjectHPIds]; _data = [_hpId, _x, typeOf _round, _round, _curPos, _velocity, 0, _foundObjects, _foundObjectHPIds];

View File

@ -25,7 +25,7 @@ _display displayAddEventHandler ["KeyDown", {
}; };
TRACE_2("Reloading, blocking gestures",_weapon,_duration); TRACE_2("Reloading, blocking gestures",_weapon,_duration);
[{GVAR(ReloadMutex) = true;}, [], _duration] call EFUNC(common,waitAndExecute); [{GVAR(ReloadMutex) = true;}, [], _duration] call CBA_fnc_waitAndExecute;
}; };
}; };
false false

View File

@ -12,8 +12,7 @@ class CfgPatches {
}; };
}; };
#include "ACE_Settings.hpp"
#include "CfgEventHandlers.hpp" #include "CfgEventHandlers.hpp"
#include "CfgWeapons.hpp" #include "CfgWeapons.hpp"
#include "CfgVehicles.hpp" #include "CfgVehicles.hpp"

View File

@ -90,9 +90,9 @@ GVAR(OldGlasses) = "<null>";
_unit setVariable ["ACE_EyesDamaged", false]; _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); }] call EFUNC(common,addEventHandler);

View File

@ -71,7 +71,7 @@ GVAR(DustHandler) = [{
if (GVAR(DustHandler) == -1) then { if (GVAR(DustHandler) == -1) then {
GVAR(PostProcessEyes) ppEffectEnable false GVAR(PostProcessEyes) ppEffectEnable false
}; };
}, [], 2] call EFUNC(common,waitAndExecute); }, [], 2] call CBA_fnc_waitAndExecute;
[GVAR(DustHandler)] call CBA_fnc_removePerFrameHandler; [GVAR(DustHandler)] call CBA_fnc_removePerFrameHandler;
GVAR(DustHandler) = -1; GVAR(DustHandler) = -1;

View File

@ -50,7 +50,7 @@ if !(_rotorWash select 0) exitWith {
if (GVAR(DustHandler) == -1) then { if (GVAR(DustHandler) == -1) then {
GVAR(PostProcessEyes) ppEffectEnable false; GVAR(PostProcessEyes) ppEffectEnable false;
} }
}, [], 2] call EFUNC(common,waitAndExecute); }, [], 2] call CBA_fnc_waitAndExecute;
[GVAR(DustHandler)] call CBA_fnc_removePerFrameHandler; [GVAR(DustHandler)] call CBA_fnc_removePerFrameHandler;
GVAR(DustHandler) = -1; GVAR(DustHandler) = -1;

View File

@ -34,7 +34,7 @@ if ((stance _unit != "PRONE") && {primaryWeapon _unit != ""} && {currentWeapon _
if (cameraView == "INTERNAL") then { if (cameraView == "INTERNAL") then {
addCamShake [5, 1.75, 2]; addCamShake [5, 1.75, 2];
}; };
}, [], 0.3] call EFUNC(common,waitAndExecute); }, [], 0.3] call CBA_fnc_waitAndExecute;
call FUNC(removeDirtEffect); call FUNC(removeDirtEffect);
call FUNC(removeRainEffect); call FUNC(removeRainEffect);

View File

@ -36,4 +36,4 @@ _light setLightDayLight true;
_light lightAttachObject [_projectile, [0,0,0]]; _light lightAttachObject [_projectile, [0,0,0]];
//_light attachTo [_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;

View File

@ -36,8 +36,8 @@ if (hasInterface) then {
[{ [{
params ["_light"]; params ["_light"];
deleteVehicle _light; deleteVehicle _light;
}, [_light], 0.2] call EFUNC(common,waitAndExecute); }, [_light], 0.2] call CBA_fnc_waitAndExecute;
}, [_light], 0.1] call EFUNC(common,waitAndExecute); }, [_light], 0.1] call CBA_fnc_waitAndExecute;
}; };
// Affect local AI // Affect local AI
@ -67,7 +67,7 @@ _affected = _affected - [ACE_player];
}; };
_unit setSkill (skill _unit * 50); _unit setSkill (skill _unit * 50);
}, [_x], 7 * _strength] call EFUNC(common,waitAndExecute); }, [_x], 7 * _strength] call CBA_fnc_waitAndExecute;
}; };
} count _affected; } 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) ppEffectAdjust [1,1,0,[1,1,1,0],[0,0,0,1],[0,0,0,0]];
GVAR(flashbangPPEffectCC) ppEffectCommit (10 * _strength); GVAR(flashbangPPEffectCC) ppEffectCommit (10 * _strength);
}, [_strength], 7 * _strength] call EFUNC(common,waitAndExecute); }, [_strength], 7 * _strength] call CBA_fnc_waitAndExecute;
//FULLRECOVERY - end effect //FULLRECOVERY - end effect
[{ [{
GVAR(flashbangPPEffectCC) ppEffectEnable false; GVAR(flashbangPPEffectCC) ppEffectEnable false;
}, [], 17 * _strength] call EFUNC(common,waitAndExecute); }, [], 17 * _strength] call CBA_fnc_waitAndExecute;
}; };
if (_strength > 0.2) then { if (_strength > 0.2) then {

View File

@ -32,7 +32,7 @@ if (local _unit) then {
if (getNumber (_config >> QGVAR(flashbang)) == 1) then { if (getNumber (_config >> QGVAR(flashbang)) == 1) then {
private _fuzeTime = getNumber (_config >> "explosionTime"); 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 _color = getArray (_config >> QGVAR(color));
private _intensity = _color deleteAt 3; 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 // handle throw modes

View File

@ -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 Extended_Respawn_EventHandlers {
class CAManBase { class CAManBase {
class ADDON { class ADDON {

View File

@ -17,6 +17,10 @@ GVAR(volumeAttenuation) = 1;
// Only run PFEH and install event handlers if combat deafness is enabled // Only run PFEH and install event handlers if combat deafness is enabled
if (!GVAR(EnableCombatDeafness)) exitWith {}; 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: // Update hearing protection now:
[] call FUNC(updateHearingProtection); [] call FUNC(updateHearingProtection);

View File

@ -16,9 +16,6 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
// Only run if combat deafness is enabled
if (!GVAR(EnableCombatDeafness)) exitWith {};
params ["_unit", "_damage"]; params ["_unit", "_damage"];
if (_unit != ACE_player) exitWith {}; if (_unit != ACE_player) exitWith {};

View File

@ -22,9 +22,6 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
// Only run if combat deafness is enabled
if (!GVAR(EnableCombatDeafness)) exitWith {};
params ["_object", "_firer", "_distance", "_weapon", "", "", "_ammo"]; params ["_object", "_firer", "_distance", "_weapon", "", "", "_ammo"];
//Only run if firedNear object is player or player's vehicle: //Only run if firedNear object is player or player's vehicle:

View File

@ -16,6 +16,12 @@
*/ */
#include "script_component.hpp" #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"]; (_this select 0) params ["_justUpdateVolume"];
GVAR(deafnessDV) = (GVAR(deafnessDV) min 20) max 0; 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); _volume = _volume min GVAR(UnconsciousnessVolume);
}; };
private _soundTransitionTime = if (_justUpdateVolume) then {0.1} else {1}; [QUOTE(ADDON), _volume, true] call EFUNC(common,setHearingCapability);
_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;};

View File

@ -31,7 +31,7 @@ if (_unit == ACE_player) then {
}; };
// play scream sound // play scream sound
if (!isNil QUOTE(EFUNC(medical,playInjuredSound))) then { if (!isNil QEFUNC(medical,playInjuredSound)) then {
[_unit] call EFUNC(medical,playInjuredSound); [_unit] call EFUNC(medical,playInjuredSound);
}; };

View File

@ -26,6 +26,7 @@ class CfgAmmo {
soundHit6[] = {"",3.16228,1,2000}; soundHit6[] = {"",3.16228,1,2000};
soundHit7[] = {"",3.16228,1,2000}; soundHit7[] = {"",3.16228,1,2000};
soundHit8[] = {"",3.16228,1,2000}; soundHit8[] = {"",3.16228,1,2000};
SoundSetExplosion[] = {};
multiSoundHit[] = {}; multiSoundHit[] = {};
class HitEffects {}; class HitEffects {};
soundFakeFall0[] = {"",3.16228,1,1000}; soundFakeFall0[] = {"",3.16228,1,1000};

View File

@ -50,5 +50,5 @@ if (!hasInterface) exitWith {};
_huntir setVectorUp [0, 0, 1]; _huntir setVectorUp [0, 0, 1];
}; };
}, 0, [_huntir]] call CBA_fnc_addPerFrameHandler; }, 0, [_huntir]] call CBA_fnc_addPerFrameHandler;
}, [getPosATL _projectile vectorAdd [0, 0, 50]], 2, 0] call EFUNC(common,waitAndExecute); }, [getPosATL _projectile vectorAdd [0, 0, 50]], 2, 0] call CBA_fnc_waitAndExecute;
}, [_projectile], 5, 0] call EFUNC(common,waitAndExecute); }, [_projectile], 5, 0] call CBA_fnc_waitAndExecute;

View File

@ -90,9 +90,9 @@ createDialog "ace_huntir_cam_dialog_off";
GVAR(done) = true; GVAR(done) = true;
closedialog 0; closedialog 0;
HUNTIR_BACKGROUND_LAYER_ID cutText ["", "PLAIN"]; 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; }, __TYPE_WRITER_DELAY, []] call CBA_fnc_addPerFrameHandler;
}, [], 0.5, 0] call EFUNC(common,waitAndExecute); }, [], 0.5, 0] call CBA_fnc_waitAndExecute;
}, [], 1, 0] call EFUNC(common,waitAndExecute); }, [], 1, 0] call CBA_fnc_waitAndExecute;

View File

@ -53,7 +53,7 @@ _filter ctrlAddEventHandler ["LBSelChanged", {_this call FUNC(onLBSelChanged)}];
// readd "All" filter to last position and select it // readd "All" filter to last position and select it
_index = _filter lbAdd _nameAll; _index = _filter lbAdd _nameAll;
_filter lbSetCurSel _index; _filter lbSetCurSel _index;
}, [_filter]] call EFUNC(common,execNextFrame); }, [_filter]] call CBA_fnc_execNextFrame;
// monitor changes that can happen and force our update // monitor changes that can happen and force our update
private _dummyControl = _display ctrlCreate ["RscMapControl", -1]; private _dummyControl = _display ctrlCreate ["RscMapControl", -1];

View File

@ -24,4 +24,4 @@ GVAR(selectedFilterIndex) = _index;
params ["_display"]; params ["_display"];
[_display] call FUNC(forceItemListUpdate); [_display] call FUNC(forceItemListUpdate);
}, [ctrlParent _filter]] call EFUNC(common,execNextFrame); }, [ctrlParent _filter]] call CBA_fnc_execNextFrame;

View File

@ -9,9 +9,6 @@
#define DFUNC(var1) TRIPLES(ADDON,fnc,var1) #define DFUNC(var1) TRIPLES(ADDON,fnc,var1)
#define DEFUNC(var1,var2) TRIPLES(DOUBLES(PREFIX,var1),fnc,var2) #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 PATHTOEF(var1,var2) PATHTOF_SYS(PREFIX,var1,var2)
#define GETVAR_SYS(var1,var2) getVariable [ARR_2(QUOTE(var1),var2)] #define GETVAR_SYS(var1,var2) getVariable [ARR_2(QUOTE(var1),var2)]

View File

@ -1,48 +1,54 @@
class CfgAmmo { class CfgAmmo {
class FlareCore; class Chemlight_base;
class FlareBase: FlareCore {}; class ACE_FlashlightProxy_White: Chemlight_base {
class F_20mm_White: FlareBase {};
class ACE_FlashlightProxy_White: F_20mm_White {
model = "\A3\Weapons_f\empty"; model = "\A3\Weapons_f\empty";
effectFlare = "FlareShell"; effectsSmoke = "ACE_FlashlightEffect_White";
explosionTime = 0.01;
triggerTime = 0; timeToLive = 1e10;
intensity = 0.5;
flareSize = 1; soundImpactHard1[] = {"",1,1};
timeToLive = 10e10; soundImpactHard2[] = {"",1,1};
soundImpactHard3[] = {"",1,1};
lightColor[] = {1,1,1,1}; soundImpactHard4[] = {"",1,1};
soundImpactHard5[] = {"",1,1};
grenadeBurningSound[] = {}; soundImpactHard6[] = {"",1,1};
grenadeFireSound[] = {}; soundImpactHard7[] = {"",1,1};
soundTrigger[] = {}; soundImpactIron1[] = {"",1,1};
SmokeShellSoundHit1[] = {}; soundImpactIron2[] = {"",1,1};
SmokeShellSoundHit2[] = {}; soundImpactIron3[] = {"",1,1};
SmokeShellSoundHit3[] = {}; soundImpactIron4[] = {"",1,1};
SmokeShellSoundLoop1[] = {}; soundImpactIron5[] = {"",1,1};
SmokeShellSoundLoop2[] = {}; 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 { class ACE_FlashlightProxy_Red: ACE_FlashlightProxy_White {
intensity = 1; effectsSmoke = "ACE_FlashlightEffect_Red";
lightColor[] = {1,0,0,1};
}; };
class ACE_FlashlightProxy_Green: ACE_FlashlightProxy_White {
intensity = 1;
lightColor[] = {0,1,0,1};
};
class ACE_FlashlightProxy_Blue: ACE_FlashlightProxy_White { class ACE_FlashlightProxy_Blue: ACE_FlashlightProxy_White {
intensity = 1.5; effectsSmoke = "ACE_FlashlightEffect_Blue";
lightColor[] = {0.25,0.25,1,1};
}; };
class ACE_FlashlightProxy_Green: ACE_FlashlightProxy_White {
effectsSmoke = "ACE_FlashlightEffect_Green";
};
class ACE_FlashlightProxy_Yellow: ACE_FlashlightProxy_White { class ACE_FlashlightProxy_Yellow: ACE_FlashlightProxy_White {
intensity = 1; effectsSmoke = "ACE_FlashlightEffect_Yellow";
lightColor[] = {1,1,0.5,1};
}; };
}; };

35
addons/map/CfgLights.hpp Normal file
View 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
View 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";
};
};

View File

@ -9,6 +9,7 @@ if (isServer) then {
{ {
if (_x isKindOf "ACE_FlashlightProxy_White") then { if (_x isKindOf "ACE_FlashlightProxy_White") then {
// ACE_LOGINFO_2("Deleting leftover light [%1:%2] from DC player [%3]", _x, typeOf _x, _disconnectedPlayer); // ACE_LOGINFO_2("Deleting leftover light [%1:%2] from DC player [%3]", _x, typeOf _x, _disconnectedPlayer);
detach _x;
deleteVehicle _x; deleteVehicle _x;
}; };
} forEach attachedObjects _disconnectedPlayer; } forEach attachedObjects _disconnectedPlayer;

View File

@ -29,6 +29,8 @@ class RscEdit;
#include "CfgVehicles.hpp" #include "CfgVehicles.hpp"
#include "CfgAmmo.hpp" #include "CfgAmmo.hpp"
#include "CfgSounds.hpp" #include "CfgSounds.hpp"
#include "CfgLights.hpp"
#include "Effects.hpp"
class RscMapControl { class RscMapControl {
maxSatelliteAlpha = 0.5; maxSatelliteAlpha = 0.5;
@ -160,4 +162,4 @@ class RscDisplayServerGetReady: RscDisplayGetReady {
#include "MapControls.hpp" #include "MapControls.hpp"
}; };
}; };
}; };

View File

@ -20,7 +20,10 @@ private ["_light", "_color", "_class"];
params ["_flashlight"]; params ["_flashlight"];
_light = GVAR(glow); _light = GVAR(glow);
if (!isNull _light) then {deleteVehicle _light}; if (!isNull _light) then {
detach _light;
deleteVehicle _light;
};
if (_flashlight != "") then { if (_flashlight != "") then {
_color = getText (configFile >> "CfgWeapons" >> _flashlight >> "ItemInfo" >> "FlashLight" >> "ACE_Flashlight_Colour"); _color = getText (configFile >> "CfgWeapons" >> _flashlight >> "ItemInfo" >> "FlashLight" >> "ACE_Flashlight_Colour");
@ -28,9 +31,9 @@ if (_flashlight != "") then {
_class = format["ACE_FlashlightProxy_%1", _color]; _class = format["ACE_FlashlightProxy_%1", _color];
_light = _class createVehicle [0,0,0]; _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 { } else {
_light = objNull; _light = objNull;
}; };
GVAR(glow) = _light; GVAR(glow) = _light;

View File

@ -238,4 +238,4 @@
//Update now and add eventHandler: //Update now and add eventHandler:
[_aceAngleSlider, _curSelAngle] call FUNC(onSliderPosChangedAngle); [_aceAngleSlider, _curSelAngle] call FUNC(onSliderPosChangedAngle);
_aceAngleSlider ctrlAddEventHandler ["SliderPosChanged", {_this call FUNC(onSliderPosChangedAngle)}]; _aceAngleSlider ctrlAddEventHandler ["SliderPosChanged", {_this call FUNC(onSliderPosChangedAngle)}];
}, _this] call EFUNC(common,execNextFrame); }, _this] call CBA_fnc_execNextFrame;

View File

@ -32,5 +32,5 @@ if (_closeNum == 1) then {
] ]
]] call EFUNC(common,globalEvent); ]] call EFUNC(common,globalEvent);
}, []] call EFUNC(common,execNextFrame); }, []] call CBA_fnc_execNextFrame;
}; };

View File

@ -158,7 +158,7 @@ class CfgVehicles {
displayName = CSTRING(BasicMedicalSettings_Module_DisplayName); displayName = CSTRING(BasicMedicalSettings_Module_DisplayName);
icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa)); icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa));
category = "ACE_medical"; category = "ACE_medical";
function = QUOTE(FUNC(moduleBasicMedicalSettings)); function = QFUNC(moduleBasicMedicalSettings);
functionPriority = 10; functionPriority = 10;
isGlobal = 2; isGlobal = 2;
isSingular = 1; isSingular = 1;
@ -200,7 +200,7 @@ class CfgVehicles {
displayName = CSTRING(AdvancedMedicalSettings_Module_DisplayName); displayName = CSTRING(AdvancedMedicalSettings_Module_DisplayName);
icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa)); icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa));
category = "ACE_medical"; category = "ACE_medical";
function = QUOTE(FUNC(moduleAdvancedMedicalSettings)); function = QFUNC(moduleAdvancedMedicalSettings);
functionPriority = 10; functionPriority = 10;
isGlobal = 2; isGlobal = 2;
isSingular = 1; isSingular = 1;
@ -366,7 +366,7 @@ class CfgVehicles {
displayName = CSTRING(AssignMedicRoles_Module_DisplayName); displayName = CSTRING(AssignMedicRoles_Module_DisplayName);
icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa)); icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa));
category = "ACE_medical"; category = "ACE_medical";
function = QUOTE(FUNC(moduleAssignMedicRoles)); function = QFUNC(moduleAssignMedicRoles);
functionPriority = 10; functionPriority = 10;
isGlobal = 2; isGlobal = 2;
isTriggerActivated = 0; isTriggerActivated = 0;
@ -413,7 +413,7 @@ class CfgVehicles {
displayName = CSTRING(AssignMedicVehicle_Module_DisplayName); displayName = CSTRING(AssignMedicVehicle_Module_DisplayName);
icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa)); icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa));
category = "ACE_medical"; category = "ACE_medical";
function = QUOTE(FUNC(moduleAssignMedicalVehicle)); function = QFUNC(moduleAssignMedicalVehicle);
functionPriority = 10; functionPriority = 10;
isGlobal = 2; isGlobal = 2;
isTriggerActivated = 0; isTriggerActivated = 0;
@ -457,7 +457,7 @@ class CfgVehicles {
displayName = CSTRING(AssignMedicalFacility_Module_DisplayName); displayName = CSTRING(AssignMedicalFacility_Module_DisplayName);
icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa)); icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa));
category = "ACE_medical"; category = "ACE_medical";
function = QUOTE(FUNC(moduleAssignMedicalFacility)); function = QFUNC(moduleAssignMedicalFacility);
functionPriority = 10; functionPriority = 10;
isGlobal = 2; isGlobal = 2;
isTriggerActivated = 0; isTriggerActivated = 0;

View File

@ -37,19 +37,15 @@ if (isServer) then {["placedInBodyBag", FUNC(serverRemoveBody)] call EFUNC(commo
params ["_unit", "_status"]; params ["_unit", "_status"];
if (local _unit) then { if (local _unit) then {
if (_status) then { if (_status) then {
_unit setVariable ["tf_globalVolume", 0.4];
_unit setVariable ["tf_voiceVolume", 0, true]; _unit setVariable ["tf_voiceVolume", 0, true];
_unit setVariable ["tf_unable_to_use_radio", true, true]; _unit setVariable ["tf_unable_to_use_radio", true, true];
_unit setVariable ["acre_sys_core_isDisabled", 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 { } else {
_unit setVariable ["tf_globalVolume", 1];
_unit setVariable ["tf_voiceVolume", 1, true]; _unit setVariable ["tf_voiceVolume", 1, true];
_unit setVariable ["tf_unable_to_use_radio", false, true]; _unit setVariable ["tf_unable_to_use_radio", false, true];
_unit setVariable ["acre_sys_core_isDisabled", 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); }] 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) ppEffectAdjust [1,1,0, [1,1,1,0], [0,0,0,1], [0,0,0,0]];
GVAR(effectBlindingCC) ppEffectCommit ((_this select 0) * 2); 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; 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; GVAR(effectBlind) = false;
}; };
@ -210,15 +206,15 @@ GVAR(lastHeartBeatSound) = CBA_missionTime;
[{ [{
GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false]; GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false];
GVAR(effectPainCA) ppEffectCommit (_this select 1); 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) ppEffectAdjust [(_this select 0), (_this select 0), false];
GVAR(effectPainCA) ppEffectCommit 0.01; 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) ppEffectAdjust [(_this select 0), (_this select 0), false];
GVAR(effectPainCA) ppEffectCommit (_this select 1); 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 { } else {
GVAR(effectPainCA) ppEffectEnable false; 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) 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); 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) 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; 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) 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); 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 { } else {
GVAR(effectPainCC) ppEffectEnable false; GVAR(effectPainCC) ppEffectEnable false;
}; };

View File

@ -35,7 +35,7 @@ private _fixStatic = {
1 preloadObject (_this select 0); 1 preloadObject (_this select 0);
}, { }, {
TRACE_1("preload done",_this); TRACE_1("preload done",_this);
}, [_vehType]] call EFUNC(common,waitUntilAndExecute); }, [_vehType]] call CBA_fnc_waitUntilAndExecute;
}; };
}; };
["StaticWeapon", "init", _fixStatic] call CBA_fnc_addClassEventHandler; ["StaticWeapon", "init", _fixStatic] call CBA_fnc_addClassEventHandler;
@ -47,7 +47,7 @@ addMissionEventHandler ["Loaded",{
1 preloadObject (_this select 0); 1 preloadObject (_this select 0);
}, { }, {
TRACE_1("preload done",_this); TRACE_1("preload done",_this);
}, [_x]] call EFUNC(common,waitUntilAndExecute); }, [_x]] call CBA_fnc_waitUntilAndExecute;
} forEach GVAR(fixedStatics); } forEach GVAR(fixedStatics);
}]; }];

View File

@ -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); 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 #endif
private _return = [_unit, _selection, (_currentDamage + _damageToAdd), _unit, _typeOfDamage, _hitpointIndex] call FUNC(handleDamage); private _return = [_unit, _selection, (_currentDamage + _damageToAdd), _unit, _typeOfDamage, _hitpointIndex] call FUNC(handleDamage);

View File

@ -27,4 +27,4 @@ if ((_unit getVariable[QGVAR(addedToUnitLoop),false] || !alive _unit) && !_force
// Schedule the loop to be executed again 1 sec later // Schedule the loop to be executed again 1 sec later
// @todo: should the loop be started righ away instead? // @todo: should the loop be started righ away instead?
_unit setVariable [QGVAR(addedToUnitLoop), true, true]; _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;

View File

@ -27,4 +27,4 @@ if (GVAR(bodiesToDelete) isEqualTo []) exitWith {
}; };
// Schedule the loop to be executed again 20 sec later // Schedule the loop to be executed again 20 sec later
[DFUNC(bodyCleanupLoop), [], 20] call EFUNC(common,waitAndExecute); [DFUNC(bodyCleanupLoop), [], 20] call CBA_fnc_waitAndExecute;

View File

@ -117,5 +117,5 @@ if (random(1) <= _reopeningChance) then {
}; };
// Otherwise something went wrong, we we don't reopen them.. // 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;
}; };

View File

@ -29,7 +29,7 @@ _litterObject = _litterClass createVehicleLocal _position;
_litterObject setDir _direction; _litterObject setDir _direction;
_litterObject setPosATL _position; _litterObject setPosATL _position;
// Move the litter next frame to get rid of HORRIBLE spacing, fixes #1112 // 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); _maxLitterCount = getArray (configFile >> "ACE_Settings" >> QGVAR(litterSimulationDetail) >> "_values") select GVAR(litterSimulationDetail);
if((count GVAR(allCreatedLitter)) > _maxLitterCount ) then { if((count GVAR(allCreatedLitter)) > _maxLitterCount ) then {

Some files were not shown because too many files have changed in this diff Show More