Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary code: Remove pet at dead players (Vanilla bug fixed long ago) #1310

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions Modules/Camouflague.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,6 @@ public static void CheckCamouflage()
foreach (var pc in Main.AllPlayerControls)
{
RpcSetSkin(pc);

// The code is intended to remove pets at dead players to combat a vanilla bug
if (!IsCamouflage && !pc.IsAlive())
{
pc.RpcSetPet("");
}
}
Utils.NotifyRoles(NoCache: true);
}
Expand Down
12 changes: 0 additions & 12 deletions Patches/PlayerContorolPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -759,18 +759,6 @@ public static bool Prefix(PlayerControl __instance, ref RoleTypes roleType)
return true;
}
}
[HarmonyPatch(typeof(PlayerControl), nameof(PlayerControl.Die))]
public static class PlayerControlDiePatch
{
public static void Postfix(PlayerControl __instance)
{
if (AmongUsClient.Instance.AmHost)
{
// 死者の最終位置にペットが残るバグ対応
__instance.RpcSetPet("");
}
}
}
[HarmonyPatch(typeof(PlayerControl), nameof(PlayerControl.MixUpOutfit))]
public static class PlayerControlMixupOutfitPatch
{
Expand Down
Loading