this should work with 1.0.1

This commit is contained in:
happydayz 2016-09-02 23:36:00 +10:00
parent f2ea160938
commit 60d0c12b20
5 changed files with 109 additions and 95 deletions

View File

@ -89,9 +89,7 @@ if (!local _requestingPlayer) then
_accountData = format["getAccountStats:%1", _requestingPlayerUID] call ExileServer_system_database_query_selectSingle; _accountData = format["getAccountStats:%1", _requestingPlayerUID] call ExileServer_system_database_query_selectSingle;
_group = call ExileServer_system_group_getOrCreateLoneWolfGroup; _bambiPlayer = (createGroup independent) createUnit ["Exile_Unit_Player", [0,0,0], [], 0, "CAN_COLLIDE"];
_bambiPlayer = _group createUnit["Exile_Unit_Player", _location, [], 0, "CAN_COLLIDE"];
removeHeadgear _bambiPlayer; removeHeadgear _bambiPlayer;
_bambiPlayer allowDammage false; _bambiPlayer allowDammage false;
_clanID = (_accountData select 3); _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;
};
};

View File

@ -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"]; private["_respawnDelay","_layer","_descriptions"];
_respawnDelay = _this; _respawnDelay = _this;
oldgroup = group player; oldgroup = group player;
@ -57,28 +47,47 @@ else
]; ];
}; };
// SPLASH
[100] call BIS_fnc_bloodEffect; [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 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 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 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; ExileClientPostProcessingColorCorrections ppEffectCommit _respawnDelay;
// Enable blur
ExileClientPostProcessingBackgroundBlur ppEffectAdjust [0]; ExileClientPostProcessingBackgroundBlur ppEffectAdjust [0];
ExileClientPostProcessingBackgroundBlur ppEffectCommit 0; ExileClientPostProcessingBackgroundBlur ppEffectCommit 0;
ExileClientPostProcessingBackgroundBlur ppEffectEnable true; ExileClientPostProcessingBackgroundBlur ppEffectEnable true;
ExileClientPostProcessingBackgroundBlur ppEffectAdjust [2]; ExileClientPostProcessingBackgroundBlur ppEffectAdjust [2];
ExileClientPostProcessingBackgroundBlur ppEffectCommit _respawnDelay; ExileClientPostProcessingBackgroundBlur ppEffectCommit _respawnDelay;
// Our count down
ExileClientBleedOutHeartbeatPlaying = false; ExileClientBleedOutHeartbeatPlaying = false;
ExileClientBleedOutCountDownDuration = _respawnDelay; ExileClientBleedOutCountDownDuration = _respawnDelay;
ExileClientBleedOutCountDownEnd = time + _respawnDelay; ExileClientBleedOutCountDownEnd = time + _respawnDelay;
player setVariable ["BleedoutCountDownEnd", ExileClientBleedOutCountDownEnd, true];
// BIS count down GUI
_layer = "BIS_fnc_respawnCounter" call bis_fnc_rscLayer; _layer = "BIS_fnc_respawnCounter" call bis_fnc_rscLayer;
_layer cutText ["", "plain"]; _layer cutText ["", "plain"];
missionnamespace setvariable ["RscRespawnCounter_description", format ["<t size='2' align='center'>%1</t>",selectRandom _descriptions]]; missionnamespace setvariable ["RscRespawnCounter_description", format ["<t size='2' align='center'>%1</t>",selectRandom _descriptions]];
missionnamespace setvariable ["RscRespawnCounter_colorID", 0]; missionnamespace setvariable ["RscRespawnCounter_colorID", 0];
missionnamespace setvariable ["RscRespawnCounter_Custom", _respawnDelay]; missionnamespace setvariable ["RscRespawnCounter_Custom", _respawnDelay];
_layer cutRsc ["RscRespawnCounter", "plain"]; _layer cutRsc ["RscRespawnCounter", "plain"];
// Force enable chat
showChat true; showChat true;
"Start bleeding out..." call ExileClient_util_log; "Start bleeding out..." call ExileClient_util_log;
// Bleed to death (every 2 seconds)
if(ExileClientBleedOutThread isEqualTo -1)then if(ExileClientBleedOutThread isEqualTo -1)then
{ {
ExileClientBleedOutThread = [2, ExileClient_object_player_thread_bleedToDeath, [], true] call ExileClient_system_thread_addtask; ExileClientBleedOutThread = [2, ExileClient_object_player_thread_bleedToDeath, [], true] call ExileClient_system_thread_addtask;

View File

@ -9,44 +9,55 @@
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
*/ */
private["_cancelEvent","_container"];
_cancelEvent = false; _cancelEvent = false;
_container = _this select 1; _container = _this select 1;
try
{
if (ExileIsPlayingRussianRoulette) then
{
throw true;
};
if (ExileClientIsHandcuffed) then if (ExileClientIsHandcuffed) then
{ {
_cancelEvent = true; throw true;
} };
else
{
if (ExileClientActionDelayShown) then if (ExileClientActionDelayShown) then
{ {
_cancelEvent = true; throw true;
} };
else
{ // Dont double-place walls while in construction mode
if (ExileClientIsInConstructionMode) then if (ExileClientIsInConstructionMode) then
{ {
_cancelEvent = true; throw true;
} };
else
{ // Cannot access locked vehicles
if ((locked _container) isEqualTo 2) then if ((locked _container) isEqualTo 2) then
{ {
_cancelEvent = true; throw true;
} };
else
// Cannot access locked containers
if (_container getVariable ["ExileIsLocked", 1] isEqualTo -1) then
{ {
if ((_container getVariable ["ExileIsLocked", 1] isEqualTo -1) || (_container getVariable["antidupe", 1]) isEqualTo -1) then //added revive dupe test -- happdayz throw true;
{ };
_cancelEvent = true; // Cannot access in progress revive player inventories
} if ((_container getVariable["antidupe", 1]) isEqualTo -1) then
else
{ {
throw true;
};
ExileClientInventoryOpened = true; ExileClientInventoryOpened = true;
ExileClientCurrentInventoryContainer = _container; ExileClientCurrentInventoryContainer = _container;
}
catch
{
_cancelEvent = _exception;
}; };
};
}; _cancelEvent
};
};
_cancelEvent // OKAY!

View File

@ -68,6 +68,8 @@ player setVariable["antidupe", 1, true];
_packet = _this select 1; _packet = _this select 1;
_newPlayerObject = _packet select 0; _newPlayerObject = _packet select 0;
if (alive _newPlayerObject) then if (alive _newPlayerObject) then
{
if (isPlayer _newPlayerObject) then
{ {
cutText ["","BLACK IN",20]; cutText ["","BLACK IN",20];
[100] call BIS_fnc_bloodEffect; [100] call BIS_fnc_bloodEffect;
@ -85,14 +87,20 @@ player setVariable["antidupe", 1, true];
ExileClientPlayerIsBambi = false; ExileClientPlayerIsBambi = false;
false call ExileClient_gui_hud_toggleBambiIcon; false call ExileClient_gui_hud_toggleBambiIcon;
player setVariable["antidupe", 1, true]; //remove the antidupe from the revived player! player setVariable["antidupe", 1, true]; //remove the antidupe from the revived player!
} }
else else
{ {
call ExileClient_object_player_death_forceRespawn; call ExileClient_object_player_death_forceRespawn;
}; };
}
else
{
call ExileClient_object_player_death_forceRespawn;
}; };
"EnigmaReviveFail" addPublicVariableEventHandler { "EnigmaReviveFail" addPublicVariableEventHandler
{
_packet = _this select 1; _packet = _this select 1;
_requestingPlayer = _packet select 0; _requestingPlayer = _packet select 0;
_revivername = _packet select 1; _revivername = _packet select 1;
@ -101,7 +109,8 @@ player setVariable["antidupe", 1, true];
call ExileClient_object_player_death_forceRespawn; //force kill player call ExileClient_object_player_death_forceRespawn; //force kill player
}; };
"EnigmaReviveMSG" addPublicVariableEventHandler { "EnigmaReviveMSG" addPublicVariableEventHandler
{
_packet = _this select 1; _packet = _this select 1;
_msg = _packet select 0; _msg = _packet select 0;
systemChat Format ["%1",_msg]; systemChat Format ["%1",_msg];