From 5d248886890fca82382b53c051bd6937946439ea Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 31 Mar 2023 04:54:41 +0200 Subject: [PATCH] ignore ennemies behind wall --- cheat.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cheat.py b/cheat.py index ddf26e3..e9486ae 100644 --- a/cheat.py +++ b/cheat.py @@ -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"])