In games where players have a high ping, they can get disconnected if
they try and murder a player twice. If a player tries to kill a player
again while they are still under a cooldown from their previous kill,
cancel their request if the game is server authoritive and don't process
it anymore if the game is host authoritive
{
if (!PlayerInfo.CanMurder(Game, _dateTimeProvider))
{
- if (await sender.Client.ReportCheatAsync(RpcCalls.CheckMurder, "Client tried to murder too fast"))
+ if (IsMurdering == target)
+ {
+ // This request was made too quickly by spamming the kill button, cancel it if we're in server authoritive mode
+ return _game.IsHostAuthoritive;
+ }
+ else if (await sender.Client.ReportCheatAsync(RpcCalls.CheckMurder, "Client tried to murder too fast"))
{
return false;
}