possible hotfix

This commit is contained in:
happydayz 2016-07-07 23:00:17 +10:00
parent 79e695f5c5
commit dbe830198e
3 changed files with 133 additions and 153 deletions

View File

@ -22,12 +22,15 @@ _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 {
if ((player distance (_target modelToWorld _bodypos2))<((_target modelToWorld _bodypos1) distance player)) then
{
_healPlace = "_bodypos2";
_action = "medicStart";
_bodypos = _bodypos2;
@ -46,7 +49,6 @@ if (_target getVariable "EnigmaRevivePermitted") then {
sleep 0.001;
player removeMagazine "Exile_Item_Defibrillator";
_position = _target modelToWorld _defibpos;
_lootHolder = createVehicle ["LootWeaponHolder", _position, [], 0, "CAN_COLLIDE"];
@ -55,18 +57,22 @@ if (_target getVariable "EnigmaRevivePermitted") then {
_lootHolder setDir ((getDir _target) + _defibangle);
if (_primaryw == "") then {
if (_primaryw == "") then
{
_target switchMove "AinjPpneMstpSnonWrflDnon";
sleep 0.2;
player playMove "AinvPknlMstpSlayWrflDnon_medic";
} else {
if (currentWeapon player != _primaryw) then {
}
else
{
if (currentWeapon player != _primaryw) then
{
player selectWeapon _primaryw;
sleep 2;
};
player playActionNow _action;
_timer = 15;
waitUntil { animationState player in _Anims };
@ -75,31 +81,38 @@ if (_target getVariable "EnigmaRevivePermitted") then {
sleep _timer;
detach player;
if (_primaryw == "") then {
if (_primaryw == "") then
{
player switchmove "";
} else {
}
else
{
player switchAction "medicStart";
player playActionNow "medicStop";
};
if (_target getVariable["REVIVE", true]) then {
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 {
}
else
{
systemChat Format ["RIP %1! They are too far gone!",_targetname];
};
} else {
}
else
{
systemChat Format ["RIP %1! They suffered a fatal injury!",_targetname];
};
};
} else {
}
else
{
systemChat Format ["RIP %1! They suffered a fatal injury!",_targetname];
};

View File

@ -11,10 +11,10 @@
private["_respawnDelay","_layer","_descriptions"];
_respawnDelay = _this;
/////////////////////////////////added by happydayz/////////////////////////////////////
oldgroup = group player;
if (player getVariable["REVIVE", true]) then {
if (player getVariable["REVIVE", true]) then
{
_descriptions =
[
@ -24,62 +24,10 @@ _descriptions =
"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",
@ -107,6 +55,23 @@ _descriptions =
"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];
@ -117,5 +82,6 @@ if(ExileClientBleedOutThread isEqualTo -1)then
{
ExileClientBleedOutThread = [2, ExileClient_object_player_thread_bleedToDeath, [], true] call ExileClient_system_thread_addtask;
};
};
true

View File

@ -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//////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////