Browse Source

Add `GetOriginalName()` method to `EPlayer`

pull/8/head
Anton Tarasenko 3 years ago
parent
commit
010f9ac414
  1. 15
      sources/Players/EPlayer.uc

15
sources/Players/EPlayer.uc

@ -219,6 +219,21 @@ public final function User GetIdentity()
return identity;
}
/**
* Returns player's original name - the one he joined the game with.
*
* @return `Text` containing original name of the caller player.
* Guaranteed to not be `none`.
*/
public final function Text GetOriginalName()
{
local ConnectionService service;
local ConnectionService.Connection myConnection;
service = ConnectionService(class'ConnectionService'.static.Require());
myConnection = service.GetConnection(GetController());
return _.text.FromString(myConnection.originalName);
}
/**
* Returns current displayed name of the caller player.
*

Loading…
Cancel
Save