Servers can disable the disguise feature. Closes #568

This commit is contained in:
Joonas Rikkonen
2018-08-14 16:06:23 +03:00
parent 1e02d7406d
commit 4866a89253
5 changed files with 29 additions and 2 deletions
@@ -144,6 +144,10 @@ namespace Barotrauma
{
get
{
if (GameMain.Server != null && !GameMain.Server.AllowDisguises) return Name;
#if CLIENT
if (GameMain.Client != null && !GameMain.Client.AllowDisguises) return Name;
#endif
return info != null && !string.IsNullOrWhiteSpace(info.Name) ? info.Name + (info.DisplayName != info.Name ? " (as " + info.DisplayName + ")" : "") : SpeciesName;
}
}