Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support


Post Reply 
Solutions to a few common problems.
Author Message
Thomas Offline
Frictional Games

Posts: 2,456
Joined: Apr 2006
Reputation: 44
Post: #3
RE: Solutions to a few common problems.

For the AiNodeContainer, I think a better fix would be:

Quote:cVector2l vGridPos(0);
if(mvGridSize.x >0)
vGridPos.x = (int)(vLocalPos.x / mvGridSize.x);
if(mvGridSize.y >0)
vGridPos.y = (int)(vLocalPos.y / mvGridSize.y);

Since other wise vGridPos might be uninitialized + it might be that the x-axis is 0 but not the y-axis of mvGridSize.
(This post was last modified: 08-02-2010 02:54 PM by Thomas.)
08-02-2010 02:53 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Solutions to a few common problems. - Thomas - 08-02-2010 02:53 PM



User(s) browsing this thread: 1 Guest(s)