View Single Post
Re: current Sourcecode
Old
  (#5)
sPlOrYgOn
<-- He did it.
 
sPlOrYgOn's Avatar
 
Status: Offline
Posts: 1,558
Join Date: Jan 2004
Location: Los Angeles, California, USA, North America, Earth, Solar System, Milky Way.
Default Re: current Sourcecode - 31-05-2004

well I found out == does have a higher precedence..
so it would check if (1 << CS_WEAPON_GRENADE) is equal to 0 then AND it with pEdict->v.weapons..
I added parenthesis around so it looks like this:
((pEdict->v.weapons & (1<< CS_WEAPON_GRENADE)) == 0)

and you said knowing anything other than operator precedence is a waste...
meaning if someone knew about everything else except for operator precedence it is a waste meaning everyone must know all about operator precedence or it is a waste..

[edit]
I just copied the operator precedence table out of "The C++ Programming Language: Special Edition" for an easier reference
http://www.mapzap.org/op.html
[/edit]

Last edited by sPlOrYgOn; 31-05-2004 at 19:08..
  
Reply With Quote