Skip to content

Commit 4e87364

Browse files
committed
v2.9.2
1 parent b19fd9c commit 4e87364

File tree

5 files changed

+13
-4
lines changed

5 files changed

+13
-4
lines changed

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ The [Role Assignment](#role-assignment) sections explains how the roles are bein
3838
# Releases
3939
| Among Us - Version| Mod Version | Link |
4040
|----------|-------------|-----------------|
41+
| 2021.6.30s| v2.9.2| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v2.9.2/TheOtherRoles.zip)
4142
| 2021.6.30s| v2.9.1| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v2.9.1/TheOtherRoles.zip)
4243
| 2021.6.30s| v2.9.0| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v2.9.0/TheOtherRoles.zip)
4344
| 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
7879
<details>
7980
<summary>Click to show the Changelog</summary>
8081

82+
**Hotfix 2.9.2**
83+
- Fixed a bug where the names of all players were visible during camouflage
84+
- Fixed a bug where the Morphling didn't take over the name of its target
85+
8186
**Version 2.9.1**
8287
- Fixed a bug where [Camouflager](#camouflager) & [Morphling](#morphling) caused performance issues
8388
- Fixed a bug where [Medium](#medium) did not exlude the Evil [Mini](#mini)

TheOtherRoles/Helpers.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,8 @@ public static KeyValuePair<byte, int> MaxPair(this Dictionary<byte, int> self, o
227227
}
228228

229229
public static bool hidePlayerName(PlayerControl source, PlayerControl target) {
230-
if (!MapOptions.hidePlayerNames) return false; // All names are visible
230+
if (Camouflager.camouflageTimer > 0f) return true; // No names are visible
231+
else if (!MapOptions.hidePlayerNames) return false; // All names are visible
231232
else if (source == null || target == null) return true;
232233
else if (source == target) return false; // Player sees his own name
233234
else if (source.Data.IsImpostor && (target.Data.IsImpostor || target == Spy.spy)) return false; // Members of team Impostors see the names of Impostors/Spies

TheOtherRoles/Main.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace TheOtherRoles
2121
public class TheOtherRolesPlugin : BasePlugin
2222
{
2323
public const string Id = "me.eisbison.theotherroles";
24-
public const string VersionString = "2.9.1";
24+
public const string VersionString = "2.9.2";
2525
public static System.Version Version = System.Version.Parse(VersionString);
2626

2727
public Harmony Harmony { get; } = new Harmony(Id);

TheOtherRoles/Patches/UpdatePatch.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ static void resetNameTagsAndColors() {
1616
Dictionary<byte, PlayerControl> playersById = Helpers.allPlayersById();
1717

1818
foreach (PlayerControl player in PlayerControl.AllPlayerControls) {
19-
player.nameText.text = Helpers.hidePlayerName(PlayerControl.LocalPlayer, player) ? "" : player.Data.PlayerName;
19+
String playerName = player.Data.PlayerName;
20+
if (Morphling.morphTimer > 0f && Morphling.morphling == player && Morphling.morphTarget != null) playerName = Morphling.morphTarget.Data.PlayerName; // Temporary hotfix for the Morphling's name
21+
22+
player.nameText.text = Helpers.hidePlayerName(PlayerControl.LocalPlayer, player) ? "" : playerName;
2023
if (PlayerControl.LocalPlayer.Data.IsImpostor && player.Data.IsImpostor) {
2124
player.nameText.color = Palette.ImpostorRed;
2225
} else {

TheOtherRoles/TheOtherRoles.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<TargetFramework>netstandard2.1</TargetFramework>
4-
<Version>2.9.1</Version>
4+
<Version>2.9.2</Version>
55
<Description>TheOtherRoles</Description>
66
<Authors>Eisbison</Authors>
77
</PropertyGroup>

0 commit comments

Comments
 (0)