]> git.deb.at Git - rhonda/theotherroles.git/commitdiff
fix snitch bug with evil lobby host main snitch-host-bug
authorRhonda D'Vine <rhonda@deb.at>
Sat, 5 Sep 2026 17:35:03 +0000 (19:35 +0200)
committerRhonda D'Vine <rhonda@deb.at>
Sat, 5 Sep 2026 17:35:03 +0000 (19:35 +0200)
When the lobby host is a an evil role it isn't shown due to a race
condition in cleaning the playerRoom too quickly. Moving the cleaning
room gives the host time to send the correct information before it gets
cleaned.

TheOtherRoles/Patches/MeetingPatch.cs

index f022048c4adfa0da481bf2e6dd1c00b1d46a9d02..05e1dd52178e4bb609ef3ab648014165026ba80c 100644 (file)
@@ -749,6 +749,7 @@ namespace TheOtherRoles.Patches {
                                     output += "- " + RoleInfo.GetRolesString(p, false, false, true) + ", was last seen " + roomName + "\n";
                                 }
                                 FastDestroyableSingleton<HudManager>.Instance.Chat.AddChat(Snitch.snitch, $"{output}");
                                     output += "- " + RoleInfo.GetRolesString(p, false, false, true) + ", was last seen " + roomName + "\n";
                                 }
                                 FastDestroyableSingleton<HudManager>.Instance.Chat.AddChat(Snitch.snitch, $"{output}");
+                                Snitch.playerRoomMap = new Dictionary<byte, byte>();
                             }
                         })));
                     }
                             }
                         })));
                     }
@@ -757,7 +758,6 @@ namespace TheOtherRoles.Patches {
                 if (PlayerControl.LocalPlayer.Data.IsDead && output != "") FastDestroyableSingleton<HudManager>.Instance.Chat.AddChat(PlayerControl.LocalPlayer, $"{output}");
 
                 Trapper.playersOnMap = new ();
                 if (PlayerControl.LocalPlayer.Data.IsDead && output != "") FastDestroyableSingleton<HudManager>.Instance.Chat.AddChat(PlayerControl.LocalPlayer, $"{output}");
 
                 Trapper.playersOnMap = new ();
-                Snitch.playerRoomMap = new Dictionary<byte, byte>();
 
                 // Remove revealed traps
                 Trap.clearRevealedTraps();
 
                 // Remove revealed traps
                 Trap.clearRevealedTraps();