Here is some code that malfunctions:
Code: Select all
if (lhold)
driver->draw2DRectangleOutline(recti(lholdx,lholdy,mousex,mousey),SColor(255,0,255,0));
//draw target lines
for (int j=0;j<=objcounter;j++) if ( object[j].orderedtoattack && object[j].target != -1 && object[j].target != -1 )
driver->draw3DLine(vector3df( object[j].posx , object[j].posy, object[j].posz),
vector3df(object[object[j].target].posx, object[object[j].target].posy, object[object[j].target].posz),
SColor(255,255,0,0) );
After an abstract amount of time, the target lines simply dissapear. The most confusing part is if I hold my left mouse button (so lhold is true) the lines appear! As if a dependancy was somehow created.
Im using VC++ EE. I even ported the code to another solution file with default configuration properties. Same thing.
This is very frustrating.... Can anyone offer insight?