ignore ennemies behind wall

This commit is contained in:
Mylloon 2023-03-31 04:54:41 +02:00
parent c03f4929df
commit 5d24888689
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -332,7 +332,14 @@ class Cheat(Hack):
if mem.read_int(entity + offset["m_lifeState"]):
continue
# TODO: Ignore ennemies behind wall
# Don't aim at ennemy behind a wall
if not (
mem.read_int(entity + offset["m_bSpottedByMask"])
&
(1 << mem.read_int(
client_state + offset["dwClientState_GetLocalPlayer"]))
):
continue
# Find head
boneMatrix = mem.read_uint(entity + offset["m_dwBoneMatrix"])