02.09.2015, 01:15
Quote:
Great anticheat but needs more optimizations or other ways of checking instead of OnPlayerpdate
i did a benchmark with this Slice benchmark function Код:
Bench for ac_OnPlayerUpdate: executes, by average, 43.92 times/ms. |
http://forum.sa-mp.com/showpost.php?...9&postcount=23
I would still maintain tossing all this code into a single include is a monumental design flaw for an anti-cheat system there should be an include for EACH cheat. The design of this system is completely non-extensible and has some serious array indexing flaws. In my opinion this is an example of how NOT to design an anti-cheat system.
Look at these code examples for the ridiculousness of some of the design choices.
Код:
if(ac_i < AntiCheatInfo[playerid][acCall][13] + ac_Mtfc[13][0]) ac_FloodDetect(playerid, 13); else if(ac_i < AntiCheatInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27); else AntiCheatInfo[playerid][acFloodCount][13] = AntiCheatInfo[playerid][acFloodCount][27] = 0;
Код:
AntiCheatInfo[AntiCheatVehInfo[vehicleid][acDriver]][acNOPCount][4] = 0; AntiCheatInfo[AntiCheatVehInfo[vehicleid][acDriver]][acSetVehHealth] = health; AntiCheatInfo[AntiCheatVehInfo[vehicleid][acDriver]][acGtc][4] = GetTickCount();