Inside3D!
     

self.weapon = 3?

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming
View previous topic :: View next topic  
Author Message
Junrall



Joined: 21 Sep 2009
Posts: 136
Location: North West Oregon, USA

PostPosted: Sun Apr 18, 2010 12:15 am    Post subject: self.weapon = 3? Reply with quote

Looking through items.qc and noticed that the grenade launcher, rocket launcher, and lightning gun have self.weapon set to 3.
What gives?
Shouldn't they be set to IT_GRENADE_LAUNCHER, IT_ROCKET_LAUNCHER, IT_LIGHTNING?
_________________
Good God! You shot my leg off!
Back to top
View user's profile Send private message
Orion



Joined: 12 Jan 2007
Posts: 413
Location: Brazil

PostPosted: Sun Apr 18, 2010 1:54 am    Post subject: Reply with quote

It doesn't make any difference. It's not used at all.
You can even remove that lines from the weapon_whatever functions that, when you pick up a gun, nothing abnormal will happen.

In weapon_touch(), I think ID would use other.items = other.items | self.weapon instead of new at first. But then, they changed the code.

There are some lines on certain functions that are just excess fat... Just compile the vanilla QC source with FTEQCC and you'll get lots of warnings like "whatever no references".
_________________
There's no signature here. Stop looking for one.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot 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


Powered by phpBB © 2004 phpBB Group