Hopefully get names 100% of the time now

This commit is contained in:
icomrade
2014-06-13 14:13:51 -04:00
parent b113c2e353
commit a79e86ba33
4 changed files with 11 additions and 6 deletions

View File

@@ -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;};

View File

@@ -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;

View File

@@ -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</HEAD>*/
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

View File

@@ -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];