mirror of
https://github.com/hpy/Enigma_Exile_Revive.git
synced 2024-08-30 16:52:15 +00:00
this should work with 1.0.1
This commit is contained in:
parent
f2ea160938
commit
60d0c12b20
Binary file not shown.
@ -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;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -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 ["<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;
|
||||
};
|
||||
// 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 ["<t size='2' align='center'>%1</t>",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
|
@ -9,44 +9,55 @@
|
||||
* 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!
|
||||
|
||||
_cancelEvent
|
@ -64,10 +64,12 @@ 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;
|
||||
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user