mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' into explosiveInteraction
This commit is contained in:
commit
2ad0aab2bb
@ -19,22 +19,10 @@
|
||||
PARAMS_1(_unit);
|
||||
DEFAULT_PARAM(1,_target,objNull);
|
||||
|
||||
private ["_isAttached"];
|
||||
|
||||
if (isNull _target) then {
|
||||
_target = _unit getVariable [QGVAR(escortedUnit), objNull];
|
||||
};
|
||||
|
||||
if (isNull _target) exitWith {
|
||||
ERROR("Null Target (no ACE_escortedUnit)");
|
||||
false
|
||||
};
|
||||
if (isNull _target) exitWith {false};
|
||||
|
||||
_isAttached = _target in (attachedObjects _unit);
|
||||
|
||||
if (_isAttached && (!(_target getVariable [QGVAR(isHandcuffed), false]))) exitWith {
|
||||
ERROR("Attached But Not Captive");
|
||||
false
|
||||
};
|
||||
|
||||
_isAttached
|
||||
(_target in (attachedObjects _unit)) && {_target getVariable [QGVAR(isHandcuffed), false]}
|
||||
|
@ -38,7 +38,7 @@ class Extended_Respawn_EventHandlers {
|
||||
respawn = QUOTE(_this call FUNC(setName));
|
||||
};
|
||||
class GVAR(RESETDefaults) {
|
||||
respawn = QUOTE(_this call FUNC(resetAllDefaults_F));
|
||||
respawn = QUOTE(_this call FUNC(resetAllDefaults));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -15,12 +15,16 @@ PREP(addSetting);
|
||||
PREP(adminKick);
|
||||
PREP(ambientBrightness);
|
||||
PREP(applyForceWalkStatus);
|
||||
PREP(beingCarried);
|
||||
PREP(binarizeNumber);
|
||||
PREP(callCustomEventHandlers);
|
||||
PREP(callCustomEventHandlersGlobal);
|
||||
PREP(canGetInPosition);
|
||||
PREP(canInteract);
|
||||
PREP(canInteractWith);
|
||||
PREP(canUseWeapon);
|
||||
PREP(carriedByObj);
|
||||
PREP(carryObj);
|
||||
PREP(changeProjectileDirection);
|
||||
PREP(checkPBOs);
|
||||
PREP(claim);
|
||||
@ -30,6 +34,10 @@ PREP(codeToString);
|
||||
PREP(convertKeyCode);
|
||||
PREP(createOrthonormalReference);
|
||||
PREP(currentChannel);
|
||||
PREP(debug);
|
||||
PREP(debugModule);
|
||||
PREP(defineVariable);
|
||||
PREP(disableAI);
|
||||
PREP(disableUserInput);
|
||||
PREP(displayText);
|
||||
PREP(displayTextPicture);
|
||||
@ -42,12 +50,21 @@ PREP(execRemoteFnc);
|
||||
PREP(executePersistent);
|
||||
PREP(filter);
|
||||
PREP(fixLoweredRifleAnimation);
|
||||
PREP(getAllDefinedSetVariables);
|
||||
PREP(getAllGear);
|
||||
PREP(getCaptivityStatus);
|
||||
PREP(getCarriedBy);
|
||||
PREP(getCarriedObj);
|
||||
PREP(getConfigCommander);
|
||||
PREP(getConfigGunner);
|
||||
PREP(getDeathAnim);
|
||||
PREP(getDefaultAnim);
|
||||
PREP(getDefinedVariable);
|
||||
PREP(getDefinedVariableDefault);
|
||||
PREP(getDefinedVariableInfo);
|
||||
PREP(getDoorTurrets);
|
||||
PREP(getFirstObjectIntersection);
|
||||
PREP(getFirstTerrainIntersection);
|
||||
PREP(getForceWalkStatus);
|
||||
PREP(getGunner);
|
||||
PREP(getHitPoints);
|
||||
@ -56,6 +73,7 @@ PREP(getInPosition);
|
||||
PREP(getMarkerType);
|
||||
PREP(getName);
|
||||
PREP(getNumberFromMissionSQM);
|
||||
PREP(getNumberMagazinesIn);
|
||||
PREP(getPitchBankYaw);
|
||||
PREP(getSettingData);
|
||||
PREP(getStringFromMissionSQM);
|
||||
@ -74,29 +92,43 @@ PREP(getUavControlPosition);
|
||||
PREP(getVehicleCargo);
|
||||
PREP(getVehicleCodriver);
|
||||
PREP(getVehicleCrew);
|
||||
PREP(getVersion);
|
||||
PREP(getWeaponAzimuthAndInclination);
|
||||
PREP(getWeaponIndex);
|
||||
PREP(getWeaponType);
|
||||
PREP(getWindDirection);
|
||||
PREP(goKneeling);
|
||||
PREP(hadamardProduct);
|
||||
PREP(hasItem);
|
||||
PREP(hasMagazine);
|
||||
PREP(inheritsFrom);
|
||||
PREP(insertionSort);
|
||||
PREP(interpolateFromArray);
|
||||
PREP(inTransitionAnim);
|
||||
PREP(inWater);
|
||||
PREP(isArrested);
|
||||
PREP(isAutoWind);
|
||||
PREP(isAwake);
|
||||
PREP(isEngineer);
|
||||
PREP(isEOD);
|
||||
PREP(isInBuilding);
|
||||
PREP(isModLoaded);
|
||||
PREP(isPlayer);
|
||||
PREP(isTurnedOut);
|
||||
PREP(letterToCode);
|
||||
PREP(limitMovementSpeed);
|
||||
PREP(loadPerson);
|
||||
PREP(loadPersonLocal);
|
||||
PREP(loadSettingsFromProfile);
|
||||
PREP(loadSettingsOnServer);
|
||||
PREP(map);
|
||||
PREP(moduleCheckPBOs);
|
||||
PREP(moduleLSDVehicles);
|
||||
PREP(moveToTempGroup);
|
||||
PREP(muteUnit);
|
||||
PREP(numberToDigits);
|
||||
PREP(numberToDigitsString);
|
||||
PREP(onAnswerRequest);
|
||||
PREP(onLoadRscDisplayChannel);
|
||||
PREP(owned);
|
||||
PREP(player);
|
||||
@ -104,33 +136,53 @@ PREP(playerSide);
|
||||
PREP(progressBar);
|
||||
PREP(queueAnimation);
|
||||
PREP(readSettingFromModule);
|
||||
PREP(receiveRequest);
|
||||
PREP(removeActionEventHandler);
|
||||
PREP(removeActionMenuEventHandler);
|
||||
PREP(removeCameraEventHandler);
|
||||
PREP(removeCustomEventHandler);
|
||||
PREP(removeMapMarkerCreatedEventHandler);
|
||||
PREP(removeScrollWheelEventHandler);
|
||||
PREP(requestCallback);
|
||||
PREP(resetAllDefaults);
|
||||
PREP(restoreVariablesJIP);
|
||||
PREP(revertKeyCodeLocalized);
|
||||
PREP(sanitizeString);
|
||||
PREP(sendRequest);
|
||||
PREP(serverLog);
|
||||
PREP(setArrestState);
|
||||
PREP(setCanInteract);
|
||||
PREP(setCaptivityStatus);
|
||||
PREP(setCarriedBy);
|
||||
PREP(setDefinedVariable);
|
||||
PREP(setDisableUserInputStatus);
|
||||
PREP(setForceWalkStatus);
|
||||
PREP(setHearingCapability);
|
||||
PREP(setName);
|
||||
PREP(setParameter);
|
||||
PREP(setPitchBankYaw);
|
||||
PREP(setVariableJIP);
|
||||
PREP(setVariablePublic);
|
||||
PREP(setProne);
|
||||
PREP(setSetting);
|
||||
PREP(setSettingFromConfig);
|
||||
PREP(setVariableJIP);
|
||||
PREP(setVariablePublic);
|
||||
PREP(setVolume);
|
||||
PREP(sortAlphabeticallyBy);
|
||||
PREP(stringCompare);
|
||||
PREP(stringToColoredText);
|
||||
PREP(stringRemoveWhiteSpace);
|
||||
PREP(subString);
|
||||
PREP(switchToGroupSide);
|
||||
PREP(throttledPublicVariable);
|
||||
PREP(toBin);
|
||||
PREP(toBitmask);
|
||||
PREP(toHex);
|
||||
PREP(toNumber);
|
||||
PREP(throttledPublicVariable);
|
||||
PREP(uniqueElementsOnly);
|
||||
PREP(unloadPerson);
|
||||
PREP(unmuteUnit);
|
||||
PREP(useItem);
|
||||
PREP(useMagazine);
|
||||
PREP(waitAndExecute);
|
||||
|
||||
// ACE_Debug
|
||||
@ -195,74 +247,6 @@ if (hasInterface) then {
|
||||
}, 0, []] call cba_fnc_addPerFrameHandler;
|
||||
};
|
||||
|
||||
PREP(stringCompare);
|
||||
PREP(string_removeWhiteSpace);
|
||||
PREP(isHC);
|
||||
PREP(sendRequest_f);
|
||||
PREP(requestCallback);
|
||||
PREP(receiveRequest);
|
||||
PREP(onAnswerRequest);
|
||||
PREP(debug);
|
||||
PREP(debugModule);
|
||||
PREP(defineVariable);
|
||||
PREP(setDefinedVariable);
|
||||
PREP(getDefinedVariable);
|
||||
PREP(getAllDefinedSetVariables);
|
||||
PREP(getDefinedVariableInfo);
|
||||
PREP(getDefinedVariableDefault);
|
||||
PREP(getDeathAnim);
|
||||
PREP(insertionSort);
|
||||
PREP(uniqueElementsOnly);
|
||||
PREP(sortAlphabeticallyBy);
|
||||
PREP(hasMagazine);
|
||||
PREP(useMagazine);
|
||||
PREP(findMagazine);
|
||||
PREP(hasItem);
|
||||
PREP(useItem);
|
||||
PREP(findItem);
|
||||
PREP(getNumberMagazinesIn);
|
||||
PREP(setCanInteract);
|
||||
PREP(getCanInteract);
|
||||
PREP(canInteract);
|
||||
PREP(resetAllDefaults_f);
|
||||
PREP(broadcastSound3D_f);
|
||||
|
||||
PREP(isAwake);
|
||||
PREP(setProne);
|
||||
|
||||
PREP(setDisableUserInputStatus);
|
||||
|
||||
PREP(dropWeapon_f);
|
||||
PREP(inWater_f);
|
||||
PREP(setVolume_f);
|
||||
PREP(closeAllDialogs_f);
|
||||
PREP(disableAI_f);
|
||||
PREP(switchToGroupSide_f);
|
||||
PREP(getFirstObjectIntersection);
|
||||
PREP(getFirstTerrainIntersection);
|
||||
PREP(setHearingCapability);
|
||||
PREP(revealObject_f);
|
||||
PREP(getWeaponItems_f);
|
||||
PREP(isModLoaded_f);
|
||||
PREP(inheritsFrom);
|
||||
PREP(getVersion);
|
||||
PREP(carryObj);
|
||||
PREP(carriedByObj);
|
||||
PREP(getCarriedObj);
|
||||
PREP(getCarriedBy);
|
||||
PREP(beingCarried);
|
||||
PREP(setCarriedBy);
|
||||
|
||||
|
||||
PREP(moveToTempGroup);
|
||||
|
||||
|
||||
PREP(limitMovementSpeed);
|
||||
PREP(setArrestState);
|
||||
PREP(isArrested);
|
||||
PREP(loadPerson_F);
|
||||
PREP(loadPersonLocal_F);
|
||||
PREP(unloadPerson_F);
|
||||
|
||||
|
||||
ADDON = true;
|
||||
|
||||
isHC = !(hasInterface || isDedicated);
|
||||
|
@ -1,16 +0,0 @@
|
||||
/**
|
||||
* fn_broadcastSound3D_f.sqf
|
||||
* @Descr: Plays a sound in 3D
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: [unit OBJECT, sound STRING]
|
||||
* @Return: void
|
||||
* @PublicAPI: true
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (isDedicated) exitwith{};
|
||||
_unit = [_this, 0, ObjNull,[ObjNull]] call BIS_fnc_Param;
|
||||
_sound = [_this, 1, "",[""]] call BIS_fnc_Param;
|
||||
_unit say3D _sound;
|
@ -1,14 +0,0 @@
|
||||
/**
|
||||
* fn_closeAllDialogs_f.sqf
|
||||
* @Descr: Close all dialogs
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: []
|
||||
* @Return: void
|
||||
* @PublicAPI: true
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
while {dialog} do {
|
||||
closeDialog 0;
|
||||
};
|
@ -1,39 +0,0 @@
|
||||
/**
|
||||
* fn_dropWeapon_f.sqf
|
||||
* @Descr: N/A
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: []
|
||||
* @Return:
|
||||
* @PublicAPI: false
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
private ["_unit","_currentWeapon","_currentAnimation", "_WeaponHolder"];
|
||||
_unit = [_this, 0, ObjNull,[ObjNull]] call BIS_fnc_Param;
|
||||
|
||||
_currentWeapon = currentWeapon _unit;
|
||||
_currentAnimation = animationState _unit;
|
||||
_WeaponHolder = "GroundWeaponHolder" createVehicle position _unit;
|
||||
|
||||
_unit removeWeapon _currentWeapon;
|
||||
_weaponHolder addWeaponCargoGlobal [_currentWeapon, 1];
|
||||
//_unit action [ "DropWeapon", _WeaponHolder, _currentWeapon ];
|
||||
_WeaponHolder setPos (getPos _unit);
|
||||
//_unit switchMove _currentAnimation;
|
||||
|
||||
_primairyWeapon = primaryWeapon _unit;
|
||||
_secondairyWeapon = secondaryWeapon _unit;
|
||||
_handGunWeapon = handgunWeapon _unit;
|
||||
|
||||
switch (_currentWeapon) do {
|
||||
case _primairyWeapon: {
|
||||
|
||||
};
|
||||
case _secondairyWeapon: {
|
||||
|
||||
};
|
||||
case _handGunWeapon: {
|
||||
|
||||
};
|
||||
default {};
|
||||
};
|
@ -14,17 +14,17 @@
|
||||
|
||||
// ACRE
|
||||
if (isClass (configFile >> "CfgPatches" >> "acre_main")) then {
|
||||
[-1] call acre_core_fnc_handleMultiPttKeyPressUp;
|
||||
[0] call acre_core_fnc_handleMultiPttKeyPressUp;
|
||||
[1] call acre_core_fnc_handleMultiPttKeyPressUp;
|
||||
[2] call acre_core_fnc_handleMultiPttKeyPressUp;
|
||||
[-1] call acre_core_fnc_handleMultiPttKeyPressUp;
|
||||
[0] call acre_core_fnc_handleMultiPttKeyPressUp;
|
||||
[1] call acre_core_fnc_handleMultiPttKeyPressUp;
|
||||
[2] call acre_core_fnc_handleMultiPttKeyPressUp;
|
||||
};
|
||||
|
||||
// TFAR
|
||||
if (isClass (configFile >> "CfgPatches" >> "task_force_radio")) then {
|
||||
call TFAR_fnc_onSwTangentReleased;
|
||||
call TFAR_fnc_onAdditionalSwTangentReleased;
|
||||
call TFAR_fnc_onLRTangentReleased;
|
||||
call TFAR_fnc_onAdditionalLRTangentReleased;
|
||||
call TFAR_fnc_onDDTangentReleased;
|
||||
call TFAR_fnc_onSwTangentReleased;
|
||||
call TFAR_fnc_onAdditionalSwTangentReleased;
|
||||
call TFAR_fnc_onLRTangentReleased;
|
||||
call TFAR_fnc_onAdditionalLRTangentReleased;
|
||||
call TFAR_fnc_onDDTangentReleased;
|
||||
};
|
||||
|
@ -1,8 +1,8 @@
|
||||
// by commy2
|
||||
/*
|
||||
usage:
|
||||
usage:
|
||||
|
||||
(configFile >> "CfgAmmo") call FUNC(exportConfig);
|
||||
(configFile >> "CfgAmmo") call FUNC(exportConfig);
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
|
@ -1,25 +0,0 @@
|
||||
/**
|
||||
* fn_findItem.sqf
|
||||
* @Descr:
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: []
|
||||
* @Return:
|
||||
* @PublicAPI: true
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
private ["_unit","_magazine","_return"];
|
||||
_unit = _this select 0;
|
||||
_item = _this select 1;
|
||||
|
||||
if (_item in (uniformItems _unit)) exitwith {1};
|
||||
if (_item in (vestItems _unit)) exitwith {2};
|
||||
if (_item in (backpackItems _unit)) exitwith {3};
|
||||
if (_item in (assignedItems _unit)) exitwith {4};
|
||||
if (_item in (primaryWeaponItems _unit)) exitwith {5};
|
||||
if (_item in (secondaryWeaponItems _unit)) exitwith {6};
|
||||
if (_item in (handgunItems _unit)) exitwith {7};
|
||||
if (_item in (items _unit)) exitwith {8}; // in case it is in items but cannot be found in any other container (should never reach this)
|
||||
|
||||
// If we cannot find the item, return 0.
|
||||
0;
|
@ -1,21 +0,0 @@
|
||||
/**
|
||||
* fn_findMagazine.sqf
|
||||
* @Descr: Find where the current magazines are. Order: uniform, vest, backpack, any.
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: [unit OBJECT, magazine STRING (Classname of magazine)]
|
||||
* @Return: NUMBER 0 = none, 1 = in uniform, 2 = in vest, 3 = in backpack, 4 = found outside container
|
||||
* @PublicAPI: true
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
private ["_unit","_magazine"];
|
||||
_unit = _this select 0;
|
||||
_magazine = _this select 1;
|
||||
|
||||
if (_magazine in (getMagazineCargo uniformContainer _unit)) exitwith {1};
|
||||
if (_magazine in (getMagazineCargo vestContainer _unit)) exitwith {2};
|
||||
if (_magazine in (getMagazineCargo backpackContainer _unit)) exitwith {3};
|
||||
if (_magazine in (magazines _unit)) exitwith {4}; // in case it cannot be found in any other container. Most likely loaded in a weapon.
|
||||
|
||||
// If we cannot find the item, return 0.
|
||||
0;
|
@ -1,12 +0,0 @@
|
||||
/**
|
||||
* fn_getCanInteract.sqf
|
||||
* @Descr: N/A
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: []
|
||||
* @Return:
|
||||
* @PublicAPI: false
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
((_this select 0) getvariable [QGVAR(canInteract),0])
|
@ -1,45 +0,0 @@
|
||||
/**
|
||||
* fn_getCustomResults_f.sqf
|
||||
* @Descr: Executes custom results eventhandlers, collects their output and returns this.
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: [arguments ANY, handle STRING]
|
||||
* @Return: ARRAY Collection of all return values of all executed CustomResult handlers
|
||||
* @PublicAPI: true
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_arguments","_handle","_ehCfg","_eventHandlerCollection","_eventHandlerName","_cfg","_code","_classType", "_return"];
|
||||
_arguments = _this select 0;
|
||||
_handle = _this select 1;
|
||||
|
||||
_eventHandlerName = ("ace_f_custom_results_eventhandler_" + _handle);
|
||||
_eventHandlerCollection = missionNamespace getvariable _eventHandlerName;
|
||||
if (isnil "_eventHandlerCollection") then {
|
||||
_eventHandlerCollection = [];
|
||||
|
||||
// TODO Get a replacement for this
|
||||
_cfg = (ConfigFile >> "Advanced_Combat_Environment" >> "CustomResults" >> _handle);
|
||||
if (isClass _cfg) then {
|
||||
_numberOfEH = count _cfg;
|
||||
for [{_EHiterator=0}, {(_EHiterator< _numberOfEH)}, {_EHiterator=_EHiterator+1}] do {
|
||||
_ehCfg = _cfg select _EHiterator;
|
||||
if (isClass _ehCfg) then {
|
||||
_classType = (ConfigName _ehCfg);
|
||||
_code = (compile getText(_ehCfg >> "onCall"));
|
||||
_eventHandlerCollection pushback [_classType, _code];
|
||||
true;
|
||||
};
|
||||
};
|
||||
};
|
||||
missionNamespace setvariable [_eventHandlerName, _eventHandlerCollection];
|
||||
};
|
||||
|
||||
_return = [];
|
||||
{
|
||||
_return pushback (_arguments call (_x select 1));
|
||||
false;
|
||||
}count _eventHandlerCollection;
|
||||
|
||||
_return
|
@ -20,9 +20,9 @@ private "_gunner";
|
||||
_gunner = objNull;
|
||||
|
||||
{
|
||||
if (_weapon in (_vehicle weaponsTurret _x)) exitWith {
|
||||
_gunner = _vehicle turretUnit _x;
|
||||
};
|
||||
if (_weapon in (_vehicle weaponsTurret _x)) exitWith {
|
||||
_gunner = _vehicle turretUnit _x;
|
||||
};
|
||||
} forEach allTurrets _vehicle;
|
||||
|
||||
_gunner
|
||||
|
@ -23,33 +23,33 @@ _hitpoints = [];
|
||||
private "_hitpointClasses";
|
||||
_hitpointClasses = [_config >> "HitPoints"];
|
||||
{
|
||||
private "_class";
|
||||
_class = ([_config, _x] call FUNC(getTurretConfigPath)) >> "HitPoints";
|
||||
private "_class";
|
||||
_class = ([_config, _x] call FUNC(getTurretConfigPath)) >> "HitPoints";
|
||||
|
||||
if (isClass _class) then {
|
||||
_hitpointClasses pushBack _class;
|
||||
};
|
||||
if (isClass _class) then {
|
||||
_hitpointClasses pushBack _class;
|
||||
};
|
||||
|
||||
} forEach allTurrets _vehicle;
|
||||
|
||||
// iterate through all classes with hitpoints and their parents
|
||||
{
|
||||
private "_class";
|
||||
_class = _x;
|
||||
private "_class";
|
||||
_class = _x;
|
||||
|
||||
while {isClass _class} do {
|
||||
while {isClass _class} do {
|
||||
|
||||
for "_i" from 0 to (count _class - 1) do {
|
||||
private "_entry";
|
||||
_entry = configName (_class select _i);
|
||||
for "_i" from 0 to (count _class - 1) do {
|
||||
private "_entry";
|
||||
_entry = configName (_class select _i);
|
||||
|
||||
if (!(_entry in _hitpoints) && {!isNil {_vehicle getHitPointDamage _entry}}) then {
|
||||
_hitpoints pushBack _entry;
|
||||
};
|
||||
};
|
||||
if (!(_entry in _hitpoints) && {!isNil {_vehicle getHitPointDamage _entry}}) then {
|
||||
_hitpoints pushBack _entry;
|
||||
};
|
||||
};
|
||||
|
||||
_class = inheritsFrom _class;
|
||||
};
|
||||
_class = inheritsFrom _class;
|
||||
};
|
||||
|
||||
} forEach _hitpointClasses;
|
||||
|
||||
|
@ -24,36 +24,36 @@ _selections = [];
|
||||
private "_hitpointClasses";
|
||||
_hitpointClasses = [_config >> "HitPoints"];
|
||||
{
|
||||
private "_class";
|
||||
_class = ([_config, _x] call FUNC(getTurretConfigPath)) >> "HitPoints";
|
||||
private "_class";
|
||||
_class = ([_config, _x] call FUNC(getTurretConfigPath)) >> "HitPoints";
|
||||
|
||||
if (isClass _class) then {
|
||||
_hitpointClasses pushBack _class;
|
||||
};
|
||||
if (isClass _class) then {
|
||||
_hitpointClasses pushBack _class;
|
||||
};
|
||||
|
||||
} forEach allTurrets _vehicle;
|
||||
|
||||
// iterate through all classes with hitpoints and their parents
|
||||
{
|
||||
private "_class";
|
||||
_class = _x;
|
||||
private "_class";
|
||||
_class = _x;
|
||||
|
||||
while {isClass _class} do {
|
||||
while {isClass _class} do {
|
||||
|
||||
for "_i" from 0 to (count _class - 1) do {
|
||||
private ["_entry", "_selection"];
|
||||
for "_i" from 0 to (count _class - 1) do {
|
||||
private ["_entry", "_selection"];
|
||||
|
||||
_entry = configName (_class select _i);
|
||||
_selection = getText (_class select _i >> "name");
|
||||
_entry = configName (_class select _i);
|
||||
_selection = getText (_class select _i >> "name");
|
||||
|
||||
if (!(_selection in _selections) && {!isNil {_vehicle getHit _selection}}) then {
|
||||
_hitpoints pushBack _entry;
|
||||
_selections pushBack _selection;
|
||||
};
|
||||
};
|
||||
if (!(_selection in _selections) && {!isNil {_vehicle getHit _selection}}) then {
|
||||
_hitpoints pushBack _entry;
|
||||
_selections pushBack _selection;
|
||||
};
|
||||
};
|
||||
|
||||
_class = inheritsFrom _class;
|
||||
};
|
||||
_class = inheritsFrom _class;
|
||||
};
|
||||
|
||||
} forEach _hitpointClasses;
|
||||
|
||||
|
@ -1,14 +0,0 @@
|
||||
/**
|
||||
* fn_getWeaponItems_f.sqf
|
||||
* @Descr: Get the weapon items from the unit.
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: [unit OBJECT]
|
||||
* @Return:
|
||||
* @PublicAPI: false
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
private "_unit";
|
||||
_unit = _this select 0;
|
||||
|
||||
[primaryWeaponItems _unit, secondaryWeaponItems _unit, handgunItems _unit];
|
@ -9,18 +9,18 @@ _key = _this select 1;
|
||||
ERRORDATA(2);
|
||||
_val = nil;
|
||||
try {
|
||||
if(VALIDHASH(_hash)) then {
|
||||
_index = (_hash select 0) find _key;
|
||||
if(_index != -1) then {
|
||||
_val = (_hash select 1) select _index;
|
||||
if(IS_STRING(_val) && {_val == "ACREHASHREMOVEDONOTUSETHISVAL"}) then {
|
||||
_val = nil;
|
||||
};
|
||||
};
|
||||
} else {
|
||||
ERROR("Input hash is not valid");
|
||||
};
|
||||
if(VALIDHASH(_hash)) then {
|
||||
_index = (_hash select 0) find _key;
|
||||
if(_index != -1) then {
|
||||
_val = (_hash select 1) select _index;
|
||||
if(IS_STRING(_val) && {_val == "ACREHASHREMOVEDONOTUSETHISVAL"}) then {
|
||||
_val = nil;
|
||||
};
|
||||
};
|
||||
} else {
|
||||
ERROR("Input hash is not valid");
|
||||
};
|
||||
} catch {
|
||||
HANDLECATCH;
|
||||
HANDLECATCH;
|
||||
};
|
||||
_val
|
||||
|
@ -9,15 +9,15 @@ _key = _this select 1;
|
||||
ERRORDATA(2);
|
||||
_val = false;
|
||||
try {
|
||||
if(VALIDHASH(_hash)) then {
|
||||
_index = (_hash select 0) find _key;
|
||||
if(_index != -1) then {
|
||||
_val = true;
|
||||
};
|
||||
} else {
|
||||
ERROR("Input hash is not valid");
|
||||
};
|
||||
if(VALIDHASH(_hash)) then {
|
||||
_index = (_hash select 0) find _key;
|
||||
if(_index != -1) then {
|
||||
_val = true;
|
||||
};
|
||||
} else {
|
||||
ERROR("Input hash is not valid");
|
||||
};
|
||||
} catch {
|
||||
HANDLECATCH;
|
||||
HANDLECATCH;
|
||||
};
|
||||
_val
|
||||
|
@ -7,12 +7,12 @@ _hashList = _this select 0;
|
||||
ERRORDATA(1);
|
||||
_hashKeys = [];
|
||||
try {
|
||||
if(VALIDHASH(_hashList)) then {
|
||||
_hashKeys = (_hashList select 0);
|
||||
} else {
|
||||
ERROR("Input hashlist is not valid");
|
||||
};
|
||||
if(VALIDHASH(_hashList)) then {
|
||||
_hashKeys = (_hashList select 0);
|
||||
} else {
|
||||
ERROR("Input hashlist is not valid");
|
||||
};
|
||||
} catch {
|
||||
HANDLECATCH;
|
||||
HANDLECATCH;
|
||||
};
|
||||
[_hashKeys, []];
|
||||
|
@ -7,11 +7,11 @@ _hashList = _this select 0;
|
||||
_value = _this select 1;
|
||||
ERRORDATA(2);
|
||||
try {
|
||||
if(VALIDHASH(_hashList)) then {
|
||||
[_hashList, (count (_hashList select 1)), _value] call FUNC(hashListSet);
|
||||
} else {
|
||||
ERROR("Input hashlist in push not valid");
|
||||
};
|
||||
if(VALIDHASH(_hashList)) then {
|
||||
[_hashList, (count (_hashList select 1)), _value] call FUNC(hashListSet);
|
||||
} else {
|
||||
ERROR("Input hashlist in push not valid");
|
||||
};
|
||||
} catch {
|
||||
HANDLECATCH;
|
||||
HANDLECATCH;
|
||||
};
|
||||
|
@ -8,20 +8,20 @@ _index = _this select 1;
|
||||
ERRORDATA(2);
|
||||
_hash = nil;
|
||||
try {
|
||||
if(VALIDHASH(_hashList)) then {
|
||||
_keys = _hashList select 0;
|
||||
_hashes = _hashList select 1;
|
||||
if(_index < (count _hashes)) then {
|
||||
_values = _hashes select _index;
|
||||
if(VALIDHASH(_hashList)) then {
|
||||
_keys = _hashList select 0;
|
||||
_hashes = _hashList select 1;
|
||||
if(_index < (count _hashes)) then {
|
||||
_values = _hashes select _index;
|
||||
|
||||
_hash = [_keys, _values, 1];
|
||||
} else {
|
||||
ERROR("Index of hashlist is out of range");
|
||||
};
|
||||
} else {
|
||||
ERROR("Input hashlist is not valid");
|
||||
};
|
||||
_hash = [_keys, _values, 1];
|
||||
} else {
|
||||
ERROR("Index of hashlist is out of range");
|
||||
};
|
||||
} else {
|
||||
ERROR("Input hashlist is not valid");
|
||||
};
|
||||
} catch {
|
||||
HANDLECATCH;
|
||||
HANDLECATCH;
|
||||
};
|
||||
_hash;
|
||||
|
@ -8,17 +8,17 @@ _index = _this select 1;
|
||||
_value = _this select 2;
|
||||
ERRORDATA(3);
|
||||
try {
|
||||
if(VALIDHASH(_hashList)) then {
|
||||
if(VALIDHASH(_value)) then {
|
||||
_vals = _value select 1;
|
||||
if(VALIDHASH(_hashList)) then {
|
||||
if(VALIDHASH(_value)) then {
|
||||
_vals = _value select 1;
|
||||
|
||||
(_hashList select 1) set[_index, _vals];
|
||||
} else {
|
||||
ERROR("Set hash in hashlist is not valid");
|
||||
};
|
||||
} else {
|
||||
ERROR("Input hashlist is not valid");
|
||||
};
|
||||
(_hashList select 1) set[_index, _vals];
|
||||
} else {
|
||||
ERROR("Set hash in hashlist is not valid");
|
||||
};
|
||||
} else {
|
||||
ERROR("Input hashlist is not valid");
|
||||
};
|
||||
} catch {
|
||||
HANDLECATCH;
|
||||
HANDLECATCH;
|
||||
};
|
||||
|
@ -8,23 +8,23 @@ _key = _this select 1;
|
||||
ERRORDATA(2);
|
||||
_val = nil;
|
||||
try {
|
||||
if(VALIDHASH(_hash)) then {
|
||||
_index = (_hash select 0) find _key;
|
||||
if(_index != -1) then {
|
||||
(_hash select 1) set[_index, "ACREHASHREMOVEDONOTUSETHISVAL"];
|
||||
// is this hash is not part of a hash list?
|
||||
// if it is we need to leave the keys intact.
|
||||
if((count _hash) == 2) then {
|
||||
// if this is a standalone hash then we can clean it up
|
||||
(_hash select 0) set[_index, "ACREHASHREMOVEDONOTUSETHISVAL"];
|
||||
_hash set[0, ((_hash select 0) - ["ACREHASHREMOVEDONOTUSETHISVAL"])];
|
||||
_hash set[1, ((_hash select 1) - ["ACREHASHREMOVEDONOTUSETHISVAL"])];
|
||||
};
|
||||
};
|
||||
} else {
|
||||
ERROR("Input hash is not valid");
|
||||
};
|
||||
if(VALIDHASH(_hash)) then {
|
||||
_index = (_hash select 0) find _key;
|
||||
if(_index != -1) then {
|
||||
(_hash select 1) set[_index, "ACREHASHREMOVEDONOTUSETHISVAL"];
|
||||
// is this hash is not part of a hash list?
|
||||
// if it is we need to leave the keys intact.
|
||||
if((count _hash) == 2) then {
|
||||
// if this is a standalone hash then we can clean it up
|
||||
(_hash select 0) set[_index, "ACREHASHREMOVEDONOTUSETHISVAL"];
|
||||
_hash set[0, ((_hash select 0) - ["ACREHASHREMOVEDONOTUSETHISVAL"])];
|
||||
_hash set[1, ((_hash select 1) - ["ACREHASHREMOVEDONOTUSETHISVAL"])];
|
||||
};
|
||||
};
|
||||
} else {
|
||||
ERROR("Input hash is not valid");
|
||||
};
|
||||
} catch {
|
||||
HANDLECATCH;
|
||||
HANDLECATCH;
|
||||
};
|
||||
true
|
||||
|
@ -9,19 +9,19 @@ _key = _this select 1;
|
||||
_val = _this select 2;
|
||||
ERRORDATA(3);
|
||||
try {
|
||||
if(VALIDHASH(_hash)) then {
|
||||
_index = (_hash select 0) find _key;
|
||||
if(_index == -1) then {
|
||||
_index = (_hash select 0) find "ACREHASHREMOVEDONOTUSETHISVAL";
|
||||
if(_index == -1) then {
|
||||
_index = (count (_hash select 0));
|
||||
};
|
||||
(_hash select 0) set[_index, _key];
|
||||
};
|
||||
(_hash select 1) set[_index, _val];
|
||||
} else {
|
||||
ERROR("Input hash is not valid");
|
||||
};
|
||||
if(VALIDHASH(_hash)) then {
|
||||
_index = (_hash select 0) find _key;
|
||||
if(_index == -1) then {
|
||||
_index = (_hash select 0) find "ACREHASHREMOVEDONOTUSETHISVAL";
|
||||
if(_index == -1) then {
|
||||
_index = (count (_hash select 0));
|
||||
};
|
||||
(_hash select 0) set[_index, _key];
|
||||
};
|
||||
(_hash select 1) set[_index, _val];
|
||||
} else {
|
||||
ERROR("Input hash is not valid");
|
||||
};
|
||||
} catch {
|
||||
HANDLECATCH;
|
||||
HANDLECATCH;
|
||||
};
|
||||
|
@ -1,24 +0,0 @@
|
||||
/**
|
||||
* fn_isHC.sqf
|
||||
* @Descr: Check if current locality is a headless client
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: []
|
||||
* @Return: BOOL True if locality is headless client OR is not in multiplayer
|
||||
* @PublicAPI: true
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_return"];
|
||||
|
||||
if (!isMultiplayer) then {
|
||||
_return = true;
|
||||
} else {
|
||||
if (isServer && !isDedicated) then {
|
||||
_return = true;
|
||||
} else {
|
||||
_return = !(hasInterface || isDedicated);
|
||||
};
|
||||
};
|
||||
_return
|
@ -10,7 +10,7 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
#define GROUP_SWITCH_ID QUOTE(FUNC(loadPerson_F))
|
||||
#define GROUP_SWITCH_ID QUOTE(FUNC(loadPerson))
|
||||
|
||||
private ["_caller", "_unit","_vehicle", "_loadcar", "_loadhelicopter", "_loadtank"];
|
||||
_caller = [_this, 0, ObjNull,[ObjNull]] call BIS_fnc_Param;
|
||||
@ -34,9 +34,9 @@ if (_unit distance _loadcar <= 10) then {
|
||||
};
|
||||
};
|
||||
if (!isNull _vehicle) then {
|
||||
[_unit, true, GROUP_SWITCH_ID, side group _caller] call FUNC(switchToGroupSide_f);
|
||||
[_unit, true, GROUP_SWITCH_ID, side group _caller] call FUNC(switchToGroupSide);
|
||||
[_caller,objNull] call FUNC(carryObj);
|
||||
[_unit,objNull] call FUNC(carryObj);
|
||||
[[_unit, _vehicle,_caller], QUOTE(FUNC(loadPersonLocal_F)), _unit, false] call EFUNC(common,execRemoteFnc);
|
||||
[[_unit, _vehicle,_caller], QUOTE(FUNC(loadPersonLocal)), _unit, false] call EFUNC(common,execRemoteFnc);
|
||||
};
|
||||
_vehicle
|
@ -16,13 +16,13 @@ _vehicle = [_this, 1, ObjNull,[ObjNull]] call BIS_fnc_Param;
|
||||
_caller = [_this, 2, ObjNull,[ObjNull]] call BIS_fnc_Param;
|
||||
|
||||
if (!alive _unit) then {
|
||||
_unit = [_unit,_caller] call FUNC(makeCopyOfBody_F);
|
||||
_unit = [_unit,_caller] call FUNC(makeCopyOfBody);
|
||||
};
|
||||
|
||||
_unit moveInCargo _vehicle;
|
||||
_loaded = _vehicle getvariable [QGVAR(loaded_persons_F),[]];
|
||||
_loaded = _vehicle getvariable [QGVAR(loaded_persons),[]];
|
||||
_loaded pushback _unit;
|
||||
_vehicle setvariable [QGVAR(loaded_persons_F),_loaded,true];
|
||||
_vehicle setvariable [QGVAR(loaded_persons),_loaded,true];
|
||||
if (!([_unit] call FUNC(isAwake))) then {
|
||||
_handle = [_unit,_vehicle] spawn {
|
||||
private ["_unit","_vehicle"];
|
@ -18,12 +18,12 @@ if (_moveTo) then {
|
||||
_previousGroup = group _unit;
|
||||
_newGroup = createGroup (side _previousGroup);
|
||||
[_unit] joinSilent _newGroup;
|
||||
_unit setvariable [QGVAR(previousGroup_F),_previousGroup];
|
||||
_unit setvariable [QGVAR(previousGroup),_previousGroup];
|
||||
} else {
|
||||
_previousGroup = _unit getvariable QGVAR(previousGroup_F);
|
||||
_previousGroup = _unit getvariable QGVAR(previousGroup);
|
||||
if (!isnil "_previousGroup") then {
|
||||
_currentGroup = group _unit;
|
||||
_unit setvariable [QGVAR(previousGroup_F),nil];
|
||||
_unit setvariable [QGVAR(previousGroup),nil];
|
||||
[_unit] joinSilent _previousGroup;
|
||||
if (count units _currentGroup == 0) then {
|
||||
deleteGroup _currentGroup;
|
||||
|
@ -4,7 +4,7 @@
|
||||
terminate (missionNamespace getVariable [QGVAR(waitForAnimationHandle), scriptNull]);
|
||||
|
||||
GVAR(waitForAnimationHandle) = _this spawn {
|
||||
waitUntil {!([_this select 0] call FUNC(inTransitionAnim))};
|
||||
waitUntil {!([_this select 0] call FUNC(inTransitionAnim))};
|
||||
|
||||
_this call FUNC(doAnimation);
|
||||
_this call FUNC(doAnimation);
|
||||
};
|
||||
|
@ -17,17 +17,17 @@ _unit setvariable ["ACE_isDead",nil,true];
|
||||
_unit setvariable ["ACE_isUnconscious", nil, true];
|
||||
|
||||
if (isPlayer _unit) then {
|
||||
[true] call FUNC(setVolume_f);
|
||||
[false] call FUNC(disableKeyInput_f);
|
||||
if (["ace_medical"] call FUNC(isModLoader_f)) then {
|
||||
[true] call FUNC(setVolume);
|
||||
[false] call FUNC(disableKeyInput);
|
||||
if (["ace_medical"] call FUNC(isModLoader)) then {
|
||||
[false] call EFUNC(medical,effectBlackOut);
|
||||
};
|
||||
|
||||
if !(isnil QGVAR(DISABLE_USER_INPUT_COLLECTION_F)) then {
|
||||
if !(isnil QGVAR(DISABLE_USER_INPUT_COLLECTION)) then {
|
||||
// clear all disable user input
|
||||
{
|
||||
[_X, false] call FUNC(setDisableUserInputStatus);
|
||||
}foreach GVAR(DISABLE_USER_INPUT_COLLECTION_F);
|
||||
}foreach GVAR(DISABLE_USER_INPUT_COLLECTION);
|
||||
};
|
||||
};
|
||||
|
@ -1,15 +0,0 @@
|
||||
/**
|
||||
* fnc_revealObject_f.sqf
|
||||
* @Descr: N/A
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: []
|
||||
* @Return:
|
||||
* @PublicAPI: false
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (hasInterface) then {
|
||||
player reveal (_this select 0);
|
||||
};
|
@ -13,16 +13,16 @@ _id = _this select 0;
|
||||
_disable = _this select 1;
|
||||
|
||||
|
||||
if (isnil QGVAR(DISABLE_USER_INPUT_COLLECTION_F)) then {
|
||||
GVAR(DISABLE_USER_INPUT_COLLECTION_F) = [];
|
||||
if (isnil QGVAR(DISABLE_USER_INPUT_COLLECTION)) then {
|
||||
GVAR(DISABLE_USER_INPUT_COLLECTION) = [];
|
||||
};
|
||||
|
||||
if (_disable) then {
|
||||
GVAR(DISABLE_USER_INPUT_COLLECTION_F) pushback _id;
|
||||
GVAR(DISABLE_USER_INPUT_COLLECTION) pushback _id;
|
||||
[true] call FUNC(disableUserInput);
|
||||
} else {
|
||||
GVAR(DISABLE_USER_INPUT_COLLECTION_F) = GVAR(DISABLE_USER_INPUT_COLLECTION_F) - [_id];
|
||||
if (GVAR(DISABLE_USER_INPUT_COLLECTION_F) isEqualTo []) then {
|
||||
GVAR(DISABLE_USER_INPUT_COLLECTION) = GVAR(DISABLE_USER_INPUT_COLLECTION) - [_id];
|
||||
if (GVAR(DISABLE_USER_INPUT_COLLECTION) isEqualTo []) then {
|
||||
[false] call FUNC(disableUserInput);
|
||||
};
|
||||
};
|
@ -16,7 +16,7 @@ _switch = [_this, 1, false,[false]] call BIS_fnc_Param;
|
||||
_id = [_this, 2, "", [""]] call BIS_fnc_Param;
|
||||
_side = [_this, 3, side _unit,[west]] call BIS_fnc_Param;
|
||||
|
||||
_previousGroupsList = _unit getvariable [QGVAR(previousGroupSwitchTo_F),[]];
|
||||
_previousGroupsList = _unit getvariable [QGVAR(previousGroupSwitchTo),[]];
|
||||
if (_switch) then {
|
||||
// go forward
|
||||
_previousGroup = group _unit;
|
||||
@ -30,7 +30,7 @@ if (_switch) then {
|
||||
[_unit] joinSilent _newGroup;
|
||||
|
||||
_previousGroupsList pushback [_previousGroup, _originalSide, _id, true];
|
||||
_unit setvariable [QGVAR(previousGroupSwitchTo_F), _previousGroupsList, true];
|
||||
_unit setvariable [QGVAR(previousGroupSwitchTo), _previousGroupsList, true];
|
||||
} else {
|
||||
// go one back
|
||||
{
|
||||
@ -60,5 +60,5 @@ if (_switch) then {
|
||||
}foreach _previousGroupsList;
|
||||
_previousGroupsList = _previousGroupsList - [objNull];
|
||||
reverse _previousGroupsList; // we have to reverse again, to ensure the list is in the right order.
|
||||
_unit setvariable [QGVAR(previousGroupSwitchTo_F), _previousGroupsList, true];
|
||||
_unit setvariable [QGVAR(previousGroupSwitchTo), _previousGroupsList, true];
|
||||
};
|
@ -10,7 +10,7 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
#define GROUP_SWITCH_ID QUOTE(FUNC(loadPerson_F))
|
||||
#define GROUP_SWITCH_ID QUOTE(FUNC(loadPerson))
|
||||
|
||||
private ["_caller", "_unit","_vehicle", "_loaded"];
|
||||
_caller = [_this, 0, ObjNull,[ObjNull]] call BIS_fnc_Param;
|
||||
@ -27,11 +27,11 @@ if (!alive _unit) then {
|
||||
_unit action ["Eject", vehicle _unit];
|
||||
};
|
||||
|
||||
[_unit, false, GROUP_SWITCH_ID, side group _caller] call FUNC(switchToGroupSide_f);
|
||||
[_unit, false, GROUP_SWITCH_ID, side group _caller] call FUNC(switchToGroupSide);
|
||||
|
||||
_loaded = _vehicle getvariable [QGVAR(loaded_persons_F),[]];
|
||||
_loaded = _vehicle getvariable [QGVAR(loaded_persons),[]];
|
||||
_loaded = _loaded - [_unit];
|
||||
_vehicle setvariable [QGVAR(loaded_persons_F),_loaded,true];
|
||||
_vehicle setvariable [QGVAR(loaded_persons),_loaded,true];
|
||||
|
||||
if (!([_unit] call FUNC(isAwake))) then {
|
||||
_handle = [_unit,_vehicle] spawn {
|
@ -50,8 +50,8 @@ call FUNC(handleDisplayEffects);
|
||||
["onUnconscious", FUNC(onUnconscious)] call ace_common_fnc_addEventHandler;
|
||||
["carryObjectDropped", FUNC(onCarryObjectDropped)] call ace_common_fnc_addEventHandler;
|
||||
|
||||
if (isNil QGVAR(ENABLE_REVIVE_F)) then {
|
||||
GVAR(ENABLE_REVIVE_F) = 0;
|
||||
if (isNil QGVAR(ENABLE_REVIVE)) then {
|
||||
GVAR(ENABLE_REVIVE) = 0;
|
||||
};
|
||||
|
||||
|
||||
|
@ -141,8 +141,8 @@ PREP(setUnconsciousState);
|
||||
PREP(isUnconscious);
|
||||
PREP(getUnconsciousCondition);
|
||||
PREP(registerUnconsciousCondition);
|
||||
PREP(cleanUpCopyOfBody_F);
|
||||
PREP(makeCopyOfBody_F);
|
||||
PREP(cleanUpCopyOfBody);
|
||||
PREP(makeCopyOfBody);
|
||||
PREP(canGoUnconsciousState);
|
||||
PREP(setDead);
|
||||
PREP(moduleBasicRevive);
|
||||
|
@ -42,7 +42,7 @@ if (!alive _unit) exitwith {
|
||||
[_caller, false] call FUNC(treatmentMutex);
|
||||
[{
|
||||
_this call FUNC(actionCarryUnit);
|
||||
}, [_caller, ([_unit,_caller] call FUNC(makeCopyOfBody_F)), _killOnDrop], 0.25, 0.25] call EFUNC(common,waitAndExecute);
|
||||
}, [_caller, ([_unit,_caller] call FUNC(makeCopyOfBody)), _killOnDrop], 0.25, 0.25] call EFUNC(common,waitAndExecute);
|
||||
};
|
||||
|
||||
if !([_caller,_unit] call EFUNC(common,carryObj)) exitwith {
|
||||
|
@ -40,7 +40,7 @@ if (!alive _unit) exitwith {
|
||||
[_caller, false] call FUNC(treatmentMutex);
|
||||
[{
|
||||
_this call FUNC(actionDragUnit);
|
||||
}, [_caller, ([_unit,_caller] call FUNC(makeCopyOfBody_F)), _killOnDrop], 0.25, 0.25] call EFUNC(common,waitAndExecute);
|
||||
}, [_caller, ([_unit,_caller] call FUNC(makeCopyOfBody)), _killOnDrop], 0.25, 0.25] call EFUNC(common,waitAndExecute);
|
||||
};
|
||||
|
||||
if (primaryWeapon _caller == "") then {
|
||||
|
@ -22,7 +22,7 @@ if ([_unit] call cse_fnc_isAwake) exitwith {
|
||||
[_caller,objNull] call cse_fnc_carryObj;
|
||||
[_unit,objNull] call cse_fnc_carryObj;
|
||||
|
||||
_vehicle = [_caller, _unit] call EFUNC(common,loadPerson_F);
|
||||
_vehicle = [_caller, _unit] call EFUNC(common,loadPerson);
|
||||
if (!isNull _vehicle) then {
|
||||
if (!isnil QGVAR(DROP_ADDACTION)) then {
|
||||
_caller removeAction GVAR(DROP_ADDACTION);
|
||||
|
@ -36,7 +36,7 @@ _bodyBagCreated setvariable [QEGVAR(common,nameOfBody), _nameOfUnit, true];
|
||||
// reset the position to ensure it is on the correct one.
|
||||
_bodyBagCreated setPos _onPosition;
|
||||
|
||||
[[_bodyBagCreated], QEFUNC(common,revealObject_f), true] call BIS_fnc_MP;
|
||||
[[_bodyBagCreated], QEFUNC(common,revealObject), true] call BIS_fnc_MP;
|
||||
|
||||
_bodyBagCreated setvariable [QEGVAR(logistics,enableDrag), true, true];
|
||||
|
||||
|
@ -19,7 +19,7 @@ _drag = [_this, 2, false, [false]] call BIS_fnc_Param;
|
||||
if (vehicle _unit == _unit) exitwith {};
|
||||
if (([_unit] call cse_fnc_isAwake)) exitwith {};
|
||||
|
||||
if ([_caller, _unit] call EFUNC(common,unloadPerson_F)) then {
|
||||
if ([_caller, _unit] call EFUNC(common,unloadPerson)) then {
|
||||
if (_drag) then {
|
||||
if ((vehicle _caller) == _caller) then {
|
||||
[[_caller,_unit], QUOTE(FUNC(actionDragUnit)), _caller, false] call BIS_fnc_MP;
|
||||
|
@ -13,12 +13,12 @@
|
||||
private ["_unit", "_copy"];
|
||||
_unit = _this select 0;
|
||||
|
||||
_copy = _unit getvariable QGVAR(copyOfBody_f);
|
||||
_copy = _unit getvariable QGVAR(copyOfBody);
|
||||
if (isnil "_copy") exitwith {false};
|
||||
[format["Cleaning up a copy of Body: %1 %2", _unit, _copy]] call EFUNC(common,debug);
|
||||
// lets clean it up
|
||||
_unit setvariable [QGVAR(originalCopy_f), nil, true];
|
||||
_unit setvariable [QGVAR(copyOfBody_f), nil, true];
|
||||
_unit setvariable [QGVAR(originalCopy), nil, true];
|
||||
_unit setvariable [QGVAR(copyOfBody), nil, true];
|
||||
if (!isNull _copy) then {
|
||||
deleteVehicle _copy;
|
||||
};
|
@ -38,7 +38,7 @@ if (_bloodVolume < 100.0) then {
|
||||
_bloodVolumeChange = _bloodVolumeChange + BLOOD_CHANGE_PER_SECOND;
|
||||
_ivVolume = (_unit getvariable [QGVAR(salineIVVolume), 0]) + IV_CHANGE_PER_SECOND;
|
||||
_unit setvariable [QGVAR(salineIVVolume),_ivVolume];
|
||||
if ([QEGVAR(fieldRations,module)] call EFUNC(common,isModuleEnabled_F)) then {
|
||||
if ([QEGVAR(fieldRations,module)] call EFUNC(common,isModuleEnabled)) then {
|
||||
if ([_unit] call EFUNC(fieldRations,canDrink)) then {
|
||||
_unit setvariable [QEGVAR(fieldRations,drinkStatus), (_unit getvariable [QEGVAR(fieldRations,drinkStatus), 100]) + 0.2];
|
||||
};
|
||||
|
@ -13,8 +13,8 @@
|
||||
private ["_unit","_return"];
|
||||
_unit = _this select 0;
|
||||
|
||||
if (isnil QGVAR(unconsciousConditions_F)) then {
|
||||
GVAR(unconsciousConditions_F) = [];
|
||||
if (isnil QGVAR(unconsciousConditions)) then {
|
||||
GVAR(unconsciousConditions) = [];
|
||||
};
|
||||
|
||||
_return = false;
|
||||
@ -25,5 +25,5 @@ _return = false;
|
||||
};
|
||||
};
|
||||
if (_return) exitwith{};
|
||||
}foreach GVAR(unconsciousConditions_F);
|
||||
}foreach GVAR(unconsciousConditions);
|
||||
_return
|
@ -26,7 +26,7 @@ if ((isNull ([_caller] call EFUNC(common,getCarriedObj))) || !([_caller] call EF
|
||||
_caller removeWeapon "ACE_FakePrimaryWeapon";
|
||||
};
|
||||
|
||||
[_target, false] call EFUNC(common,disableAI_f);
|
||||
[_target, false] call EFUNC(common,disableAI);
|
||||
_caller setvariable[QGVAR(onStartMovingUnitParams), nil];
|
||||
|
||||
// handle the drag & carry administration
|
||||
|
@ -56,7 +56,7 @@ if (alive _unit) exitwith {
|
||||
_unit setDamage 0;
|
||||
|
||||
// Resetting potential revive state
|
||||
[_unit,QEGVAR(common,ENABLE_REVIVE_SETDEAD_F), 0] call EFUNC(common,setDefinedVariable);
|
||||
[_unit,QEGVAR(common,ENABLE_REVIVE_SETDEAD), 0] call EFUNC(common,setDefinedVariable);
|
||||
[_unit,QEGVAR(common,ENABLE_REVIVE_COUNTER), 0] call EFUNC(common,setDefinedVariable);
|
||||
|
||||
|
||||
|
@ -93,7 +93,7 @@ if ((missionNamespace getvariable[QGVAR(setting_AdvancedLevel), 0]) > 0) exitwit
|
||||
|
||||
// Check vitals for medical status
|
||||
// TODO check for in revive state instead of variable
|
||||
if ((_unit getvariable[QEGVAR(common,ENABLE_REVIVE_SETDEAD_F),0]) == 0) then {
|
||||
if ((_unit getvariable[QEGVAR(common,ENABLE_REVIVE_SETDEAD),0]) == 0) then {
|
||||
_bloodPressureL = _bloodPressure select 0;
|
||||
_bloodPressureH = _bloodPressure select 1;
|
||||
|
||||
|
@ -15,10 +15,10 @@ _logic = _this select 0;
|
||||
|
||||
GVAR(Module) = true;
|
||||
|
||||
[_logic, QGVAR(ENABLE_REVIVE_F), "enableFor" ] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(REVIVE_TIMER_MAX_F), "timer" ] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(REVIVE_NUMBER_MAX_F), "amountOf" ] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(ENABLE_REVIVE), "enableFor" ] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(REVIVE_TIMER_MAX), "timer" ] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(REVIVE_NUMBER_MAX), "amountOf" ] call EFUNC(common,readSettingFromModule);
|
||||
|
||||
[
|
||||
{(((_this select 0) getvariable[QGVAR(ENABLE_REVIVE_SETDEAD_F),0]) > 0)}
|
||||
{(((_this select 0) getvariable[QGVAR(ENABLE_REVIVE_SETDEAD),0]) > 0)}
|
||||
] call FUNC(registerUnconsciousCondition);
|
||||
|
@ -6,7 +6,7 @@ if (!local _unit) exitwith {};
|
||||
[_unit, QGVAR(amountOfPain),0,true] call EFUNC(common,setDefinedVariable);
|
||||
[_unit, QGVAR(heartRate),0,true] call EFUNC(common,setDefinedVariable);
|
||||
[_unit, QGVAR(bloodPressure), [0,0],true] call EFUNC(common,setDefinedVariable);
|
||||
if (_unit getvariable[QEGVAR(common,unconscious_non_captive_f),false]) then {
|
||||
if (_unit getvariable[QEGVAR(common,unconscious_non_captive),false]) then {
|
||||
_unit setCaptive false;
|
||||
_unit setvariable[QEGVAR(common,unconscious_non_captive_f),nil];
|
||||
_unit setvariable[QEGVAR(common,unconscious_non_captive),nil];
|
||||
};
|
@ -20,6 +20,6 @@ _dragging = _this select 3;
|
||||
|
||||
_caller setvariable[QGVAR(onStartMovingUnitParams), [_caller, _target, _killOnDrop, _dragging]];
|
||||
|
||||
[_target, true] call EFUNC(common,disableAI_f);
|
||||
[_target, true] call EFUNC(common,disableAI);
|
||||
|
||||
nil;
|
@ -10,13 +10,13 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (isnil QGVAR(unconsciousConditions_F)) then {
|
||||
GVAR(unconsciousConditions_F) = [];
|
||||
if (isnil QGVAR(unconsciousConditions)) then {
|
||||
GVAR(unconsciousConditions) = [];
|
||||
};
|
||||
if (typeName _this == typeName []) then {
|
||||
{
|
||||
if (typeName _x == typeName {}) then {
|
||||
GVAR(unconsciousConditions_F) pushback _x;
|
||||
GVAR(unconsciousConditions) pushback _x;
|
||||
};
|
||||
}foreach _this;
|
||||
};
|
@ -24,11 +24,11 @@ if (!local _unit) exitwith {
|
||||
[[_unit, _force], QUOTE(FUNC(setDead)), _unit, false] call BIS_fnc_MP;
|
||||
};
|
||||
|
||||
if (isnil QGVAR(ENABLE_REVIVE_F)) then {
|
||||
GVAR(ENABLE_REVIVE_F) = 0;
|
||||
if (isnil QGVAR(ENABLE_REVIVE)) then {
|
||||
GVAR(ENABLE_REVIVE) = 0;
|
||||
};
|
||||
|
||||
if (((GVAR(ENABLE_REVIVE_F) == 1 && isPlayer _unit) || (GVAR(ENABLE_REVIVE_F) == 2)) && !_force && (alive (vehicle _unit))) exitwith {
|
||||
if (((GVAR(ENABLE_REVIVE) == 1 && isPlayer _unit) || (GVAR(ENABLE_REVIVE) == 2)) && !_force && (alive (vehicle _unit))) exitwith {
|
||||
// enter revive state
|
||||
_unit setvariable ["ACE_inReviveState", true, true];
|
||||
|
||||
@ -36,11 +36,11 @@ if (((GVAR(ENABLE_REVIVE_F) == 1 && isPlayer _unit) || (GVAR(ENABLE_REVIVE_F) ==
|
||||
[_unit] call FUNC(setUnconsciousState);
|
||||
|
||||
// setting the revive default values
|
||||
if (isnil QGVAR(REVIVE_TIMER_F)) then {
|
||||
GVAR(REVIVE_TIMER_F) = 10;
|
||||
if (isnil QGVAR(REVIVE_TIMER)) then {
|
||||
GVAR(REVIVE_TIMER) = 10;
|
||||
};
|
||||
if (isnil QGVAR(REVIVE_NUMBER_MAX_F)) then {
|
||||
GVAR(REVIVE_NUMBER_MAX_F) = -1;
|
||||
if (isnil QGVAR(REVIVE_NUMBER_MAX)) then {
|
||||
GVAR(REVIVE_NUMBER_MAX) = -1;
|
||||
};
|
||||
|
||||
[{
|
||||
@ -58,7 +58,7 @@ if (((GVAR(ENABLE_REVIVE_F) == 1 && isPlayer _unit) || (GVAR(ENABLE_REVIVE_F) ==
|
||||
};
|
||||
|
||||
_counter = _unit getvariable ["ACE_reviveCounterValue", 0];
|
||||
if (_counter >= GVAR(REVIVE_TIMER_F)) exitwith{
|
||||
if (_counter >= GVAR(REVIVE_TIMER)) exitwith{
|
||||
if (isPlayer _unit) then {
|
||||
titleText ["You died..","PLAIN DOWN"];
|
||||
};
|
||||
|
@ -41,17 +41,17 @@ _originalPos = unitPos _unit;
|
||||
|
||||
// Handle the on screen effects
|
||||
if (isPlayer _unit) then {
|
||||
[] call EFUNC(common,closeAllDialogs_f);
|
||||
[] call EFUNC(common,closeAllDialogs);
|
||||
[true] call FUNC(effectBlackOut);
|
||||
["unconscious", true] call EFUNC(common,setDisableUserInputStatus);
|
||||
[false] call EFUNC(common,setVolume_f);
|
||||
[false] call EFUNC(common,setVolume);
|
||||
} else {
|
||||
_unit setUnitPos "DOWN";
|
||||
[_unit, true] call EFUNC(common,disableAI_F);
|
||||
[_unit, true] call EFUNC(common,disableAI);
|
||||
};
|
||||
|
||||
// So the AI does not get stuck, we are moving the unit to a temp group on its own.
|
||||
[_unit, true, "ACE_isUnconscious", side group _unit] call EFUNC(common,switchToGroupSide_f);
|
||||
[_unit, true, "ACE_isUnconscious", side group _unit] call EFUNC(common,switchToGroupSide);
|
||||
|
||||
_captiveSwitch = [_unit, true] call EFUNC(common,setCaptiveSwitch);
|
||||
[_unit, [_unit] call EFUNC(common,getDeathAnim), 1, true] call EFUNC(common,doAnimation);
|
||||
@ -110,15 +110,15 @@ _minWaitingTime = (round(random(10)+5));
|
||||
_unit setUnconscious false;
|
||||
|
||||
// Swhich the unit back to its original group
|
||||
[_unit, false, "ACE_isUnconscious", side group _unit] call EFUNC(common,switchToGroupSide_f);
|
||||
[_unit, false, "ACE_isUnconscious", side group _unit] call EFUNC(common,switchToGroupSide);
|
||||
|
||||
// Reset any visual and audio effects for players, or enable everything again for AI.
|
||||
if (isPlayer _unit) then {
|
||||
[false] call FUNC(effectBlackOut);
|
||||
[true] call EFUNC(common,setVolume_f);
|
||||
[true] call EFUNC(common,setVolume);
|
||||
["unconscious", false] call EFUNC(common,setDisableUserInputStatus);
|
||||
} else {
|
||||
[_unit, false] call EFUNC(common,disableAI_F);
|
||||
[_unit, false] call EFUNC(common,disableAI);
|
||||
_unit setUnitPos _originalPos; // This is not position but stance (DOWN, MIDDLE, UP)
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user