Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Detecting fired weapons

 
Post new topic   Reply to topic Printable version
 View previous topic  funky:autowarp Post :: Post same problems here  View next topic  
Author Message
Initrd.gz
Seasoned Helper


Joined: Sep 18 2008
Posts: 134
Location: Over there --->
Offline

PostPosted: Tue Dec 16, 2008 9:08 pm    Post subject: Detecting fired weapons Reply to topic Reply with quote

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? biggrin.gif). 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):
Code: Show/Hide
struct C2SPosition *pos = (struct C2SPosition *)p2;


Ps writing this in python

Thanks

offtopic: asss.yi.org down? icon_confused.gif
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Dr Brain
Flip-flopping like a wind surfer


Age:39
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Tue Dec 16, 2008 10:00 pm    Post subject: Reply to topic Reply with quote

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.
_________________
Hyperspace Owner

Smong> so long as 99% deaths feel lame it will always be hyperspace to me
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Initrd.gz
Seasoned Helper


Joined: Sep 18 2008
Posts: 134
Location: Over there --->
Offline

PostPosted: Fri Dec 19, 2008 10:56 am    Post subject: Reply to topic Reply with quote

K. Anyway to do it with python? Ty for the help
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> ASSS Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 43 page(s) served in previous 5 minutes.

phpBB Created this page in 0.564647 seconds : 27 queries executed (78.9%): GZIP compression disabled