If you're using trig, then there is usually a simpler way to do it.

Search around the forum for the topics on collision and you'll find more help.
Code: Select all
glVertex3f(1.0f, 0.0f, 0.0f);
Oh cool :D.Moosader wrote:I added the game to the Pickin' Sticks directory, and also uploaded the game download to my host as well > http://pickinsticks.moosader.com/.
Do you have a website I can link to?
Thanks, lol it's a possibility; I've always liked real-time combat so that's just how I made it.eatcomics wrote:Dude that's sweet, keep us updated :D I was expecting like a turn based battle system lol but that was pretty cool :D
I know that's what you meantXianForce wrote:That looks fine, but here are a few suggestions:
Ooops, actually I meant to do:
Just a safety thing in case FindEmptyIndex() returns something different.Code: Select all
battleships[emptyIndex] = new Battleship();
Thanks!XianForce wrote:That looks fine, but here are a few suggestions:
...
So I think that should probably work.
Code: Select all
if (emptyIndex >= 0)
{
battleships[FindEmptyIndex()] = new Battleship;
}