v1.5.9.1 (Summer Update Hotfix 2)

This commit is contained in:
Regalis11
2024-06-27 16:46:33 +03:00
parent 85e5d806e6
commit 4f556236b8
31 changed files with 410 additions and 131 deletions
@@ -525,6 +525,7 @@ namespace Barotrauma
ushort infoID = inc.ReadUInt16();
string newName = inc.ReadString();
string originalName = inc.ReadString();
bool renamingEnabled = inc.ReadBoolean();
int tagCount = inc.ReadByte();
HashSet<Identifier> tagSet = new HashSet<Identifier>();
for (int i = 0; i < tagCount; i++)
@@ -538,7 +539,8 @@ namespace Barotrauma
Color skinColor = inc.ReadColorR8G8B8();
Color hairColor = inc.ReadColorR8G8B8();
Color facialHairColor = inc.ReadColorR8G8B8();
Identifier npcId = inc.ReadIdentifier();
Identifier factionId = inc.ReadIdentifier();
@@ -571,7 +573,8 @@ namespace Barotrauma
CharacterInfo ch = new CharacterInfo(speciesName, newName, originalName, jobPrefab, variant, npcIdentifier: npcId)
{
ID = infoID,
MinReputationToHire = (factionId, minReputationToHire)
MinReputationToHire = (factionId, minReputationToHire),
RenamingEnabled = renamingEnabled
};
ch.RecreateHead(tagSet.ToImmutableHashSet(), hairIndex, beardIndex, moustacheIndex, faceAttachmentIndex);
ch.Head.SkinColor = skinColor;
@@ -357,6 +357,7 @@ namespace Barotrauma
case EventType.Control:
bool myCharacter = msg.ReadBoolean();
byte ownerID = msg.ReadByte();
bool renamingEnabled = msg.ReadBoolean();
ResetNetState();
if (myCharacter)
{
@@ -385,6 +386,10 @@ namespace Barotrauma
}
IsRemotePlayer = ownerID > 0;
}
if (info != null)
{
info.RenamingEnabled = renamingEnabled;
}
break;
case EventType.Status:
ReadStatus(msg);