mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
fix more setVariable and getVariable capitalization
This commit is contained in:
parent
5a1aae6028
commit
411a8d58f3
@ -51,7 +51,7 @@ PREP(fixCollision);
|
||||
PREP(fixFloating);
|
||||
PREP(fixLoweredRifleAnimation);
|
||||
PREP(fixPosition);
|
||||
PREP(getAllDefinedSetVariables);
|
||||
PREP(getAllDefinedsetVariables);
|
||||
PREP(getAllGear);
|
||||
PREP(getCaptivityStatus);
|
||||
PREP(getDeathAnim);
|
||||
|
@ -48,10 +48,10 @@ _ctrlHint ctrlSetBackgroundColor GVAR(displayTextColor);
|
||||
_ctrlHint ctrlSetTextColor GVAR(displayTextFontColor);
|
||||
/*
|
||||
// This does not function at the moment. Has been disabled until it fixed.
|
||||
_xPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_X", ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40))];
|
||||
_yPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_Y", safeZoneY + 0.175 * safezoneH];
|
||||
_wPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_W", (10 *(((safezoneW / safezoneH) min 1.2) / 40))];
|
||||
_hPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_H", (2 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))];
|
||||
_xPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_X", ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40))];
|
||||
_yPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_Y", safeZoneY + 0.175 * safezoneH];
|
||||
_wPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_W", (10 *(((safezoneW / safezoneH) min 1.2) / 40))];
|
||||
_hPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_H", (2 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))];
|
||||
*/
|
||||
|
||||
_xPos = ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40));
|
||||
|
@ -39,6 +39,6 @@ if (isPlayer _unit) then {
|
||||
_unit setVariable [_x select 0, nil, _x select 3];
|
||||
};
|
||||
false
|
||||
} count ([_unit] call FUNC(getAllDefinedSetVariables));
|
||||
} count ([_unit] call FUNC(getAllDefinedsetVariables));
|
||||
|
||||
_unit setVariable ["ACE_forceWalkStatusNumber", 0, true];
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Setvariable value
|
||||
* setVariable value
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
|
@ -44,9 +44,9 @@ _list = [];
|
||||
if (_adjustedList) then {
|
||||
_clackerList = _clackerList - ["X"];
|
||||
if (count _clackerList == 0) then {
|
||||
_unit SetVariable [QGVAR(Clackers), nil, true];
|
||||
_unit setVariable [QGVAR(Clackers), nil, true];
|
||||
} else {
|
||||
_unit SetVariable [QGVAR(Clackers), _clackerList, true];
|
||||
_unit setVariable [QGVAR(Clackers), _clackerList, true];
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -29,7 +29,7 @@ _config = ConfigFile >> "CfgWeapons" >> _item;
|
||||
if (isClass _config && {getNumber(_config >> "ACE_Detonator") == 1}) then {
|
||||
private ["_clackerItems"];
|
||||
_clackerItems = _giver getVariable [QGVAR(Clackers), []];
|
||||
_receiver SetVariable [QGVAR(Clackers), (_receiver getVariable [QGVAR(Clackers), []]) + _clackerItems, true];
|
||||
_receiver setVariable [QGVAR(Clackers), (_receiver getVariable [QGVAR(Clackers), []]) + _clackerItems, true];
|
||||
|
||||
_detonators = [_giver] call FUNC(getDetonators);
|
||||
if (count _detonators == 0) then {
|
||||
|
@ -37,7 +37,7 @@ _medicRequired = if (isNumber (_config >> "requiredMedic")) then {
|
||||
} else {
|
||||
// Check for required class
|
||||
if (isText (_config >> "requiredMedic")) exitwith {
|
||||
missionNamespace getvariable [(getText (_config >> "requiredMedic")), 0]
|
||||
missionNamespace getVariable [(getText (_config >> "requiredMedic")), 0]
|
||||
};
|
||||
0;
|
||||
};
|
||||
@ -55,7 +55,7 @@ if (getText (_config >> "condition") != "") then {
|
||||
if (isnil _condition) then {
|
||||
_condition = compile _condition;
|
||||
} else {
|
||||
_condition = missionNamespace getvariable _condition;
|
||||
_condition = missionNamespace getVariable _condition;
|
||||
};
|
||||
if (_condition isEqualType false) then {
|
||||
_return = _condition;
|
||||
@ -66,7 +66,7 @@ if (getText (_config >> "condition") != "") then {
|
||||
if (!_return) exitwith { false };
|
||||
|
||||
_patientStateCondition = if (isText(_config >> "patientStateCondition")) then {
|
||||
missionNamespace getvariable [getText(_config >> "patientStateCondition"), 0]
|
||||
missionNamespace getVariable [getText(_config >> "patientStateCondition"), 0]
|
||||
} else {
|
||||
getNumber(_config >> "patientStateCondition")
|
||||
};
|
||||
@ -85,7 +85,7 @@ _medVeh = {([_caller] call FUNC(isInMedicalVehicle)) || ([_target] call FUNC(isI
|
||||
if (_x == "MedicalVehicle" && _medVeh) exitwith {_return = true;};
|
||||
if !(isnil _x) exitwith {
|
||||
private "_val";
|
||||
_val = missionNamespace getvariable _x;
|
||||
_val = missionNamespace getVariable _x;
|
||||
if (_val isEqualType 0) then {
|
||||
_return = switch (_val) do {
|
||||
case 0: {true}; //AdvancedMedicalSettings_anywhere
|
||||
|
@ -69,7 +69,7 @@ _createdLitter = [];
|
||||
if (isnil _litterCondition) then {
|
||||
_litterCondition = if (_litterCondition != "") then {compile _litterCondition} else {{true}};
|
||||
} else {
|
||||
_litterCondition = missionNamespace getvariable _litterCondition;
|
||||
_litterCondition = missionNamespace getVariable _litterCondition;
|
||||
if (!(_litterCondition isEqualType {})) then {_litterCondition = {false}};
|
||||
};
|
||||
if !([_caller, _target, _selectionName, _className, _usersOfItems, _previousDamage] call _litterCondition) exitwith {};
|
||||
|
@ -46,7 +46,7 @@ if (_show) then {
|
||||
};
|
||||
|
||||
disableSerialization;
|
||||
_display = uiNamespace getvariable QGVAR(DisplayInformation);
|
||||
_display = uiNamespace getVariable QGVAR(DisplayInformation);
|
||||
if (isnil "_display") exitwith {
|
||||
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
@ -59,26 +59,26 @@ if (_show) then {
|
||||
_genericMessages pushback [localize _partText, [1, 1, 1, 1]];
|
||||
};
|
||||
|
||||
if (_target getvariable[QGVAR(isBleeding), false]) then {
|
||||
if (_target getVariable[QGVAR(isBleeding), false]) then {
|
||||
_genericMessages pushback [localize LSTRING(Status_Bleeding), [1, 0.1, 0.1, 1]];
|
||||
};
|
||||
if (_target getvariable[QGVAR(hasLostBlood), 0] > 1) then {
|
||||
if (_target getVariable[QGVAR(hasLostBlood), 0] > 1) then {
|
||||
_genericMessages pushback [localize LSTRING(Status_Lost_Blood), [1, 0.1, 0.1, 1]];
|
||||
};
|
||||
|
||||
if (((_target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]]) select _selectionN) > 0) then {
|
||||
if (((_target getVariable [QGVAR(tourniquets), [0,0,0,0,0,0]]) select _selectionN) > 0) then {
|
||||
_genericMessages pushback [localize LSTRING(Status_Tourniquet_Applied), [0.77, 0.51, 0.08, 1]];
|
||||
};
|
||||
if (_target getvariable[QGVAR(hasPain), false]) then {
|
||||
if (_target getVariable[QGVAR(hasPain), false]) then {
|
||||
_genericMessages pushback [localize LSTRING(Status_Pain), [1, 1, 1, 1]];
|
||||
};
|
||||
|
||||
_totalIvVolume = 0;
|
||||
{
|
||||
private "_value";
|
||||
_value = _target getvariable _x;
|
||||
_value = _target getVariable _x;
|
||||
if !(isnil "_value") then {
|
||||
_totalIvVolume = _totalIvVolume + (_target getvariable [_x, 0]);
|
||||
_totalIvVolume = _totalIvVolume + (_target getVariable [_x, 0]);
|
||||
};
|
||||
} foreach GVAR(IVBags);
|
||||
if (_totalIvVolume >= 1) then {
|
||||
@ -88,7 +88,7 @@ if (_show) then {
|
||||
_damaged = [false, false, false, false, false, false];
|
||||
_selectionBloodLoss = [0,0,0,0,0,0];
|
||||
if (GVAR(level) >= 2 && {([_target] call FUNC(hasMedicalEnabled))}) then {
|
||||
_openWounds = _target getvariable [QGVAR(openWounds), []];
|
||||
_openWounds = _target getVariable [QGVAR(openWounds), []];
|
||||
private "_amountOf";
|
||||
{
|
||||
_x params ["", "_x1", "_selectionX", "_amountOf", "_x4"];
|
||||
@ -110,7 +110,7 @@ if (_show) then {
|
||||
};
|
||||
} foreach _openWounds;
|
||||
|
||||
_bandagedwounds = _target getvariable [QGVAR(bandagedWounds), []];
|
||||
_bandagedwounds = _target getVariable [QGVAR(bandagedWounds), []];
|
||||
{
|
||||
_x params ["", "", "_selectionX", "_amountOf", "_x4"];
|
||||
// Find how much this bodypart is bleeding
|
||||
@ -200,7 +200,7 @@ if (_show) then {
|
||||
lbClear _logCtrl;
|
||||
|
||||
private ["_logs", "_message", "_moment", "_arguments", "_lbCtrl"];
|
||||
_logs = _target getvariable [QGVAR(logFile_Activity), []];
|
||||
_logs = _target getVariable [QGVAR(logFile_Activity), []];
|
||||
{
|
||||
// [_message,_moment,_type, _arguments]
|
||||
_x params ["_message", "_moment", "_type", "_arguments"];
|
||||
|
@ -56,7 +56,7 @@ if (isClass (_config >> _className)) then {
|
||||
};
|
||||
TRACE_5("configs",_bandage,_className,_reopeningChance,_reopeningMinDelay,_reopeningMaxDelay);
|
||||
|
||||
_bandagedWounds = _target getvariable [QGVAR(bandagedWounds), []];
|
||||
_bandagedWounds = _target getVariable [QGVAR(bandagedWounds), []];
|
||||
_injuryType = _injury select 1;
|
||||
_exist = false;
|
||||
_bandagedInjury = [];
|
||||
@ -77,7 +77,7 @@ if !(_exist) then {
|
||||
_bandagedWounds pushback _bandagedInjury;
|
||||
};
|
||||
|
||||
_target setvariable [QGVAR(bandagedWounds), _bandagedWounds, true];
|
||||
_target setVariable [QGVAR(bandagedWounds), _bandagedWounds, true];
|
||||
|
||||
TRACE_1("",_reopeningChance);
|
||||
// Check if we are ever going to reopen this
|
||||
@ -89,14 +89,14 @@ if (random(1) <= _reopeningChance) then {
|
||||
params ["_target", "_impact", "_part", "_injuryIndex", "_injury"];
|
||||
|
||||
//if (alive _target) then {
|
||||
_openWounds = _target getvariable [QGVAR(openWounds), []];
|
||||
_openWounds = _target getVariable [QGVAR(openWounds), []];
|
||||
if ((count _openWounds)-1 < _injuryIndex) exitwith {};
|
||||
_selectedInjury = _openWounds select _injuryIndex;
|
||||
if (_selectedInjury select 1 == _injury select 1 && (_selectedInjury select 2) == (_injury select 2)) then { // matching the IDs
|
||||
_selectedInjury set [3, (_selectedInjury select 3) + _impact];
|
||||
_openWounds set [_injuryIndex, _selectedInjury];
|
||||
|
||||
_bandagedWounds = _target getvariable [QGVAR(bandagedWounds), []];
|
||||
_bandagedWounds = _target getVariable [QGVAR(bandagedWounds), []];
|
||||
_exist = false;
|
||||
_injuryId = _injury select 1;
|
||||
{
|
||||
@ -110,8 +110,8 @@ if (random(1) <= _reopeningChance) then {
|
||||
|
||||
if (_exist) then {
|
||||
TRACE_2("Reopening Wound",_bandagedWounds,_openWounds);
|
||||
_target setvariable [QGVAR(bandagedWounds), _bandagedWounds, true];
|
||||
_target setvariable [QGVAR(openWounds), _openWounds, true];
|
||||
_target setVariable [QGVAR(bandagedWounds), _bandagedWounds, true];
|
||||
_target setVariable [QGVAR(openWounds), _openWounds, true];
|
||||
};
|
||||
};
|
||||
// Otherwise something went wrong, we we don't reopen them..
|
||||
|
@ -111,7 +111,7 @@ if (_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)]) exitW
|
||||
};
|
||||
|
||||
if (_damageReturn >= 0.9 && {_selection in ["", "head", "body"]}) exitWith {
|
||||
if (_unit getvariable ["ACE_isUnconscious", false]) exitwith {
|
||||
if (_unit getVariable ["ACE_isUnconscious", false]) exitwith {
|
||||
[_unit, false, true] call FUNC(setDead);
|
||||
0.89;
|
||||
};
|
||||
|
@ -16,7 +16,7 @@ private ["_damageBodyParts", "_cache_params", "_cache_damages"];
|
||||
params ["_target"];
|
||||
TRACE_1("ACE_DEBUG: HandleDamage_BASIC Called",_target);
|
||||
|
||||
_damageBodyParts = _target getvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]];
|
||||
_damageBodyParts = _target getVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]];
|
||||
_cache_params = _target getVariable [QGVAR(cachedHandleDamageParams), []];
|
||||
_cache_damages = _target getVariable QGVAR(cachedDamages);
|
||||
|
||||
@ -32,9 +32,9 @@ TRACE_4("ACE_DEBUG: HandleDamage BASIC",_unit, _damageBodyParts,_cache_params,_c
|
||||
private ["_newDamage", "_pain"];
|
||||
_newDamage = (_cache_damages select _foreachIndex);
|
||||
_damageBodyParts set [_part, (_damageBodyParts select _part) + _newDamage];
|
||||
_unit setvariable [QGVAR(bodyPartStatus), _damageBodyParts];
|
||||
_unit setVariable [QGVAR(bodyPartStatus), _damageBodyParts];
|
||||
|
||||
if (alive _unit && {!(_unit getvariable ["ACE_isUnconscious", false])}) then {
|
||||
if (alive _unit && {!(_unit getVariable ["ACE_isUnconscious", false])}) then {
|
||||
// If it reaches this, we can assume that the hit did not kill this unit, as this function is called 3 frames after the damage has been passed.
|
||||
if ([_unit, _part, if (_part > 1) then {_newDamage * 1.3} else {_newDamage * 2}] call FUNC(determineIfFatal)) then {
|
||||
[_unit, true, 0.5+random(10)] call FUNC(setUnconscious);
|
||||
@ -47,8 +47,8 @@ TRACE_4("ACE_DEBUG: HandleDamage BASIC",_unit, _damageBodyParts,_cache_params,_c
|
||||
}foreach _cache_params;
|
||||
|
||||
// We broadcast the value across the net here, in order to avoid broadcasting it multiple times earlier in the above code block
|
||||
_target setvariable [QGVAR(bodyPartStatus), _damageBodyParts, true];
|
||||
TRACE_2("ACE_DEBUG: HandleDamage BASIC Broadcast value here",_unit, _target getvariable QGVAR(bodyPartStatus));
|
||||
_target setVariable [QGVAR(bodyPartStatus), _damageBodyParts, true];
|
||||
TRACE_2("ACE_DEBUG: HandleDamage BASIC Broadcast value here",_unit, _target getVariable QGVAR(bodyPartStatus));
|
||||
|
||||
EXPLODE_6_PVT(_damageBodyParts,_headDamage,_torsoDamage,_handsDamageR,_handsDamageL,_legsDamageR,_legsDamageL);
|
||||
_target setHitPointDamage ["hitHead", _headDamage min 0.95];
|
||||
|
@ -26,9 +26,9 @@ if (!local _unit) exitwith {
|
||||
|
||||
_reviveVal = _unit getVariable [QGVAR(enableRevive), GVAR(enableRevive)];
|
||||
if (((_reviveVal == 1 && {[_unit] call EFUNC(common,isPlayer)} || _reviveVal == 2)) && !_force) exitwith {
|
||||
if (_unit getvariable [QGVAR(inReviveState), false]) exitwith {
|
||||
if (_unit getVariable [QGVAR(inReviveState), false]) exitwith {
|
||||
if (GVAR(amountOfReviveLives) > 0) then {
|
||||
_lifesLeft = _unit getvariable[QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives)];
|
||||
_lifesLeft = _unit getVariable[QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives)];
|
||||
if (_lifesLeft == 0) then {
|
||||
[_unit, true] call FUNC(setDead);
|
||||
};
|
||||
@ -37,45 +37,45 @@ if (((_reviveVal == 1 && {[_unit] call EFUNC(common,isPlayer)} || _reviveVal ==
|
||||
false;
|
||||
};
|
||||
|
||||
_unit setvariable [QGVAR(inReviveState), true, true];
|
||||
_unit setvariable [QGVAR(reviveStartTime), ACE_time];
|
||||
_unit setVariable [QGVAR(inReviveState), true, true];
|
||||
_unit setVariable [QGVAR(reviveStartTime), ACE_time];
|
||||
[_unit, true] call FUNC(setUnconscious);
|
||||
|
||||
[{
|
||||
private "_startTime";
|
||||
params ["_args", "_idPFH"];
|
||||
_args params ["_unit"];
|
||||
_startTime = _unit getvariable [QGVAR(reviveStartTime), 0];
|
||||
_startTime = _unit getVariable [QGVAR(reviveStartTime), 0];
|
||||
|
||||
if (GVAR(maxReviveTime) > 0 && {ACE_time - _startTime > GVAR(maxReviveTime)}) exitwith {
|
||||
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
||||
_unit setvariable [QGVAR(inReviveState), nil, true];
|
||||
_unit setvariable [QGVAR(reviveStartTime), nil];
|
||||
_unit setVariable [QGVAR(inReviveState), nil, true];
|
||||
_unit setVariable [QGVAR(reviveStartTime), nil];
|
||||
[_unit, true] call FUNC(setDead);
|
||||
};
|
||||
|
||||
if !(_unit getvariable [QGVAR(inReviveState), false]) exitwith {
|
||||
if !(_unit getVariable [QGVAR(inReviveState), false]) exitwith {
|
||||
// revived without dieing, so in case we have lifes, remove one.
|
||||
if (GVAR(amountOfReviveLives) > 0) then {
|
||||
_lifesLeft = _unit getvariable[QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives)];
|
||||
_unit setvariable [QGVAR(amountOfReviveLives), _lifesLeft - 1, true];
|
||||
_lifesLeft = _unit getVariable[QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives)];
|
||||
_unit setVariable [QGVAR(amountOfReviveLives), _lifesLeft - 1, true];
|
||||
};
|
||||
|
||||
_unit setvariable [QGVAR(reviveStartTime), nil];
|
||||
_unit setVariable [QGVAR(reviveStartTime), nil];
|
||||
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
if (GVAR(level) >= 2) then {
|
||||
if (_unit getvariable [QGVAR(heartRate), 60] > 0) then {
|
||||
_unit setvariable [QGVAR(heartRate), 0];
|
||||
if (_unit getVariable [QGVAR(heartRate), 60] > 0) then {
|
||||
_unit setVariable [QGVAR(heartRate), 0];
|
||||
};
|
||||
};
|
||||
}, 1, [_unit] ] call CBA_fnc_addPerFrameHandler;
|
||||
false;
|
||||
};
|
||||
|
||||
_unit setvariable ["ACE_isDead", true, true];
|
||||
_unit setVariable ["ACE_isDead", true, true];
|
||||
if (isPLayer _unit) then {
|
||||
_unit setvariable ["isDeadPlayer", true, true];
|
||||
_unit setVariable ["isDeadPlayer", true, true];
|
||||
};
|
||||
|
||||
["medical_onSetDead", [_unit]] call EFUNC(common,localEvent);
|
||||
|
@ -42,7 +42,7 @@ _medicRequired = if (isNumber (_config >> "requiredMedic")) then {
|
||||
} else {
|
||||
// Check for required class
|
||||
if (isText (_config >> "requiredMedic")) exitwith {
|
||||
missionNamespace getvariable [(getText (_config >> "requiredMedic")), 0];
|
||||
missionNamespace getVariable [(getText (_config >> "requiredMedic")), 0];
|
||||
};
|
||||
0;
|
||||
};
|
||||
@ -63,7 +63,7 @@ if (isText (_config >> "Condition")) then {
|
||||
if (isnil _condition) then {
|
||||
_condition = compile _condition;
|
||||
} else {
|
||||
_condition = missionNamespace getvariable _condition;
|
||||
_condition = missionNamespace getVariable _condition;
|
||||
};
|
||||
if (_condition isEqualType false) then {
|
||||
_return = _condition;
|
||||
@ -75,7 +75,7 @@ if (isText (_config >> "Condition")) then {
|
||||
if (!_return) exitwith {false};
|
||||
|
||||
_patientStateCondition = if (isText(_config >> "patientStateCondition")) then {
|
||||
missionNamespace getvariable [getText(_config >> "patientStateCondition"), 0]
|
||||
missionNamespace getVariable [getText(_config >> "patientStateCondition"), 0]
|
||||
} else {
|
||||
getNumber(_config >> "patientStateCondition")
|
||||
};
|
||||
@ -97,7 +97,7 @@ if ("All" in _locations) then {
|
||||
if (_x == "MedicalVehicle" && _medVeh) exitwith {_return = true;};
|
||||
if !(isnil _x) exitwith {
|
||||
private "_val";
|
||||
_val = missionNamespace getvariable _x;
|
||||
_val = missionNamespace getVariable _x;
|
||||
if (_val isEqualType 0) then {
|
||||
_return = switch (_val) do {
|
||||
case 0: {true}; //AdvancedMedicalSettings_anywhere
|
||||
@ -119,7 +119,7 @@ _consumeItems = if (isNumber (_config >> "itemConsumed")) then {
|
||||
} else {
|
||||
// Check for required class
|
||||
if (isText (_config >> "itemConsumed")) exitwith {
|
||||
missionNamespace getvariable [(getText (_config >> "itemConsumed")), 0];
|
||||
missionNamespace getVariable [(getText (_config >> "itemConsumed")), 0];
|
||||
};
|
||||
0;
|
||||
};
|
||||
@ -135,19 +135,19 @@ if (_callbackProgress == "") then {
|
||||
if (isNil _callbackProgress) then {
|
||||
_callbackProgress = compile _callbackProgress;
|
||||
} else {
|
||||
_callbackProgress = missionNamespace getvariable _callbackProgress;
|
||||
_callbackProgress = missionNamespace getVariable _callbackProgress;
|
||||
};
|
||||
|
||||
// Patient Animation
|
||||
_patientAnim = getText (_config >> "animationPatient");
|
||||
if (_target getvariable ["ACE_isUnconscious", false] && GVAR(allowUnconsciousAnimationOnTreatment)) then {
|
||||
if (_target getVariable ["ACE_isUnconscious", false] && GVAR(allowUnconsciousAnimationOnTreatment)) then {
|
||||
if !(animationState _target in (getArray (_config >> "animationPatientUnconsciousExcludeOn"))) then {
|
||||
_patientAnim = getText (_config >> "animationPatientUnconscious");
|
||||
};
|
||||
};
|
||||
|
||||
if (_caller != _target && {vehicle _target == _target} && {_patientAnim != ""}) then {
|
||||
if (_target getvariable ["ACE_isUnconscious", false]) then {
|
||||
if (_target getVariable ["ACE_isUnconscious", false]) then {
|
||||
[_target, _patientAnim, 2, true] call EFUNC(common,doAnimation);
|
||||
} else {
|
||||
[_target, _patientAnim, 1, true] call EFUNC(common,doAnimation);
|
||||
@ -160,7 +160,7 @@ if (_caller == _target) then {
|
||||
_callerAnim = [getText (_config >> "animationCallerSelf"), getText (_config >> "animationCallerSelfProne")] select (stance _caller == "PRONE");
|
||||
};
|
||||
|
||||
_caller setvariable [QGVAR(selectedWeaponOnTreatment), (weaponState _caller)];
|
||||
_caller setVariable [QGVAR(selectedWeaponOnTreatment), (weaponState _caller)];
|
||||
|
||||
// Cannot use secondairy weapon for animation
|
||||
if (currentWeapon _caller == secondaryWeapon _caller) then {
|
||||
@ -184,12 +184,12 @@ if (vehicle _caller == _caller && {_callerAnim != ""}) then {
|
||||
|
||||
if ((stance _caller) == "STAND") then {
|
||||
switch (_wpn) do {//If standing, end in a crouched animation based on their current weapon
|
||||
case ("rfl"): {_caller setvariable [QGVAR(treatmentPrevAnimCaller), "AmovPknlMstpSrasWrflDnon"];};
|
||||
case ("pst"): {_caller setvariable [QGVAR(treatmentPrevAnimCaller), "AmovPknlMstpSrasWpstDnon"];};
|
||||
case ("non"): {_caller setvariable [QGVAR(treatmentPrevAnimCaller), "AmovPknlMstpSnonWnonDnon"];};
|
||||
case ("rfl"): {_caller setVariable [QGVAR(treatmentPrevAnimCaller), "AmovPknlMstpSrasWrflDnon"];};
|
||||
case ("pst"): {_caller setVariable [QGVAR(treatmentPrevAnimCaller), "AmovPknlMstpSrasWpstDnon"];};
|
||||
case ("non"): {_caller setVariable [QGVAR(treatmentPrevAnimCaller), "AmovPknlMstpSnonWnonDnon"];};
|
||||
};
|
||||
} else {
|
||||
_caller setvariable [QGVAR(treatmentPrevAnimCaller), animationState _caller];
|
||||
_caller setVariable [QGVAR(treatmentPrevAnimCaller), animationState _caller];
|
||||
};
|
||||
[_caller, _callerAnim] call EFUNC(common,doAnimation);
|
||||
};
|
||||
@ -203,7 +203,7 @@ _treatmentTime = if (isNumber (_config >> "treatmentTime")) then {
|
||||
if (isnil _treatmentTimeConfig) then {
|
||||
_treatmentTimeConfig = compile _treatmentTimeConfig;
|
||||
} else {
|
||||
_treatmentTimeConfig = missionNamespace getvariable _treatmentTimeConfig;
|
||||
_treatmentTimeConfig = missionNamespace getVariable _treatmentTimeConfig;
|
||||
};
|
||||
if (_treatmentTimeConfig isEqualType 0) exitwith {
|
||||
_treatmentTimeConfig;
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
params ["_target", "_selectionName"];
|
||||
|
||||
_damageBodyParts = _target getvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]];
|
||||
_damageBodyParts = _target getVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]];
|
||||
|
||||
// Ensure it is a valid bodypart
|
||||
_part = [_selectionName] call FUNC(selectionNameToNumber);
|
||||
@ -33,8 +33,8 @@ if ((_damageBodyParts select _part) > 0) then {
|
||||
_damageOnPart = _damageOnPart - BANDAGEHEAL;
|
||||
};
|
||||
_damageBodyParts set [_part, _damageOnPart max 0];
|
||||
_target setvariable [QGVAR(bodyPartStatus), _damageBodyParts, true];
|
||||
TRACE_2("ACE_DEBUG: Treatment BASIC Bandage Broadcast value here",_unit, _target getvariable QGVAR(bodyPartStatus));
|
||||
_target setVariable [QGVAR(bodyPartStatus), _damageBodyParts, true];
|
||||
TRACE_2("ACE_DEBUG: Treatment BASIC Bandage Broadcast value here",_unit, _target getVariable QGVAR(bodyPartStatus));
|
||||
};
|
||||
|
||||
EXPLODE_6_PVT(_damageBodyParts,_headDamage,_torsoDamage,_handsDamageR,_handsDamageL,_legsDamageR,_legsDamageL);
|
||||
|
@ -145,7 +145,7 @@ if (isNil _callbackProgress) then {
|
||||
|
||||
// Player Animation
|
||||
_callerAnim = [getText (_config >> "animationCaller"), getText (_config >> "animationCallerProne")] select (stance _caller == "PRONE");
|
||||
_caller setvariable [QGVAR(selectedWeaponOnrepair), currentWeapon _caller];
|
||||
_caller setVariable [QGVAR(selectedWeaponOnrepair), currentWeapon _caller];
|
||||
|
||||
// Cannot use secondairy weapon for animation
|
||||
if (currentWeapon _caller == secondaryWeapon _caller) then {
|
||||
@ -163,9 +163,9 @@ if (vehicle _caller == _caller && {_callerAnim != ""}) then {
|
||||
};
|
||||
|
||||
if (stance _caller == "STAND") then {
|
||||
_caller setvariable [QGVAR(repairPrevAnimCaller), "amovpknlmstpsraswrfldnon"];
|
||||
_caller setVariable [QGVAR(repairPrevAnimCaller), "amovpknlmstpsraswrfldnon"];
|
||||
} else {
|
||||
_caller setvariable [QGVAR(repairPrevAnimCaller), animationState _caller];
|
||||
_caller setVariable [QGVAR(repairPrevAnimCaller), animationState _caller];
|
||||
};
|
||||
[_caller, _callerAnim] call EFUNC(common,doAnimation);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user