Re: lagcomp.inc - Fixed lagcomp response -
Killa[DGZ] - 26.04.2017
Quote:
Originally Posted by Yashas
Where did you test?
|
It was tested live on DriftGodZ, with 10 players, playing M4DM as that was where we have the most issues of some players not taking damage correctly (appear to be bulletproof sometimes, but still bleed when shot).
A number of players reported an improvement with shot damage saying it was much faster than before.. and seemed like all shots fired were being accounted for.
But now I think about what you said a little.. my problem could've just be the same as your problem yashas with some people becoming somewhat bulletproof during combat an don't appear to take any damage?
The flaw is that fake killers can send information to OnPlayerGive/TakeDamage, which is now synced with this include.
For example I have always marked the victim in the OnPlayerGive/TakeDamage callbacks with the issuer ID+total damage dealt for OnPlayerDeath fake kill checks.. an hackers can still fake that, an have a little laugh about it to my admins.
Re: lagcomp.inc - Fixed lagcomp response -
Gammix - 26.04.2017
Update 26 April, 2017
- Fixed damage giving to issuer instead of player.
- Fixed anti-fake kill.
@Yashas: Here, test this script with a friend (once with lagcomp included and one without) and you'll see the difference)
What we basically tested is running around and meleeing. Secondly one player run sprint around and one shoots with M4. See the some bullets not being registered or the bell sound would not ring.
PHP Code:
main()
{
}
public OnPlayerRequestClass(playerid, classid)
{
return SetTimerEx("OnPlayerEnterClassSelection", 150, false, "i", playerid);
}
forward OnPlayerEnterClassSelection(playerid);
public OnPlayerEnterClassSelection(playerid)
{
return SpawnPlayer(playerid);
}
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
PlayerPlaySound(issuerid, 6401, 0.0, 0.0, 0.0);
return 1;
}
public OnPlayerSpawn(playerid)
{
SetPlayerPos(playerid, 1642.1957, -2334.4849, 13.5469);
GivePlayerWeapon(playerid, 31, 100);
GivePlayerWeapon(playerid, 16, 5);
GivePlayerWeapon(playerid, 3, 1);
return 1;
}
Re: lagcomp.inc - Fixed lagcomp response -
HydraHumza - 26.04.2017
Really nicely done. Thanks Gammix for such a awesome fix.
Re: lagcomp.inc - Fixed lagcomp response -
Kar - 26.04.2017
Player's must hate my server shooting then?
I handle my damage in OnPlayerTakeDamage because of all the trust issues on OnPlayerGiveDamage, so you're saying this fixes those 'trust' issues?
Re: lagcomp.inc - Fixed lagcomp response -
Gammix - 26.04.2017
Quote:
Originally Posted by Kar
Player's must hate my server shooting then?
I handle my damage in OnPlayerTakeDamage because of all the trust issues on OnPlayerGiveDamage, so you're saying this fixes those 'trust' issues?
|
Well wiki says OnPlayerGiveDamage can send inaccurate data but since i am doing most checks i guess its working pretty fin for now. I don't know what inaccurate data could it send?
Re: lagcomp.inc - Fixed lagcomp response -
Jefff - 26.04.2017
What about knife? and all types of explosions?
Re: lagcomp.inc - Fixed lagcomp response -
Gammix - 26.04.2017
Quote:
Originally Posted by Jefff
What about knife? and all types of explosions?
|
Yes, everything is covered. Because whenever you give damage anyways, OnPlayerGiveDamage is called.
Re: lagcomp.inc - Fixed lagcomp response -
Kar - 26.04.2017
Quote:
Originally Posted by Gammix
Yes, everything is covered. Because whenever you give damage anyways, OnPlayerGiveDamage is called.
|
The only advantage of this I can see from the raw code is, faster damage updating and having checking for exact values when damage is done, that is good so hackers can't sproof ridiculous damage values.
But what happens if a client proofs OnPlayerGiveDamage with those exact damage values?
Also, why use this over weapon-config?
Re: lagcomp.inc - Fixed lagcomp response -
Gammix - 26.04.2017
Quote:
Originally Posted by Kar
But what happens if a client proofs OnPlayerGiveDamage with those exact damage values?
|
What do you mean?
Quote:
Originally Posted by Kar
Also, why use this over weapon-config?
|
No, i just don't want to have custom heath progressbar so i made this. Ofcourse weapon-config is superior than this and uses the same logic here for giving damage.
Re: lagcomp.inc - Fixed lagcomp response -
Gammix - 29.04.2017
Update Removed.
Re: lagcomp.inc - Fixed lagcomp response -
Chaprnks - 29.04.2017
I was always interested in what lagcomp.inc was going to become, & now its integrated with a fully functional (& accurate) anticheat! Great work as always!
I suggest you make the casino/sprunk etc scripts in seperate .inc's that can be optionally attached. I love how simple this anticheat is, & it'd be a shame if it turned into the clusterfuck that Nex-AC has become (not necessarily a bad thing, just not my preference to have 10000 lines of code of #if defines when all I need is 1000 of them).
Re: lagcomp.inc - Fixed lagcomp response -
Gammix - 29.04.2017
Quote:
Originally Posted by Chaprnks
I was always interested in what lagcomp.inc was going to become, & now its integrated with a fully functional (& accurate) anticheat! Great work as always!
I suggest you make the casino/sprunk etc scripts in seperate .inc's that can be optionally attached. I love how simple this anticheat is, & it'd be a shame if it turned into the clusterfuck that Nex-AC has become (not necessarily a bad thing, just not my preference to have 10000 lines of code of #if defines when all I need is 1000 of them).
|
I'll make a separate include for anticheat. I have decided this to stay as a lagcomp only fix include.
Re: lagcomp.inc - Fixed lagcomp response -
gurmani11 - 29.04.2017
Quote:
Originally Posted by Gammix
I'll make a separate include for anticheat. I have decided this to stay as a lagcomp only fix include.
|
That's a good move lad.
Please have a look in this backtrace. i am printing every command i use.
PHP Code:
[14:51:26] [Command] gurmani11(0): /kill
[14:51:27] [debug] Run time error 4: "Array index out of bounds"
[14:51:27] [debug] Attempted to read/write array element at index 65535 in array of size 1000
[14:51:27] [debug] AMX backtrace:
[14:51:27] [debug] #0 0000bea8 in AC_ProcessDamage (&playerid=@0028c244 0, &issuerid=@0028c248 65535, &Float:amount=@0028c24c 2.64000, &weaponid=@0028c250 0, &bodypart=@0028c254 3) at H:\MyScripts\pawno\include\GAC.inc:566
[14:51:27] [debug] #1 0000f708 in public OnPlayerTakeDamage (playerid=0, issuerid=65535, Float:amount=2.64000, weaponid=0, bodypart=3) at H:\MyScripts\pawno\include\GAC.inc:989
Well this addition has fixed it, anyway heads up! because INAVLID_PLAYER_ID has bypassed from initial check In OnPlayerTakeDamage.
PHP Code:
if (issuerid != INVALID_PLAYER_ID && !AC_ProcessDamage(playerid, issuerid, amount, weaponid, bodypart))
return 1;
Re: lagcomp.inc - Fixed lagcomp response; custom weapon damage; serversided damage handling -
Dokins - 26.05.2017
I do, yeah but why would it trigger the include?
Re: lagcomp.inc - Fixed lagcomp response; custom weapon damage; serversided damage handling -
Abagail - 26.05.2017
Quote:
Originally Posted by Dokins
I do, yeah but why would it trigger the include?
|
It's likely that you're not checking if issuerid is valid before using it, the error doesn't seem to be from the include.
Re: lagcomp.inc - Fixed lagcomp response; custom weapon damage; serversided damage handling -
Konstantinos - 26.05.2017
Quote:
Originally Posted by Abagail
It's likely that you're not checking if issuerid is valid before using it, the error doesn't seem to be from the include.
|
It doesn't matter, this includes checks for that but
this part doesn't.
Re: lagcomp.inc - Fixed lagcomp response; custom weapon damage; serversided damage handling -
Dokins - 26.05.2017
So what part is the issue exactly?
Re: lagcomp.inc - Fixed lagcomp response; custom weapon damage; serversided damage handling -
Gammix - 26.05.2017
Quote:
Originally Posted by Dokins
So what part is the issue exactly?
|
I have an updated version of this include i haven't launched yet. Basically it only uses LC_ProcessDamage in OnPlayerGieDamage. Which will resolve the issue.
I'll be putting up the update soon today.
Re: lagcomp.inc - Fixed lagcomp response; custom weapon damage; serversided damage handling -
Dokins - 26.05.2017
Perfect, thanks very much.
Re: lagcomp.inc - Fixed lagcomp response; custom weapon damage; serversided damage handling -
Jefff - 26.05.2017
What about this part
Code:
SetPlayerHealth(damagedid, (health - armour));
if armour is lower than 0.0, (health - (-40.0)) = ?