-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck_fov.py
More file actions
45 lines (34 loc) · 1.3 KB
/
check_fov.py
File metadata and controls
45 lines (34 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import pymem
import struct
def check_vm_fov():
try:
pm = pymem.Pymem("cs2.exe")
client = pymem.process.module_from_name(pm.process_handle, "client.dll").lpBaseOfDll
# dwLocalPlayerPawn
# using config-like offset logic if possible, or just hardcode for testing if needed
# We need the offset for dwLocalPlayerPawn.
# In offsets.json it might be there.
# Let's assume standard offset or read from offsets.json
import json
with open('offsets.json', 'r') as f:
offs = json.load(f)
dwLocalPlayerPawn = offs['client.dll']['dwLocalPlayerPawn']
print(f"dwLocalPlayerPawn: {dwLocalPlayerPawn}")
pawn = pm.read_longlong(client + dwLocalPlayerPawn)
print(f"Pawn: {hex(pawn)}")
if not pawn:
return
# Check 9252 (m_flViewmodelFOV)
val = pm.read_float(pawn + 9252)
print(f"Value at 9252: {val}")
# Check nearby
for i in range(-20, 20, 4):
try:
v = pm.read_float(pawn + 9252 + i)
print(f"Offset {9252+i} ({hex(9252+i)}): {v}")
except:
pass
except Exception as e:
print(e)
if __name__ == "__main__":
check_vm_fov()