diff --git a/@Enigma/addons/enigma_exile_revive.pbo b/@Enigma/addons/enigma_exile_revive.pbo index e1ac552..df453cb 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 7f59ee0..73d2b43 100644 --- a/@Enigma/addons/enigma_exile_revive/compile/Enigma/Exile_RevivePlayer.sqf +++ b/@Enigma/addons/enigma_exile_revive/compile/Enigma/Exile_RevivePlayer.sqf @@ -291,6 +291,7 @@ _extDB2Message call ExileServer_system_database_query_fireAndForget; if (_reviveused > MaxRevivesAllowed) then { _bambiPlayer setVariable ["REVIVE", false, true]; + _player setVariable ["REVIVE", false, true]; }; _msg = format ["%1 has been stabilised! You have been rewarded 100 Respect!",_name]; @@ -337,7 +338,22 @@ call ExileServer_system_network_send_to; _ownerID publicVariableClient "EnigmaRevive"; _player allowDamage true; - + }; }; -}; \ No newline at end of file +}; + +//test to see if this stops duping + + + [] spawn + { + uiSleep 4; + if !(isPlayer _player) then + { + diag_log "EnigmaRevive - Something went horribly wrong!"; + [_player] joinSilent ExileServerGraveyardGroup; + deleteVehicle _player; + }; + }; + diff --git a/Exile.Altis/Custom/EnigmaRevive/init.sqf b/Exile.Altis/Custom/EnigmaRevive/init.sqf index 00d8f66..f545c64 100644 --- a/Exile.Altis/Custom/EnigmaRevive/init.sqf +++ b/Exile.Altis/Custom/EnigmaRevive/init.sqf @@ -67,18 +67,29 @@ player setVariable["antidupe", 1, true]; private["_newPlayerObject","_oldPlayerObject","_packet","_weapon","_reviver"]; _packet = _this select 1; _newPlayerObject = _packet select 0; - cutText ["","BLACK IN",20]; - [100] call BIS_fnc_bloodEffect; - "Reviving player..." call ExileClient_util_log; - _layer = "BIS_fnc_respawnCounter" call bis_fnc_rscLayer; - _layer cutText ["", "plain"]; - "Removing bleed out thread..." call ExileClient_util_log; - [ExileClientBleedOutThread] call ExileClient_system_thread_removeTask; - ExileClientBleedOutThread = -1; - player setVariable ['EnigmaRevivePermitted', false, true]; - false call ExileClient_gui_postProcessing_toggleDialogBackgroundBlur; - true call ExileClient_gui_hud_toggle; - player setVariable["antidupe", 1, true]; //remove the antidupe from the revived player! + if (alive _newPlayerObject) then + { + cutText ["","BLACK IN",20]; + [100] call BIS_fnc_bloodEffect; + "Reviving player..." call ExileClient_util_log; + _layer = "BIS_fnc_respawnCounter" call bis_fnc_rscLayer; + _layer cutText ["", "plain"]; + "Removing bleed out thread..." call ExileClient_util_log; + [ExileClientBleedOutThread] call ExileClient_system_thread_removeTask; + ExileClientBleedOutThread = -1; + player setVariable ['EnigmaRevivePermitted', false, true]; + false call ExileClient_gui_postProcessing_toggleDialogBackgroundBlur; + true call ExileClient_gui_hud_toggle; + ["endBambiStateRequest"] call ExileClient_system_network_send; //remove bambi status (changed in some previous version to clientside control) + [ExileClientEndBambiStateThread] call ExileClient_system_thread_removeTask; + 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; + }; }; "EnigmaReviveFail" addPublicVariableEventHandler { @@ -86,8 +97,8 @@ player setVariable["antidupe", 1, true]; _requestingPlayer = _packet select 0; _revivername = _packet select 1; systemChat Format ["%1 bungled your revive and killed you!",_revivername]; - player setVariable["antidupe", 1, true]; //remove the antidupe from the revived player! - [] call ExileClient_gui_escape_respawn; //force kill player + player setVariable["antidupe", 1, true]; //remove the antidupe from the revived player! + call ExileClient_object_player_death_forceRespawn; //force kill player }; "EnigmaReviveMSG" addPublicVariableEventHandler {