From 4e8736464f69ef5d235835e0cf3ed21947994c18 Mon Sep 17 00:00:00 2001 From: Eisbison Date: Mon, 8 Nov 2021 17:11:05 +0100 Subject: [PATCH] v2.9.2 --- README.md | 5 +++++ TheOtherRoles/Helpers.cs | 3 ++- TheOtherRoles/Main.cs | 2 +- TheOtherRoles/Patches/UpdatePatch.cs | 5 ++++- TheOtherRoles/TheOtherRoles.csproj | 2 +- 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ff1e28e..95a5881 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ The [Role Assignment](#role-assignment) sections explains how the roles are bein # Releases | Among Us - Version| Mod Version | Link | |----------|-------------|-----------------| +| 2021.6.30s| v2.9.2| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v2.9.2/TheOtherRoles.zip) | 2021.6.30s| v2.9.1| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v2.9.1/TheOtherRoles.zip) | 2021.6.30s| v2.9.0| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v2.9.0/TheOtherRoles.zip) | 2021.6.30s| v2.8.1| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v2.8.1/TheOtherRoles.zip) @@ -78,6 +79,10 @@ The [Role Assignment](#role-assignment) sections explains how the roles are bein
Click to show the Changelog +**Hotfix 2.9.2** +- Fixed a bug where the names of all players were visible during camouflage +- Fixed a bug where the Morphling didn't take over the name of its target + **Version 2.9.1** - Fixed a bug where [Camouflager](#camouflager) & [Morphling](#morphling) caused performance issues - Fixed a bug where [Medium](#medium) did not exlude the Evil [Mini](#mini) diff --git a/TheOtherRoles/Helpers.cs b/TheOtherRoles/Helpers.cs index 198ca2c..4b7824e 100644 --- a/TheOtherRoles/Helpers.cs +++ b/TheOtherRoles/Helpers.cs @@ -227,7 +227,8 @@ namespace TheOtherRoles { } public static bool hidePlayerName(PlayerControl source, PlayerControl target) { - if (!MapOptions.hidePlayerNames) return false; // All names are visible + if (Camouflager.camouflageTimer > 0f) return true; // No names are visible + else if (!MapOptions.hidePlayerNames) return false; // All names are visible else if (source == null || target == null) return true; else if (source == target) return false; // Player sees his own name else if (source.Data.IsImpostor && (target.Data.IsImpostor || target == Spy.spy)) return false; // Members of team Impostors see the names of Impostors/Spies diff --git a/TheOtherRoles/Main.cs b/TheOtherRoles/Main.cs index 3104002..df2e5f6 100644 --- a/TheOtherRoles/Main.cs +++ b/TheOtherRoles/Main.cs @@ -21,7 +21,7 @@ namespace TheOtherRoles public class TheOtherRolesPlugin : BasePlugin { public const string Id = "me.eisbison.theotherroles"; - public const string VersionString = "2.9.1"; + public const string VersionString = "2.9.2"; public static System.Version Version = System.Version.Parse(VersionString); public Harmony Harmony { get; } = new Harmony(Id); diff --git a/TheOtherRoles/Patches/UpdatePatch.cs b/TheOtherRoles/Patches/UpdatePatch.cs index 3872f27..0160484 100644 --- a/TheOtherRoles/Patches/UpdatePatch.cs +++ b/TheOtherRoles/Patches/UpdatePatch.cs @@ -16,7 +16,10 @@ namespace TheOtherRoles.Patches { Dictionary playersById = Helpers.allPlayersById(); foreach (PlayerControl player in PlayerControl.AllPlayerControls) { - player.nameText.text = Helpers.hidePlayerName(PlayerControl.LocalPlayer, player) ? "" : player.Data.PlayerName; + String playerName = player.Data.PlayerName; + if (Morphling.morphTimer > 0f && Morphling.morphling == player && Morphling.morphTarget != null) playerName = Morphling.morphTarget.Data.PlayerName; // Temporary hotfix for the Morphling's name + + player.nameText.text = Helpers.hidePlayerName(PlayerControl.LocalPlayer, player) ? "" : playerName; if (PlayerControl.LocalPlayer.Data.IsImpostor && player.Data.IsImpostor) { player.nameText.color = Palette.ImpostorRed; } else { diff --git a/TheOtherRoles/TheOtherRoles.csproj b/TheOtherRoles/TheOtherRoles.csproj index 0cebdf5..c59decf 100644 --- a/TheOtherRoles/TheOtherRoles.csproj +++ b/TheOtherRoles/TheOtherRoles.csproj @@ -1,7 +1,7 @@ netstandard2.1 - 2.9.1 + 2.9.2 TheOtherRoles Eisbison -- 2.39.5