diff --git a/@Enigma/addons/enigma_exile_revive.pbo b/@Enigma/addons/enigma_exile_revive.pbo
index 1eea71e..4dc1c7c 100644
Binary files a/@Enigma/addons/enigma_exile_revive.pbo and b/@Enigma/addons/enigma_exile_revive.pbo differ
diff --git a/@Enigma/addons/enigma_exile_revive/compile/Enigma/Exile_RevivePlayer.sqf b/@Enigma/addons/enigma_exile_revive/compile/Enigma/Exile_RevivePlayer.sqf
index 220a108..aad4ad4 100644
--- a/@Enigma/addons/enigma_exile_revive/compile/Enigma/Exile_RevivePlayer.sqf
+++ b/@Enigma/addons/enigma_exile_revive/compile/Enigma/Exile_RevivePlayer.sqf
@@ -89,9 +89,7 @@ if (!local _requestingPlayer) then
_accountData = format["getAccountStats:%1", _requestingPlayerUID] call ExileServer_system_database_query_selectSingle;
- _group = call ExileServer_system_group_getOrCreateLoneWolfGroup;
-
- _bambiPlayer = _group createUnit["Exile_Unit_Player", _location, [], 0, "CAN_COLLIDE"];
+ _bambiPlayer = (createGroup independent) createUnit ["Exile_Unit_Player", [0,0,0], [], 0, "CAN_COLLIDE"];
removeHeadgear _bambiPlayer;
_bambiPlayer allowDammage false;
_clanID = (_accountData select 3);
@@ -343,17 +341,4 @@ call ExileServer_system_network_send_to;
};
};
-//test to see if this stops duping
-
-
- [] spawn
- {
- uiSleep 4;
- if (isNull _player) then
- {
- diag_log "EnigmaRevive - Something went horribly wrong!";
- [_player] joinSilent ExileServerGraveyardGroup;
- deleteVehicle _player;
- };
- };
diff --git a/Exile.Altis/Custom/EnigmaRevive/ExileClient_object_player_death_startBleedingOut.sqf b/Exile.Altis/Custom/EnigmaRevive/ExileClient_object_player_death_startBleedingOut.sqf
index 3c7d74c..7cfe451 100644
--- a/Exile.Altis/Custom/EnigmaRevive/ExileClient_object_player_death_startBleedingOut.sqf
+++ b/Exile.Altis/Custom/EnigmaRevive/ExileClient_object_player_death_startBleedingOut.sqf
@@ -1,15 +1,5 @@
-/**
- * ExileClient_object_player_death_startBleedingOut
- *
- * Exile Mod
- * www.exilemod.com
- * © 2015 Exile Mod Team
- *
- * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
- * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
- */
-
private["_respawnDelay","_layer","_descriptions"];
+
_respawnDelay = _this;
oldgroup = group player;
@@ -57,32 +47,51 @@ 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;
- player setVariable ["BleedoutCountDownEnd", ExileClientBleedOutCountDownEnd, true];
- _layer = "BIS_fnc_respawnCounter" call bis_fnc_rscLayer;
- _layer cutText ["", "plain"];
- missionnamespace setvariable ["RscRespawnCounter_description", format ["%1",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;
- };
+// SPLASH
+[100] call BIS_fnc_bloodEffect;
+
+// Fade to gray instantly
+//ExileClientPostProcessingColorCorrections ppEffectAdjust [1, 1.1, -0.05, [0.4, 0.2, 0.3, -0.1], [0.79, 0.72, 0.62, 0], [0.5,0.5,0.5,0], [0,0,0,0,0,0,4]];
+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;
+
+// Fade to red slowy
+//ExileClientPostProcessingColorCorrections ppEffectAdjust [1, 1.1, -0.05, [0.4, 0.2, 0.3, -0.1], [0.3, 0.05, 0, 0], [0.5,0.5,0.5,0], [0,0,0,0,0,0,4]];
+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;
+
+// Enable blur
+ExileClientPostProcessingBackgroundBlur ppEffectAdjust [0];
+ExileClientPostProcessingBackgroundBlur ppEffectCommit 0;
+ExileClientPostProcessingBackgroundBlur ppEffectEnable true;
+ExileClientPostProcessingBackgroundBlur ppEffectAdjust [2];
+ExileClientPostProcessingBackgroundBlur ppEffectCommit _respawnDelay;
+
+// Our count down
+ExileClientBleedOutHeartbeatPlaying = false;
+ExileClientBleedOutCountDownDuration = _respawnDelay;
+ExileClientBleedOutCountDownEnd = time + _respawnDelay;
+
+// BIS count down GUI
+_layer = "BIS_fnc_respawnCounter" call bis_fnc_rscLayer;
+_layer cutText ["", "plain"];
+
+missionnamespace setvariable ["RscRespawnCounter_description", format ["%1",selectRandom _descriptions]];
+missionnamespace setvariable ["RscRespawnCounter_colorID", 0];
+missionnamespace setvariable ["RscRespawnCounter_Custom", _respawnDelay];
+
+_layer cutRsc ["RscRespawnCounter", "plain"];
+
+// Force enable chat
+showChat true;
+
+"Start bleeding out..." call ExileClient_util_log;
+
+// Bleed to death (every 2 seconds)
+if(ExileClientBleedOutThread isEqualTo -1)then
+{
+ ExileClientBleedOutThread = [2, ExileClient_object_player_thread_bleedToDeath, [], true] call ExileClient_system_thread_addtask;
+};
true
\ No newline at end of file
diff --git a/Exile.Altis/Custom/EnigmaRevive/ExileClient_object_player_event_onInventoryOpened.sqf b/Exile.Altis/Custom/EnigmaRevive/ExileClient_object_player_event_onInventoryOpened.sqf
index 53319fb..eaea28e 100644
--- a/Exile.Altis/Custom/EnigmaRevive/ExileClient_object_player_event_onInventoryOpened.sqf
+++ b/Exile.Altis/Custom/EnigmaRevive/ExileClient_object_player_event_onInventoryOpened.sqf
@@ -8,45 +8,56 @@
* This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
*/
-
-private["_cancelEvent","_container"];
+
_cancelEvent = false;
_container = _this select 1;
-if (ExileClientIsHandcuffed) then
-{
- _cancelEvent = true;
-}
-else
+
+try
{
+ if (ExileIsPlayingRussianRoulette) then
+ {
+ throw true;
+ };
+
+ if (ExileClientIsHandcuffed) then
+ {
+ throw true;
+ };
+
if (ExileClientActionDelayShown) then
{
- _cancelEvent = true;
- }
- else
- {
- if (ExileClientIsInConstructionMode) then
- {
- _cancelEvent = true;
- }
- else
- {
- if ((locked _container) isEqualTo 2) then
- {
- _cancelEvent = true;
- }
- else
- {
- if ((_container getVariable ["ExileIsLocked", 1] isEqualTo -1) || (_container getVariable["antidupe", 1]) isEqualTo -1) then //added revive dupe test -- happdayz
- {
- _cancelEvent = true;
- }
- else
- {
- ExileClientInventoryOpened = true;
- ExileClientCurrentInventoryContainer = _container;
- };
- };
- };
+ throw true;
};
+
+ // Dont double-place walls while in construction mode
+ if (ExileClientIsInConstructionMode) then
+ {
+ throw true;
+ };
+
+ // Cannot access locked vehicles
+ if ((locked _container) isEqualTo 2) then
+ {
+ throw true;
+ };
+
+ // Cannot access locked containers
+ if (_container getVariable ["ExileIsLocked", 1] isEqualTo -1) then
+ {
+ throw true;
+ };
+ // Cannot access in progress revive player inventories
+ if ((_container getVariable["antidupe", 1]) isEqualTo -1) then
+ {
+ throw true;
+ };
+
+ ExileClientInventoryOpened = true;
+ ExileClientCurrentInventoryContainer = _container;
+}
+catch
+{
+ _cancelEvent = _exception;
};
-_cancelEvent // OKAY!
\ No newline at end of file
+
+_cancelEvent
\ No newline at end of file
diff --git a/Exile.Altis/Custom/EnigmaRevive/init.sqf b/Exile.Altis/Custom/EnigmaRevive/init.sqf
index f545c64..bc2d77a 100644
--- a/Exile.Altis/Custom/EnigmaRevive/init.sqf
+++ b/Exile.Altis/Custom/EnigmaRevive/init.sqf
@@ -64,11 +64,13 @@ player setVariable["antidupe", 1, true];
//////////////////////////////////////////////////////////////////////////////////////EventHandlers//////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
"EnigmaRevive" addPublicVariableEventHandler {
- private["_newPlayerObject","_oldPlayerObject","_packet","_weapon","_reviver"];
- _packet = _this select 1;
- _newPlayerObject = _packet select 0;
- if (alive _newPlayerObject) then
- {
+private["_newPlayerObject","_oldPlayerObject","_packet","_weapon","_reviver"];
+_packet = _this select 1;
+_newPlayerObject = _packet select 0;
+if (alive _newPlayerObject) then
+{
+ if (isPlayer _newPlayerObject) then
+ {
cutText ["","BLACK IN",20];
[100] call BIS_fnc_bloodEffect;
"Reviving player..." call ExileClient_util_log;
@@ -85,14 +87,20 @@ player setVariable["antidupe", 1, true];
ExileClientPlayerIsBambi = false;
false call ExileClient_gui_hud_toggleBambiIcon;
player setVariable["antidupe", 1, true]; //remove the antidupe from the revived player!
+
}
else
{
call ExileClient_object_player_death_forceRespawn;
};
+}
+else
+{
+ call ExileClient_object_player_death_forceRespawn;
};
-"EnigmaReviveFail" addPublicVariableEventHandler {
+"EnigmaReviveFail" addPublicVariableEventHandler
+{
_packet = _this select 1;
_requestingPlayer = _packet select 0;
_revivername = _packet select 1;
@@ -101,7 +109,8 @@ player setVariable["antidupe", 1, true];
call ExileClient_object_player_death_forceRespawn; //force kill player
};
-"EnigmaReviveMSG" addPublicVariableEventHandler {
+"EnigmaReviveMSG" addPublicVariableEventHandler
+{
_packet = _this select 1;
_msg = _packet select 0;
systemChat Format ["%1",_msg];