Skip to content

Commit

Permalink
Disable killing in lobby as a fake impostor
Browse files Browse the repository at this point in the history
  • Loading branch information
scp222thj committed Jun 22, 2024
1 parent 0bed5d7 commit 71fc005
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Patches/PlayerControlPatches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,13 @@ public static class PlayerControl_CmdCheckMurder
// Prefix patch of PlayerControl.CmdCheckMurder to always bypass checks when killing players
public static bool Prefix(PlayerControl __instance, PlayerControl target){

if (Utils.isLobby){
HudManager.Instance.Notifier.AddDisconnectMessage("Killing in lobby disabled for being too buggy");
return false;
}

// Direct kill RPC should only be used when absolutely necessary as to avoid detection from anticheat mods
if (Utils.isLobby || CheatToggles.killAnyone || Utils.isMeeting || (MalumPPMCheats.oldRole != null && Utils.getBehaviourByRoleType((AmongUs.GameOptions.RoleTypes)MalumPPMCheats.oldRole).IsImpostor)){
if (CheatToggles.killAnyone || Utils.isMeeting || (MalumPPMCheats.oldRole != null && Utils.getBehaviourByRoleType((AmongUs.GameOptions.RoleTypes)MalumPPMCheats.oldRole).IsImpostor)){
__instance.isKilling = false;

if (!__instance.Data.Role.IsValidTarget(target.Data))
Expand Down

0 comments on commit 71fc005

Please sign in to comment.