Skip to content

Commit

Permalink
fix ai count revive
Browse files Browse the repository at this point in the history
  • Loading branch information
tbox1911 committed Feb 29, 2024
1 parent e2c70b1 commit 38efba8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
8 changes: 3 additions & 5 deletions core.liberation/addons/PAR/PAR_fn_sortie.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ if (PAR_revive == 2) then {
_medic removeItem "FirstAidKit";
};

if (PAR_ai_revive > 0) then {
private _cur_revive = _wnded getVariable ["PAR_revive_max", PAR_ai_revive];
_cur_revive = _cur_revive - 1;
if (PAR_ai_revive > 0 && !isPlayer _wnded && local _wnded) then {
private _cur_revive = (_wnded getVariable ["PAR_revive_max", PAR_ai_revive]) - 1;
if (_cur_revive < 3) then {
private _msg = format ["%1 last revive (%2) !!", name _wnded, _cur_revive];
[_wnded, _msg] call PAR_fn_globalchat;
Expand All @@ -50,8 +49,7 @@ if (PAR_ai_revive > 0) then {
params ["_unit"];
sleep (25 * 60);
if (!alive _unit) exitWith {};
private _revive = _unit getVariable ["PAR_revive_max", PAR_ai_revive];
_revive = _revive + 1;
private _revive = (_unit getVariable ["PAR_revive_max", PAR_ai_revive]) + 1;
_unit setVariable ["PAR_revive_max", _revive];
private _msg = format ["%1 revive restored (%2) !!", name _unit, _revive];
[_unit, _msg] call PAR_fn_globalchat;
Expand Down
6 changes: 3 additions & 3 deletions core.liberation/addons/PAR/PAR_fn_unconscious.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ if (GRLIB_disable_death_chat && isPlayer _unit) then {
for "_channel" from 0 to 4 do { _channel enableChannel false };
};

_unit switchMove "AinjPpneMstpSnonWrflDnon"; // lay down
_unit switchMove "AinjPpneMstpSnonWrflDnon"; // lay down
_unit playMoveNow "AinjPpneMstpSnonWrflDnon";
sleep 7;

if (PAR_ai_revive > 0) then {
if (PAR_ai_revive > 0 && !isPlayer _unit && local _unit) then {
private _cur_revive = _unit getVariable ["PAR_revive_max", PAR_ai_revive];
if (_cur_revive == 0) then { _unit setDamage 1; sleep 3 };
};
Expand All @@ -53,7 +53,7 @@ while {lifeState _unit == "INCAPACITATED" && time <= _unit getVariable ["PAR_Ble
if (!isNil "_medic") then { [_unit, _medic] call PAR_fn_911 };
};
} else {
_msg = format [localize "STR_PAR_UC_03", name player];
_msg = format [localize "STR_PAR_UC_03", name player];
if (lifeState player == "INCAPACITATED") then {
_msg = format [localize "STR_PAR_UC_02", name player];
};
Expand Down

0 comments on commit 38efba8

Please sign in to comment.