sapphonie / StAC-tf2

steph's anticheat (StAC). a built-from-scratch sourcemod based solution to cheating in Team Fortress 2.
https://sappho.io
GNU General Public License v3.0
119 stars 22 forks source link

hook RunPlayerMove or a similar func to get usercmd values before any other func #88

Closed sapphonie closed 2 years ago

sapphonie commented 2 years ago

This would resolve #87 and all other possible plugin based false positives. Basically I'd like to detour one of these funcs and grab the usercmd data before any plugins get the chance to mess with it. At the moment there's not an OnPlayerRunCmdPre, so it'd have to be a dhooks detour. Annoying, but probably necessary.

kjsmita6 commented 2 years ago

(I was the one talking to you on Discord about this last night)

The plugin freecam was triggering SMAC's speedhack detection a lot. What we did as a work-around was use the forward SMAC_OnCheatDetected (not sure if that's the exact name, but you get the idea) and return Plugin_Stop to make SMAC ignore it. I don't think stac has a similar forward but could be a possible solution, which would allow plugin authors more control over it (but they would need to know about the issue in the first place).

sapphonie commented 2 years ago

(I was the one talking to you on Discord about this last night)

The plugin freecam was triggering SMAC's speedhack detection a lot. What we did as a work-around was use the forward SMAC_OnCheatDetected (not sure if that's the exact name, but you get the idea) and return Plugin_Stop to make SMAC ignore it. I don't think stac has a similar forward but could be a possible solution, which would allow plugin authors more control over it (but they would need to know about the issue in the first place).

This is an option, but plugins would have to implement it, whereas hooking PlayerMove would get me values before ANY plugin could mess with it, so I'll probably do that

sapphonie commented 2 years ago

NOT NEEDED with the merging of OnPlayerRunCmdPre in upstream sourcemod!!!! Will be implemented in #91

sapphonie commented 2 years ago

91