Skip to content

Commit

Permalink
Update Main.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
developer9998 committed Sep 9, 2024
1 parent 3059468 commit c56fb34
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions GorillaShirts/Behaviours/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ public async Task InitCatalog()
{
Logging.Info("Using shirt from previous session '" + myShirt.DisplayName + "' in pack '" + myPack.DisplayName + "'");
SelectedShirt = myShirt;
UpdatePlayerHash();
UpdatePlayerHash(true);
}
}
}
Expand Down Expand Up @@ -508,7 +508,7 @@ public void Update()

public void UpdatePlayerHash(bool shouldToggleShirt = false)
{
Shirt currentShirt = SelectedShirt;
Shirt currentShirt = shouldToggleShirt ? SelectedShirt : LocalRig.Rig.Shirt;

if (currentShirt != null && currentShirt == LocalRig.Rig.Shirt && shouldToggleShirt)
{
Expand Down Expand Up @@ -647,11 +647,12 @@ public void CheckHash(Player targetPlayer, Hashtable changedProps)
{
CustomProperties = changedProps;
LocalRig.Rig.NameTagOffset = Configuration.CurrentTagOffset.Value;
Stand.Display.SetTag(Configuration.CurrentTagOffset.Value);
}
else if (shirtRig.Rig.NameTagOffset != tagOffset)
else
{
Logging.Info($"{targetPlayer.NickName} has a name tag offset of {tagOffset}");
shirtRig.Rig.NameTagOffset = tagOffset;
shirtRig.Rig.OffsetNameTag(tagOffset);
}

string wornGorillaShirt = (string)gsHash[0];
Expand Down

0 comments on commit c56fb34

Please sign in to comment.