ASSS Questions - Detecting fired weapons Initrd.gz - Tue Dec 16, 2008 9:08 pm Post subject: Detecting fired weapons
Hi. I am looking at hscore's hscore_wepevents.c file on how the module detects weapons for the ammo system. It uses a function called net->AddPacket, which links a function to monitor when a packet is sent (right? ). I was wondering how it got the weapons part out. I understand the case switch but not how it gets the value. The line is (line 20):
offtopic: asss.yi.org down? Dr Brain - Tue Dec 16, 2008 10:00 pm Post subject:
If the function gets called, then p2 must be a weapons packet (the length check is just to make extra sure). The line you quoted simply casts the pointer into a weapons packet pointer.
Initrd.gz - Fri Dec 19, 2008 10:56 am Post subject:
K. Anyway to do it with python? Ty for the help