]> git.deb.at Git - rhonda/theotherroles.git/commitdiff
v2.9.2
authorEisbison <eisbison.creator@gmail.com>
Mon, 8 Nov 2021 16:11:05 +0000 (17:11 +0100)
committerEisbison <eisbison.creator@gmail.com>
Mon, 8 Nov 2021 16:11:05 +0000 (17:11 +0100)
README.md
TheOtherRoles/Helpers.cs
TheOtherRoles/Main.cs
TheOtherRoles/Patches/UpdatePatch.cs
TheOtherRoles/TheOtherRoles.csproj

index ff1e28eff0ad855844b1c3e05f944d27f617be19..95a588190956b55dd13bde82bb13fc20dfb097ab 100644 (file)
--- 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
 <details>
   <summary>Click to show the Changelog</summary>
 
+**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)
index 198ca2c5e165b2b7880afb5ec14658cf92503255..4b7824e694d642772d12cd290d72316912bd130b 100644 (file)
@@ -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
index 3104002336bbdd3b496574fba4be5719400a8b8f..df2e5f6bf93c30cd330b3d4eed5a6c7660293cba 100644 (file)
@@ -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);
index 3872f2772936f5e4884591cfab999819781d28a6..0160484ed70f53dafccfe68dd08c243897441204 100644 (file)
@@ -16,7 +16,10 @@ namespace TheOtherRoles.Patches {
             Dictionary<byte, PlayerControl> 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 {
index 0cebdf522d48ac02483efc00ba710e3aa4caf988..c59decfda2453c2381f743f1b629017efad86a33 100644 (file)
@@ -1,7 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
     <PropertyGroup>
         <TargetFramework>netstandard2.1</TargetFramework>
-        <Version>2.9.1</Version>
+        <Version>2.9.2</Version>
         <Description>TheOtherRoles</Description>
         <Authors>Eisbison</Authors>
     </PropertyGroup>