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

Imposters can sometimes kill players with shield #62

Open
gratisCobalt opened this issue Feb 26, 2021 · 10 comments
Open

Imposters can sometimes kill players with shield #62

gratisCobalt opened this issue Feb 26, 2021 · 10 comments

Comments

@gratisCobalt
Copy link

I don't know if this is really a bug but I didn't found it as a feature so....

If you are Joker you can be killed by an Imposter even if you got a shield.

@gratisCobalt
Copy link
Author

maybe this is just because of NA servers?

@nikander100
Copy link

This just happened in our game (will try to get a clip of it happening)

@rdroog
Copy link

rdroog commented Feb 26, 2021

It also happened in our game.

@nikander100
Copy link

Here is the clip: https://clips.twitch.tv/AlluringFairFlyM4xHeh-7Qy823vOpMbZ-ZUw

@pobby1092
Copy link

In our round it happened even with a shielded crewmate. My gues is, when 2 imposters are in the area around the shielded person, you kill kill him.

@benniii1337
Copy link

Yup, same happened in our game today. Shielded as a crewmate, experienced a kill nearby. Was happy to report, but got killed by the 2nd imposter. Nice double for them, but kinda bad for me 😢

We guessed some kind of desync behind that.

@nikander100
Copy link

In our round it happened even with a shielded crewmate. My gues is, when 2 imposters are in the area around the shielded person, you kill kill him.

Only one impostor pressed kill, i was the other and didnt press kill yet

@psibean
Copy link

psibean commented Mar 4, 2021

Edit: Ignore this comment, I shouldn't have been looking through here while half asleep.

If this really is an issue, the problem is here:

var isPlayerJokerAndCanDieToOfficer =
                        Main.Config.jokerCanDieToOfficer && target.isPlayerRole("Joker");
                    
                    writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId,
                        (byte) CustomRPC.OfficerKill, Hazel.SendOption.None, -1);
                    writer.Write(PlayerControl.LocalPlayer.PlayerId);
                    writer.Write(!target.isPlayerImmortal() &&
                        (isPlayerJokerAndCanDieToOfficer || target.Data.IsImpostor) ?
                        target.PlayerId : PlayerControl.LocalPlayer.PlayerId); // kill target or suicide
                    AmongUsClient.Instance.FinishRpcImmediately(writer);
                    PlayerControl.LocalPlayer.MurderPlayer(target);
                    PlayerControl.LocalPlayer.getModdedControl().LastAbilityTime = DateTime.UtcNow;

                    // attempted to kill shielded player
                    if (target.isPlayerImmortal())
                    {
                        writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId,
                            (byte) CustomRPC.AttemptSound, Hazel.SendOption.None, -1);
                        AmongUsClient.Instance.FinishRpcImmediately(writer);
                        BreakShield(false);
                    }

There's no target.isPlayerImmortal check prior to sending the OfficerKill, and the OfficerKill being sent acts out the kill, if this is a bug, then the breakShield(false) call in the OfficerKill case should also be removed.

If it is intended that the officer can kill a shielded joker, this should be made clearer in the readme.

Could blanket cover this by adding a target.isPlayerImmortal() return false in the MurderPlayerPatch#Prefix ?

@rdroog
Copy link

rdroog commented Mar 4, 2021

This is not related to the officer killing - please read the above comments: an imposter killed a crewmate and joker when that shouldn't be possible. No officer killing other people.

I assume that the target is wrong and that the original target is the closest player around, but that person is another imposter, and then the actual target to be killed isn't checked properly.

@NotHunter101
Copy link
Owner

NotHunter101 commented Mar 11, 2021

This is a known bug, and it is not strictly exclusive to the Joker. Refer to pobby1092's or rdroog's comment above for an accurate reason on why it happens. This will be fixed in a future update.

@NotHunter101 NotHunter101 changed the title Imposters can kill Joker with shield Imposters can kill players with shield Mar 11, 2021
@NotHunter101 NotHunter101 changed the title Imposters can kill players with shield Imposters can sometimes kill players with shield Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants