std::vector<Tower> t;
std::vector<Enemy> en;
for ( int a = 0; a < en.size(); a++ )
{
if ( !en[a].isAlive() )
{
bool hasBulletLocked = false;
for ( std::size_t b = 0; b < t.size(); b++ )
{
if ( t[a].getBullets().size() > 0 )
{
const std::vector<Bullet>& bullets = t[a].getBullets();
for ( std::size_t cc = 0; cc < bullets.size(); cc++ )
{
if ( bullets[cc].index == a && bullets[cc].isHit() )
{
hasBulletLocked = true;
break;
}
}
if ( hasBulletLocked )
break;
}
}
if ( !hasBulletLocked )
{
}
}
}
heres is the screenshot of watches: http://imgur.com/a/QvXGn
as you can see on the screenshot, theres nothing fishy on the watches
i dont know why but in debugger, it stops and yellow arrow pointing to this line
if ( bullets[cc].index == a && bullets[cc].isHit() )
as you can see in the code, theres no modification of any data there, its just looping through those vectors, except