Skip to content

Commit

Permalink
Updated to account for new glow struct
Browse files Browse the repository at this point in the history
  • Loading branch information
Snaacky committed Jul 23, 2021
1 parent d0c9bb8 commit 921462f
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions diamond.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import pymem
import pymem.process

dwEntityList = (0x4D4B104)
dwGlowObjectManager = (0x5292F20)
m_iGlowIndex = (0xA428)
m_iTeamNum = (0xF4)
dwEntityList = 0x4DA31EC
dwGlowObjectManager = 0x52EB678
m_iGlowIndex = 0xA438
m_iTeamNum = 0xF4


def main():
Expand All @@ -23,18 +23,18 @@ def main():
entity_glow = pm.read_int(entity + m_iGlowIndex)

if entity_team_id == 2: # Terrorist
pm.write_float(glow_manager + entity_glow * 0x38 + 0x4, float(1)) # R
pm.write_float(glow_manager + entity_glow * 0x38 + 0x8, float(0)) # G
pm.write_float(glow_manager + entity_glow * 0x38 + 0xC, float(0)) # B
pm.write_float(glow_manager + entity_glow * 0x38 + 0x10, float(1)) # Alpha
pm.write_int(glow_manager + entity_glow * 0x38 + 0x24, 1) # Enable glow
pm.write_float(glow_manager + entity_glow * 0x38 + 0x8, float(1)) # R
pm.write_float(glow_manager + entity_glow * 0x38 + 0xC, float(0)) # G
pm.write_float(glow_manager + entity_glow * 0x38 + 0x10, float(0)) # B
pm.write_float(glow_manager + entity_glow * 0x38 + 0x14, float(1)) # Alpha
pm.write_int(glow_manager + entity_glow * 0x38 + 0x28, 1) # Enable glow

elif entity_team_id == 3: # Counter-terrorist
pm.write_float(glow_manager + entity_glow * 0x38 + 0x4, float(0)) # R
pm.write_float(glow_manager + entity_glow * 0x38 + 0x8, float(0)) # G
pm.write_float(glow_manager + entity_glow * 0x38 + 0xC, float(1)) # B
pm.write_float(glow_manager + entity_glow * 0x38 + 0x10, float(1)) # Alpha
pm.write_int(glow_manager + entity_glow * 0x38 + 0x24, 1) # Enable glow
pm.write_float(glow_manager + entity_glow * 0x38 + 0x8, float(0)) # R
pm.write_float(glow_manager + entity_glow * 0x38 + 0xC, float(0)) # G
pm.write_float(glow_manager + entity_glow * 0x38 + 0x10, float(1)) # B
pm.write_float(glow_manager + entity_glow * 0x38 + 0x14, float(1)) # Alpha
pm.write_int(glow_manager + entity_glow * 0x38 + 0x28, 1) # Enable glow


if __name__ == '__main__':
Expand Down

0 comments on commit 921462f

Please sign in to comment.