diff --git a/SQF/dayz_code/compile/player_death.sqf b/SQF/dayz_code/compile/player_death.sqf index 1a0ef2984..98b44dcd1 100644 --- a/SQF/dayz_code/compile/player_death.sqf +++ b/SQF/dayz_code/compile/player_death.sqf @@ -2,7 +2,9 @@ private ["_display","_body","_playerID","_array","_source","_method","_canHitFre disableSerialization; if (deathHandled) exitWith {}; deathHandled = true; - +if ((alive player) && {isNil {dayz_playerName}}) then { + dayz_playerName = name player; +}; //Prevent client freezes _display = findDisplay 49; if(!isNull _display) then {_display closeDisplay 0;}; diff --git a/SQF/dayz_code/init/variables.sqf b/SQF/dayz_code/init/variables.sqf index 22e9b9737..1c54a7d5a 100644 --- a/SQF/dayz_code/init/variables.sqf +++ b/SQF/dayz_code/init/variables.sqf @@ -671,7 +671,6 @@ if(!isDedicated) then { dayz_guiHumanity = -90000; dayz_firstGroup = group player; dayz_originalPlayer = player; - dayz_playerName = name player; dayz_sourceBleeding = objNull; dayz_clientPreload = false; dayz_authed = false; diff --git a/SQF/dayz_code/system/player_monitor.fsm b/SQF/dayz_code/system/player_monitor.fsm index e48188405..8990ec5c8 100644 --- a/SQF/dayz_code/system/player_monitor.fsm +++ b/SQF/dayz_code/system/player_monitor.fsm @@ -169,8 +169,8 @@ link85[] = {75,57}; link86[] = {76,78}; link87[] = {77,76}; link88[] = {78,57}; -globals[] = {25.000000,1,0,0,0,640,480,1,143,6316128,1,-406.882782,405.863464,1403.492432,827.797180,864,612,1}; -window[] = {0,-1,-1,-1,-1,940,182,1671,182,1,882}; +globals[] = {25.000000,1,0,0,0,640,480,1,143,6316128,1,-280.065002,277.754272,1315.142944,920.020874,864,612,1}; +window[] = {0,-1,-1,-1,-1,966,208,1697,208,1,882}; *//*%FSM*/ class FSM { @@ -1198,6 +1198,7 @@ class FSM "player allowDamage true;" \n "player enableSimulation true;" \n "0 cutText ["""", ""BLACK IN"",3];" \n + "dayz_playerName = name player;" \n "" \n "//Add core tools" \n "player addWeapon ""Loot"";" \n diff --git a/SQF/dayz_server/compile/server_playerDied.sqf b/SQF/dayz_server/compile/server_playerDied.sqf index ecddabe73..8c17c7d4c 100644 --- a/SQF/dayz_server/compile/server_playerDied.sqf +++ b/SQF/dayz_server/compile/server_playerDied.sqf @@ -5,8 +5,11 @@ _minutes = _this select 1; _newObject = _this select 2; _playerID = _this select 3; _infected = _this select 4; -_victimName = _this select 5; - +if (((count _this) >= 6) && {(typeName (_this select 5)) == "STRING"} && {(_this select 5) != ""}) then { + _victimName = _this select 5; +} else { + _victimName = if (alive _newObject) then {name _newObject;} else {"";}; +}; _victim = _newObject; _newObject setVariable ["bodyName", _victimName, true];