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

Double damage #232

Open
CeloTL opened this issue Dec 10, 2021 · 2 comments
Open

Double damage #232

CeloTL opened this issue Dec 10, 2021 · 2 comments

Comments

@CeloTL
Copy link

CeloTL commented Dec 10, 2021

The script has been evolving and correcting many errors, but there is an issue in effect which is double damage, where the offender can multiply the weapon's damage by 2x (with one hit).
I tried to block it with GetWeaponDamage, comparing it to the damage done, but without success.

@ADRFranklin
Copy link
Collaborator

Could you give us more information then this? I need a reproducible gamemode or code that can be used to verify this. I haven't seen this show up in my testing so far.

@NexiusTailer
Copy link
Contributor

NexiusTailer commented Feb 28, 2022

Cheaters can send a couple of OnPlayerGiveDamage per one shot, but if you try to limit it to "1 shot = 1 damage packet and no more" here, then most of the damage will stop passing between players on your server, because weapons with high rate of fire and some network delays often generate event order like this:

OnPlayerWeaponShot //Shot 1 fired
OnPlayerWeaponShot //Shot 2 fired
OnPlayerGiveDamage //Shot 1 did damage
OnPlayerGiveDamage //Shot 2 did damage

(not like that):

OnPlayerWeaponShot //Shot 1 fired
OnPlayerGiveDamage //Shot 1 did damage
OnPlayerWeaponShot //Shot 2 fired
OnPlayerGiveDamage //Shot 2 did damage

So, the current restrictions seem to be the most appropriate thing that could be done.

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

3 participants