I think, the few lines of code are not enough to find the error.
If you want me to check it, please send me the entire source code
(email: s_buschmann@gmx.de)
But i try a guess :
When you checked the collision, you used the same index variable
for the bot and for the laser. But why should they always be the same?
I think the collision detection should be done this way:
code:for (i=0; i<=MAX_BOB; i++){ for (j=0; j<=MAX_LASER; j++) { if (Collision_BOBS(&laser[j],⊥) && bot.state == BOT_STATE_ON)<BR> {<BR> laser[j].state = LASER_STATE_OFF;<BR> start_Burst(laser[j].x,laser[j].y,<BR> 68+rand()%12,54+rand()%10,<BR> bot.xv>>1,bot.yv>>1);<BR> bot.state = BOT_STATE_OFF;<BR> }<BR> }<BR>}<BR></pre><HR></BLOCKQUOTE><P>But this is just a guess.<P>good luck!<P><BR>——————<BR>Philippo<BR>s_buschmann@gmx.de <A HREF="http://privat.schlund.de/Gerio" TARGET=_blank>http://privat.schlund.de/Gerio</A> <P><BR>[This message has been edited by Philippo (edited October 22, 1999).]<P>[This message has been edited by Philippo (edited October 22, 1999).]<p>[This message has been edited by Philippo (edited October 22, 1999).]