View Single Post
  #3  
Old 08-08-2010, 01:48 PM
DrakilorP2P DrakilorP2P is offline
Registered User
DrakilorP2P's Avatar
Join Date: Apr 2006
Posts: 755
DrakilorP2P is just really niceDrakilorP2P is just really nice
Quote:
Originally Posted by khortez View Post
And in temp.x , does(player.dir[1]) mean the first direction?
No, it's erroneous and means nothing.

These are the directions in numbers:
0: Up
1: Left
2: Down
3: Right


Quote:
Originally Posted by khortez View Post
In (temp.angle = (pi / 2) * (player.dir + 1);

Also does player.dir + 1 mean the first direction?
No, it's the player's current direction plus one. The entire line is used to convert the player's current direction into an angle value so it can be used with shoot().
Reply With Quote