News for hackers. Stuff that matters.
Re:Game Hacking – Valve Anti-Cheat (VAC) by tines on Thursday June 19, 2025 @03:21AM (#44316313)
How do you determine whether the mouse is over an enemy head? Is there some variable the engine maintains for that?
Re:Game Hacking – Valve Anti-Cheat (VAC) by CaptainFever on Thursday June 19, 2025 @04:05AM (#44316489)
No experience, but I think the game seems to track it? The default crosshair seems to change depending on what you're aiming at.
Re:Game Hacking – Valve Anti-Cheat (VAC) by ChocolateGod on Thursday June 19, 2025 @03:52AM (#44316444)
Read the player position and camera from memory, read enemies positions from memory, use basic maths to detect if camera is pointing at an enemy.

or the game engine could track internally what the player is looking at (GTA does this).

Re:Game Hacking – Valve Anti-Cheat (VAC) by dminik on Thursday June 19, 2025 @06:47AM (#44317346)
For Counter-Strike 1.6, source and GO your crosshair would change and indicate that you are aiming at a player. Not sure about CS2, but wouldn't rule it out either.

It's a bit slow, but you could grab the player ID, then check if the player is on your team or not and then fire. Either by sending a mouse input, or if I remember correctly by writing to a specific address.

However, with enough knowledge (which is mostly documented online) you could actually pull out the hitbox, skeleton and animation data and just run the line-box intersection step yourself. Easier to do internally by hooking in-game functions though.