mirror of
https://github.com/hpy/Enigma_Exile_Revive.git
synced 2024-08-30 16:52:15 +00:00
possible hotfix
This commit is contained in:
parent
79e695f5c5
commit
dbe830198e
@ -22,84 +22,97 @@ _defibangle = 30;
|
||||
|
||||
if !(isPlayer _target) exitWith {systemChat Format ["Theres no pulse..."]};
|
||||
|
||||
if (_target getVariable "EnigmaRevivePermitted") then {
|
||||
if (_target getVariable "EnigmaRevivePermitted") then
|
||||
{
|
||||
|
||||
if (magazines player find "Exile_Item_Defibrillator" >= 0) then {
|
||||
if (magazines player find "Exile_Item_Defibrillator" >= 0) then
|
||||
{
|
||||
|
||||
|
||||
if ((player distance (_target modelToWorld _bodypos2))<((_target modelToWorld _bodypos1) distance player)) then {
|
||||
_healPlace = "_bodypos2";
|
||||
_action = "medicStart";
|
||||
_bodypos = _bodypos2;
|
||||
_defibpos = [0,0.9,0];
|
||||
_defibangle = 180;
|
||||
};
|
||||
if ((player distance (_target modelToWorld _bodypos2))<((_target modelToWorld _bodypos1) distance player)) then
|
||||
{
|
||||
_healPlace = "_bodypos2";
|
||||
_action = "medicStart";
|
||||
_bodypos = _bodypos2;
|
||||
_defibpos = [0,0.9,0];
|
||||
_defibangle = 180;
|
||||
};
|
||||
|
||||
player attachTo [_target, _bodypos];
|
||||
|
||||
_posh = player modelToWorld [0,0,0];
|
||||
_posi = _target modelToWorld _bodypos3;
|
||||
_dy = (_posh select 1) - (_posi select 1);
|
||||
_dx = (_posh select 0) - (_posi select 0);
|
||||
_dir = getDir player;
|
||||
player setDir (270 - (_dy atan2 _dx) - direction _target);
|
||||
_posh = player modelToWorld [0,0,0];
|
||||
_posi = _target modelToWorld _bodypos3;
|
||||
_dy = (_posh select 1) - (_posi select 1);
|
||||
_dx = (_posh select 0) - (_posi select 0);
|
||||
_dir = getDir player;
|
||||
player setDir (270 - (_dy atan2 _dx) - direction _target);
|
||||
|
||||
sleep 0.001;
|
||||
sleep 0.001;
|
||||
|
||||
player removeMagazine "Exile_Item_Defibrillator";
|
||||
_position = _target modelToWorld _defibpos;
|
||||
_lootHolder = createVehicle ["LootWeaponHolder", _position, [], 0, "CAN_COLLIDE"];
|
||||
_lootHolder setPosATL _position;
|
||||
_lootHolder addItemCargoGlobal ["Exile_Item_Defibrillator",1];
|
||||
_lootHolder setDir ((getDir _target) + _defibangle);
|
||||
|
||||
|
||||
player removeMagazine "Exile_Item_Defibrillator";
|
||||
_position = _target modelToWorld _defibpos;
|
||||
_lootHolder = createVehicle ["LootWeaponHolder", _position, [], 0, "CAN_COLLIDE"];
|
||||
_lootHolder setPosATL _position;
|
||||
_lootHolder addItemCargoGlobal ["Exile_Item_Defibrillator",1];
|
||||
_lootHolder setDir ((getDir _target) + _defibangle);
|
||||
if (_primaryw == "") then
|
||||
{
|
||||
|
||||
_target switchMove "AinjPpneMstpSnonWrflDnon";
|
||||
sleep 0.2;
|
||||
player playMove "AinvPknlMstpSlayWrflDnon_medic";
|
||||
|
||||
if (_primaryw == "") then {
|
||||
}
|
||||
else
|
||||
{
|
||||
if (currentWeapon player != _primaryw) then
|
||||
{
|
||||
player selectWeapon _primaryw;
|
||||
sleep 2;
|
||||
};
|
||||
|
||||
_target switchMove "AinjPpneMstpSnonWrflDnon";
|
||||
sleep 0.2;
|
||||
player playMove "AinvPknlMstpSlayWrflDnon_medic";
|
||||
|
||||
} else {
|
||||
|
||||
if (currentWeapon player != _primaryw) then {
|
||||
player selectWeapon _primaryw;
|
||||
sleep 2;
|
||||
};
|
||||
player playActionNow _action;
|
||||
_timer = 15;
|
||||
waitUntil { animationState player in _Anims };
|
||||
};
|
||||
};
|
||||
|
||||
sleep _timer;
|
||||
detach player;
|
||||
|
||||
if (_primaryw == "") then {
|
||||
player switchmove "";
|
||||
} else {
|
||||
player switchAction "medicStart";
|
||||
player playActionNow "medicStop";
|
||||
};
|
||||
|
||||
if (_target getVariable["REVIVE", true]) then {
|
||||
|
||||
_targetsbleedoutcountdown = _target getVariable "BleedoutCountDownEnd";
|
||||
|
||||
_secondsRemaining = _targetsbleedoutcountdown - time;
|
||||
if (_secondsRemaining >= 17) then
|
||||
{
|
||||
_target setVariable["antidupe", -1, true];
|
||||
ENIGMA_revivePlayer = [_target,player,1];
|
||||
publicVariableServer "ENIGMA_revivePlayer";
|
||||
} else {
|
||||
systemChat Format ["RIP %1! They are too far gone!",_targetname];
|
||||
if (_primaryw == "") then
|
||||
{
|
||||
player switchmove "";
|
||||
}
|
||||
else
|
||||
{
|
||||
player switchAction "medicStart";
|
||||
player playActionNow "medicStop";
|
||||
};
|
||||
|
||||
} else {
|
||||
systemChat Format ["RIP %1! They suffered a fatal injury!",_targetname];
|
||||
if (_target getVariable["REVIVE", true]) then
|
||||
{
|
||||
_targetsbleedoutcountdown = _target getVariable "BleedoutCountDownEnd";
|
||||
_secondsRemaining = _targetsbleedoutcountdown - time;
|
||||
if (_secondsRemaining >= 17) then
|
||||
{
|
||||
_target setVariable["antidupe", -1, true];
|
||||
ENIGMA_revivePlayer = [_target,player,1];
|
||||
publicVariableServer "ENIGMA_revivePlayer";
|
||||
}
|
||||
else
|
||||
{
|
||||
systemChat Format ["RIP %1! They are too far gone!",_targetname];
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
systemChat Format ["RIP %1! They suffered a fatal injury!",_targetname];
|
||||
};
|
||||
};
|
||||
} else {
|
||||
systemChat Format ["RIP %1! They suffered a fatal injury!",_targetname];
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
systemChat Format ["RIP %1! They suffered a fatal injury!",_targetname];
|
||||
};
|
@ -11,111 +11,77 @@
|
||||
|
||||
private["_respawnDelay","_layer","_descriptions"];
|
||||
_respawnDelay = _this;
|
||||
|
||||
/////////////////////////////////added by happydayz/////////////////////////////////////
|
||||
oldgroup = group player;
|
||||
if (player getVariable["REVIVE", true]) then {
|
||||
|
||||
_descriptions =
|
||||
[
|
||||
if (player getVariable["REVIVE", true]) then
|
||||
{
|
||||
|
||||
_descriptions =
|
||||
[
|
||||
"KNOCKED OUT",
|
||||
"CRITICALLY WOUNDED",
|
||||
"BLEEDING OUT",
|
||||
"ON DEATHS DOOR"
|
||||
];
|
||||
|
||||
player setVariable ['EnigmaRevivePermitted', true, true]; //adds action to be revived
|
||||
|
||||
[100] call BIS_fnc_bloodEffect;
|
||||
ExileClientPostProcessingColorCorrections ppEffectAdjust [1, 1, 0, [0, 0, 0, 0], [0.39, 0.32, 0.25, 0], [0.5,0.5,0.5,0], [0,0,0,0,0,0,4]];
|
||||
ExileClientPostProcessingColorCorrections ppEffectCommit 0;
|
||||
ExileClientPostProcessingColorCorrections ppEffectAdjust [1, 1, 0, [0.4, 0.2, 0.3, 0], [0.3, 0.05, 0, 0], [0.5,0.5,0.5,0], [0,0,0,0,0,0,4]];
|
||||
ExileClientPostProcessingColorCorrections ppEffectCommit _respawnDelay;
|
||||
ExileClientPostProcessingBackgroundBlur ppEffectAdjust [0];
|
||||
ExileClientPostProcessingBackgroundBlur ppEffectCommit 0;
|
||||
ExileClientPostProcessingBackgroundBlur ppEffectEnable true;
|
||||
ExileClientPostProcessingBackgroundBlur ppEffectAdjust [2];
|
||||
ExileClientPostProcessingBackgroundBlur ppEffectCommit _respawnDelay;
|
||||
ExileClientBleedOutHeartbeatPlaying = false;
|
||||
ExileClientBleedOutCountDownDuration = _respawnDelay;
|
||||
ExileClientBleedOutCountDownEnd = time + _respawnDelay;
|
||||
_layer = "BIS_fnc_respawnCounter" call bis_fnc_rscLayer;
|
||||
_layer cutText ["", "plain"];
|
||||
_descriptions =
|
||||
|
||||
player setVariable ["BleedoutCountDownEnd", ExileClientBleedOutCountDownEnd, true];
|
||||
|
||||
_layer = "BIS_fnc_respawnCounter" call bis_fnc_rscLayer;
|
||||
_layer cutText ["", "plain"];
|
||||
|
||||
missionnamespace setvariable ["RscRespawnCounter_description", format ["<t size='2' align='center'>%1</t>",selectRandom _descriptions]];
|
||||
missionnamespace setvariable ["RscRespawnCounter_colorID", 0];
|
||||
missionnamespace setvariable ["RscRespawnCounter_Custom", _respawnDelay];
|
||||
_layer cutRsc ["RscRespawnCounter", "plain"];
|
||||
showChat true;
|
||||
"Start bleeding out..." call ExileClient_util_log;
|
||||
if(ExileClientBleedOutThread isEqualTo -1)then
|
||||
{
|
||||
ExileClientBleedOutThread = [2, ExileClient_object_player_thread_bleedToDeath, [], true] call ExileClient_system_thread_addtask;
|
||||
};
|
||||
player setVariable ['EnigmaRevivePermitted', true, true];
|
||||
}
|
||||
else
|
||||
{
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
[100] call BIS_fnc_bloodEffect;
|
||||
ExileClientPostProcessingColorCorrections ppEffectAdjust [1, 1, 0, [0, 0, 0, 0], [0.39, 0.32, 0.25, 0], [0.5,0.5,0.5,0], [0,0,0,0,0,0,4]];
|
||||
ExileClientPostProcessingColorCorrections ppEffectCommit 0;
|
||||
ExileClientPostProcessingColorCorrections ppEffectAdjust [1, 1, 0, [0.4, 0.2, 0.3, 0], [0.3, 0.05, 0, 0], [0.5,0.5,0.5,0], [0,0,0,0,0,0,4]];
|
||||
ExileClientPostProcessingColorCorrections ppEffectCommit _respawnDelay;
|
||||
ExileClientPostProcessingBackgroundBlur ppEffectAdjust [0];
|
||||
ExileClientPostProcessingBackgroundBlur ppEffectCommit 0;
|
||||
ExileClientPostProcessingBackgroundBlur ppEffectEnable true;
|
||||
ExileClientPostProcessingBackgroundBlur ppEffectAdjust [2];
|
||||
ExileClientPostProcessingBackgroundBlur ppEffectCommit _respawnDelay;
|
||||
ExileClientBleedOutHeartbeatPlaying = false;
|
||||
ExileClientBleedOutCountDownDuration = _respawnDelay;
|
||||
ExileClientBleedOutCountDownEnd = time + _respawnDelay;
|
||||
_layer = "BIS_fnc_respawnCounter" call bis_fnc_rscLayer;
|
||||
_layer cutText ["", "plain"];
|
||||
_descriptions =
|
||||
[
|
||||
"WRECKED",
|
||||
"REKT",
|
||||
"STOMPED",
|
||||
"WASTED",
|
||||
"SCREWED",
|
||||
"TOASTED",
|
||||
"REST IN PIECES",
|
||||
"TERMINATED",
|
||||
"KILLED",
|
||||
"EXILED",
|
||||
"ANNIHILATED",
|
||||
"HAMMERED",
|
||||
"NEUTRALIZED",
|
||||
"DUMPED",
|
||||
"ZAPPED",
|
||||
"SLAIN",
|
||||
"FRIED",
|
||||
"WIPED OUT",
|
||||
"VANQUISHED",
|
||||
"BUSTED",
|
||||
"PULVERIZED",
|
||||
"SMASHED",
|
||||
"SHREDDED",
|
||||
"CRUSHED"
|
||||
];
|
||||
missionnamespace setvariable ["RscRespawnCounter_description", format ["<t size='2' align='center'>%1</t>",selectRandom _descriptions]];
|
||||
missionnamespace setvariable ["RscRespawnCounter_colorID", 0];
|
||||
missionnamespace setvariable ["RscRespawnCounter_Custom", _respawnDelay];
|
||||
_layer cutRsc ["RscRespawnCounter", "plain"];
|
||||
showChat true;
|
||||
"Start bleeding out..." call ExileClient_util_log;
|
||||
if(ExileClientBleedOutThread isEqualTo -1)then
|
||||
{
|
||||
ExileClientBleedOutThread = [2, ExileClient_object_player_thread_bleedToDeath, [], true] call ExileClient_system_thread_addtask;
|
||||
_descriptions =
|
||||
[
|
||||
"WRECKED",
|
||||
"REKT",
|
||||
"STOMPED",
|
||||
"WASTED",
|
||||
"SCREWED",
|
||||
"TOASTED",
|
||||
"REST IN PIECES",
|
||||
"TERMINATED",
|
||||
"KILLED",
|
||||
"EXILED",
|
||||
"ANNIHILATED",
|
||||
"HAMMERED",
|
||||
"NEUTRALIZED",
|
||||
"DUMPED",
|
||||
"ZAPPED",
|
||||
"SLAIN",
|
||||
"FRIED",
|
||||
"WIPED OUT",
|
||||
"VANQUISHED",
|
||||
"BUSTED",
|
||||
"PULVERIZED",
|
||||
"SMASHED",
|
||||
"SHREDDED",
|
||||
"CRUSHED"
|
||||
];
|
||||
};
|
||||
|
||||
[100] call BIS_fnc_bloodEffect;
|
||||
ExileClientPostProcessingColorCorrections ppEffectAdjust [1, 1, 0, [0, 0, 0, 0], [0.39, 0.32, 0.25, 0], [0.5,0.5,0.5,0], [0,0,0,0,0,0,4]];
|
||||
ExileClientPostProcessingColorCorrections ppEffectCommit 0;
|
||||
ExileClientPostProcessingColorCorrections ppEffectAdjust [1, 1, 0, [0.4, 0.2, 0.3, 0], [0.3, 0.05, 0, 0], [0.5,0.5,0.5,0], [0,0,0,0,0,0,4]];
|
||||
ExileClientPostProcessingColorCorrections ppEffectCommit _respawnDelay;
|
||||
ExileClientPostProcessingBackgroundBlur ppEffectAdjust [0];
|
||||
ExileClientPostProcessingBackgroundBlur ppEffectCommit 0;
|
||||
ExileClientPostProcessingBackgroundBlur ppEffectEnable true;
|
||||
ExileClientPostProcessingBackgroundBlur ppEffectAdjust [2];
|
||||
ExileClientPostProcessingBackgroundBlur ppEffectCommit _respawnDelay;
|
||||
ExileClientBleedOutHeartbeatPlaying = false;
|
||||
ExileClientBleedOutCountDownDuration = _respawnDelay;
|
||||
ExileClientBleedOutCountDownEnd = time + _respawnDelay;
|
||||
_layer = "BIS_fnc_respawnCounter" call bis_fnc_rscLayer;
|
||||
_layer cutText ["", "plain"];
|
||||
missionnamespace setvariable ["RscRespawnCounter_description", format ["<t size='2' align='center'>%1</t>",selectRandom _descriptions]];
|
||||
missionnamespace setvariable ["RscRespawnCounter_colorID", 0];
|
||||
missionnamespace setvariable ["RscRespawnCounter_Custom", _respawnDelay];
|
||||
_layer cutRsc ["RscRespawnCounter", "plain"];
|
||||
showChat true;
|
||||
"Start bleeding out..." call ExileClient_util_log;
|
||||
if(ExileClientBleedOutThread isEqualTo -1)then
|
||||
{
|
||||
ExileClientBleedOutThread = [2, ExileClient_object_player_thread_bleedToDeath, [], true] call ExileClient_system_thread_addtask;
|
||||
};
|
||||
|
||||
|
||||
true
|
@ -60,6 +60,7 @@ if (hasInterface) then {
|
||||
[] execVM "Custom\EnigmaRevive\compiles.sqf";
|
||||
player setVariable ['EnigmaRevivePermitted', false, true];
|
||||
player setVariable["antidupe", 1, true];
|
||||
player setVariable ["REVIVE", true, true];
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////////////EventHandlers//////////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user