diff --git a/core.liberation/addons/PAR/PAR_ActionManager.sqf b/core.liberation/addons/PAR/PAR_ActionManager.sqf
index 4ec15e234..911f39c50 100644
--- a/core.liberation/addons/PAR/PAR_ActionManager.sqf
+++ b/core.liberation/addons/PAR/PAR_ActionManager.sqf
@@ -11,7 +11,7 @@ private _checkAction = {
while {true} do {
_wnded_list = (getPos player) nearEntities ["CAManBase", 30];
_wnded_list = _wnded_list select {
- side _x == GRLIB_side_civilian &&
+ alive _x && side _x == GRLIB_side_civilian &&
(_x getVariable ["PAR_wounded", false]) &&
([_x] call _checkAction) &&
isNull objectParent _x &&
@@ -22,19 +22,19 @@ while {true} do {
if (count _wnded_list > 0) then {
{
_unit = _x;
- _id1 = _unit addAction ["" + localize "STR_PAR_AC_02" + "", "addons\PAR\PAR_fn_drag.sqf", ["action_drag"], 9, false, true, "", "(_target getVariable ['PAR_isUnconscious', false]) && !PAR_isDragging", 3];
+ _id1 = _unit addAction ["" + localize "STR_PAR_AC_02" + "", "addons\PAR\PAR_fn_drag.sqf", ["action_drag"], 9, false, true, "", "alive _target && (_target getVariable ['PAR_isUnconscious', false]) && !PAR_isDragging", 3];
_id2 = _unit addAction ["" + localize "STR_PAR_AC_03" + "", { PAR_isDragging = false }, ["action_release"], 10, true, true, "", "PAR_isDragging"];
_id3 = [
_unit,
"" + localize "STR_PAR_AC_01" + "",
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_reviveMedic_ca.paa","\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_reviveMedic_ca.paa",
"
- (_this distance _target <= 3) &&
+ (alive _target && _this distance _target <= 3) &&
(_target getVariable ['PAR_isUnconscious', false]) &&
(_target getVariable ['PAR_isDragged',0] == 0) &&
([_this] call PAR_has_medikit || [_this] call PAR_is_medic)
",
- "(_caller distance _target < 3)",
+ "(alive _target && _caller distance _target < 3)",
{
[(_target getVariable ["PAR_myMedic", objNull]), _target] call PAR_fn_medicRelease;
if (local _caller) then { _target setVariable ["PAR_myMedic", _caller] };
diff --git a/core.liberation/addons/PAR/PAR_fn_death.sqf b/core.liberation/addons/PAR/PAR_fn_death.sqf
index 04bb9cfc0..b99e19ec2 100644
--- a/core.liberation/addons/PAR/PAR_fn_death.sqf
+++ b/core.liberation/addons/PAR/PAR_fn_death.sqf
@@ -1,34 +1,35 @@
params ["_unit"];
-private ["_pos", "_grave", "_grave_box", "_old_graves", "_uniform", "_vest", "_backpack" ];
-_unit connectTerminalToUAV objNull;
[(_unit getVariable ['PAR_myMedic', objNull]), _unit] call PAR_fn_medicRelease;
_unit setVariable ['PAR_wounded', false];
-removeAllWeapons _unit;
if (_unit == player) then {
+ titleText ["" ,"BLACK FADED", 100];
+ _unit connectTerminalToUAV objNull;
+
// Grave + Save Stuff
- _pos = getPosATL _unit;
- if ( isNull objectParent player &&
+ private _pos = getPosATL _unit;
+ if ( PAR_grave == 1 && isNull objectParent player &&
!([_unit, "LHD", GRLIB_capture_size] call F_check_near) &&
(_pos select 2) <= 2 && !(surfaceIsWater _pos)
) then {
+ // Clean body
+ removeAllActions _unit;
+ removeAllWeapons _unit;
+ _unit setPosATL ((markerPos GRLIB_respawn_marker) vectorAdd [floor random 5, floor random 5, 0.5]);
+
// Save Stuff
[PAR_grave_box] call F_clearCargo;
[PAR_grave_box, PAR_backup_loadout] call F_setCargo;
- //_unit hideObject true;
- _unit setPosATL ((markerPos GRLIB_respawn_marker) vectorAdd [floor(random 5), floor(random 5), 1]);
-
// create grave
- _grave = (selectRandom PAR_graves) createVehicle _pos;
+ private _grave = (selectRandom PAR_graves) createVehicle _pos;
_grave allowDamage false;
_grave setPosATL _pos;
_grave setvariable ["PAR_grave_message", format ["- R.I.P - %1", name player], true];
- _grave_dir = getDir _grave;
// remove old grave (max: 3)
- _old_graves = _unit getVariable ["PAR_player_graves", []];
+ private _old_graves = _unit getVariable ["PAR_player_graves", []];
_old_graves pushback _grave;
if (count _old_graves > 3) then {
deleteVehicle (_old_graves select 0);
@@ -37,13 +38,16 @@ if (_unit == player) then {
_unit setvariable ["PAR_player_graves", _old_graves];
// attach grave box
- _grave_box_pos = (getposATL _grave) vectorAdd ([[-1.75, 0, 0], -_grave_dir] call BIS_fnc_rotateVector2D);
+ private _grave_box_pos = (getposATL _grave) vectorAdd ([[-1.75, 0, 0], -(getDir _grave)] call BIS_fnc_rotateVector2D);
PAR_grave_box enableSimulationGlobal true;
PAR_grave_box setPosATL _grave_box_pos;
PAR_grave_box attachto [_grave];
- "player_grave_box" setMarkerPosLocal _grave;
+ _pos = _grave_box_pos;
};
+ // Marker
+ "player_grave_box" setMarkerPosLocal _pos;
+
// Respawn Penalty
if ([_unit] call F_getScore > (GRLIB_perm_log + 50)) then { [_unit, -10] remoteExec ["F_addScore", 2] };
@@ -54,8 +58,9 @@ if (_unit == player) then {
titleText ["" ,"BLACK FADED", 100];
} else {
gamelogic globalChat (format [localize "STR_PAR_DE_01", name _unit]);
+ removeAllActions _unit;
+ removeAllWeapons _unit;
+ hideBody _unit;
+ sleep 5;
+ deleteVehicle _unit;
};
-
-hideBody _unit;
-sleep 5;
-deleteVehicle _unit;
diff --git a/core.liberation/mission_params.sqf b/core.liberation/mission_params.sqf
index 356b8ba8a..48cbf9a52 100644
--- a/core.liberation/mission_params.sqf
+++ b/core.liberation/mission_params.sqf
@@ -52,6 +52,7 @@ LRX_Mission_Params = [
["PAR_Revive", 3], // PAR revive - [default 3] - values = [3,2,1,0] - Text {Enabled - Everyone can revive,Enabled - Everyone can revive using Medikit/FAK,Enabled - Only medics can revive,Disabled}
["PAR_AI_Revive", 7], // PAR AI revive limit - [default 0] - values = [0,3,5,7,10,15,20]
["PAR_BleedOut", 300], // PAR revive Bleedout timer - [default 300] - values = [100,200,300,400,500,600]
+ ["PAR_Grave", 1], // PAR grave with stuuf in box - [default 1] - values [1,0] - Text {Enabled,Disabled}
["Respawn", 20], // Cooldown before can player respawn - [default 20] - values = [0,xxx] - Text {Disabled,Enabled}
["SquadSize", 2], // AI per squad at startup [default 2] - values = {0,1,2,3,4,5,6}
["MaxSquadSize", 5], // AI recruitment limit per squad [default 5] - values = {0,1,2,3,4,5,6,7,8,9,10}
@@ -189,6 +190,8 @@ LRX_Mission_Params_Def = [
["100", "200", "300", "400", "500", "600"],
[100, 200, 300, 400, 500, 600]
],
+ ["PAR_Grave", localize "STR_PARAMS_PAR_GRAVE", [localize "STR_PARAMS_DISABLED",localize "STR_PARAMS_ENABLED"]],
+
["Respawn", localize "STR_RESPAWN",
["5", "10", "20", "25", "30", "60"],
[5, 10, 20, 25, 30, 60]
diff --git a/core.liberation/onPlayerRespawn.sqf b/core.liberation/onPlayerRespawn.sqf
index 53f2d8c82..917b22deb 100644
--- a/core.liberation/onPlayerRespawn.sqf
+++ b/core.liberation/onPlayerRespawn.sqf
@@ -10,7 +10,7 @@ waitUntil {sleep 0.1; !isNil "GRLIB_init_server"};
if (!GRLIB_init_server) exitWith {};
waitUntil {sleep 0.1; !isNil "GRLIB_LRX_params_loaded"};
-deleteVehicle _oldUnit;
+if (PAR_grave == 1) then { deleteVehicle _oldUnit };
_unit allowDamage false;
_unit setPosATL ((markerPos GRLIB_respawn_marker) vectorAdd [floor(random 5), floor(random 5), 1]);
diff --git a/core.liberation/scripts/shared/fetch_params.sqf b/core.liberation/scripts/shared/fetch_params.sqf
index 07117d558..2872fc746 100644
--- a/core.liberation/scripts/shared/fetch_params.sqf
+++ b/core.liberation/scripts/shared/fetch_params.sqf
@@ -193,6 +193,7 @@ GRLIB_despawn_tickets = ["SectorDespawn"] call lrx_getParamValue;
PAR_revive = ["PAR_Revive"] call lrx_getParamValue;
PAR_ai_revive = ["PAR_AI_Revive"] call lrx_getParamValue;
PAR_bleedout = ["PAR_BleedOut"] call lrx_getParamValue;
+PAR_grave = ["PAR_Grave"] call lrx_getParamValue;
// Hardcoded
GRLIB_endgame = 0;
diff --git a/core.liberation/stringtable.xml b/core.liberation/stringtable.xml
index e64d72940..c150f1a1f 100644
--- a/core.liberation/stringtable.xml
+++ b/core.liberation/stringtable.xml
@@ -1831,6 +1831,10 @@
PAR: Bleedout Timer
PAR: Durée Attente Blessé
+
+ PAR: Grave + Stuff in a box
+ PAR: Tombe + Stuff dans une boite
+
Enabled - Only medics can revive
Activé - Seuls les medics peuvent ressusciter