From c671cf96614405723bff0bfc737292eac9feb449 Mon Sep 17 00:00:00 2001 From: ebayShopper Date: Tue, 21 Nov 2017 16:30:19 -0500 Subject: [PATCH] Update player_death.sqf Vanilla commit: https://github.com/DayZMod/DayZ/commit/0e0ffa1d6eb04b94c90b0ef0551920b523d367d7 --- SQF/dayz_code/compile/player_death.sqf | 6 +++--- SQF/dayz_server/compile/server_playerDied.sqf | 2 +- Server Files/Battleye/scripts.txt | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/SQF/dayz_code/compile/player_death.sqf b/SQF/dayz_code/compile/player_death.sqf index 5b76664b2..f4764c8c1 100644 --- a/SQF/dayz_code/compile/player_death.sqf +++ b/SQF/dayz_code/compile/player_death.sqf @@ -29,8 +29,8 @@ _camera camSetPos [_deathPos select 0, (_deathPos select 1) + 2, 5]; _camera camCommit 0; if (!_killed) then { - //Kill the player if they are not already dead so they respawn into new unit - _body setHit ["body",1]; + //Kill only if killed event handler has not already fired (respawnDelay=0 in description.ext) + player setDamage 1; }; if (dayz_onBack != "") then { @@ -74,7 +74,7 @@ if (!isNull _source) then { //Send Death Notice diag_log format["Player_Death: Body:%1 BodyName:%2 Infected:%3 SourceName:%4 SourceWeapon:%5 Distance:%6 Method:%7",_body,dayz_playerName,_infected,_sourceName,_sourceWeapon,_distance,_method]; -PVDZ_plr_Death = [dayz_characterID,0,_body,_playerID,toArray dayz_playerName,_infected,toArray _sourceName,toArray _sourceWeapon,_distance,_method]; //Send name as array to avoid publicVariable value restrictions +PVDZ_plr_Death = [dayz_characterID,0,_body,_playerID,toArray dayz_playerName,_infected,toArray _sourceName,_sourceWeapon,_distance,_method]; //Send name as array to avoid publicVariable value restrictions publicVariableServer "PVDZ_plr_Death"; _body setVariable ["deathType", if (_method == "suicide") then {"shot"} else {_method}, true]; diff --git a/SQF/dayz_server/compile/server_playerDied.sqf b/SQF/dayz_server/compile/server_playerDied.sqf index 796e7c9c5..b74d44523 100644 --- a/SQF/dayz_server/compile/server_playerDied.sqf +++ b/SQF/dayz_server/compile/server_playerDied.sqf @@ -10,7 +10,7 @@ _playerID = _this select 3; _playerName = toString (_this select 4); //Sent as array to avoid publicVariable value restrictions _infected = _this select 5; _sourceName = toString (_this select 6); -_sourceWeapon = toString (_this select 7); +_sourceWeapon = _this select 7; _distance = _this select 8; _method = _this select 9; diff --git a/Server Files/Battleye/scripts.txt b/Server Files/Battleye/scripts.txt index 31be07013..393c47902 100644 --- a/Server Files/Battleye/scripts.txt +++ b/Server Files/Battleye/scripts.txt @@ -29,7 +29,7 @@ 5 playableUnits !"for [{_y=0},{_y < count(playableUnits)},{_y=_y+1}] do {" !"typeName player == \"OBJECT\" && {(player in playableUnits" !"AND {((alive _x) AND {((vehicle _x) distance _obj < 150)})}} count playableUnits)}) then {" !="_local = { _unit distance _x < _dis; } count playableUnits <= 1;" !"if (!_isOk) exitWith {false};\nuiSleep 0.001;\n} forEach playableUnits;" !"ManagementMustBeClose) then { player nearEntities [\"CAManBase\", 10] } else { playableUnits };" 5 selectPlayer !"addSwitchableUnit dayz_originalPlayer;\nsetPlayable dayz_originalPlayer;\nselectPlayer dayz_originalPlayer;" !"addSwitchableUnit _newUnit;\nsetPlayable _newUnit;\nselectPlayer _newUnit;" 5 serverCommand !="_character = if (serverCommandAvailable \"#kick\") then { call sched_tg_follow } else { player };" !"serverCommand (\"#vote kick \" + _selectedName);" -5 setDamage !"([4654,9595,0] nearestObject 145259) setDamage 1;\n([4654,9595,0] nearestObject 145260) setDamage 1;" !"if (_entity isKindOf \"Animal\") then {\n_entity setDamage 1;" !"player setDamage 1;\n\nif (dayz_onBack != \"\") then {\n_body addWeapon dayz_onBack;" !"if (_ent isKindOf \"Animal\" || _ent isKindOf \"zZombie_base\") then {\n_ent setDamage 1;" +5 setDamage !"([4654,9595,0] nearestObject 145259) setDamage 1;\n([4654,9595,0] nearestObject 145260) setDamage 1;" !"if (_entity isKindOf \"Animal\") then {\n_entity setDamage 1;" !"player setDamage 1;\n};\n\nif (dayz_onBack != \"\") then {\n_body addWeapon dayz_onBack;" !"if (_ent isKindOf \"Animal\" || _ent isKindOf \"zZombie_base\") then {\n_ent setDamage 1;" 5 setDammage 5 SetEventHandler !"\n_menu ctrlSetEventHandler [\"ButtonClick\",_compile];\n};" !"inGameUISetEventHandler [\"Action\",\"false\"];" 5 setMarkerAlpha