Browse Source

Change `SetName()` to always trigger signals

pull/8/head
Anton Tarasenko 3 years ago
parent
commit
c93f5899a2
  1. 7
      sources/Players/EPlayer.uc

7
sources/Players/EPlayer.uc

@ -238,8 +238,7 @@ public final function Text GetOriginalName()
* Returns current displayed name of the caller player. * Returns current displayed name of the caller player.
* *
* @return `Text` containing current name of the caller player. * @return `Text` containing current name of the caller player.
* Guaranteed to not be `none`. Returned object is not managed by caller * Guaranteed to not be `none`.
* `EPlayer` and should be manually deallocated.
*/ */
public final function Text GetName() public final function Text GetName()
{ {
@ -265,10 +264,6 @@ public final function SetName(Text newPlayerName)
if (replicationInfo == none) { if (replicationInfo == none) {
return; return;
} }
if (ConvertTextNameIntoString(newPlayerName) == replicationInfo.playerName)
{
return;
}
oldPlayerName = _.text.FromFormattedString(replicationInfo.playerName); oldPlayerName = _.text.FromFormattedString(replicationInfo.playerName);
replicationInfo.playerName = CensorPlayerName(oldPlayerName, newPlayerName); replicationInfo.playerName = CensorPlayerName(oldPlayerName, newPlayerName);
_.memory.Free(oldPlayerName); _.memory.Free(oldPlayerName);

Loading…
Cancel
Save