bool scan_transparent = false;
bool scan_secondary_targets = false;
+ bool have_secondary_targets = false;
while(true)
{
scan_secondary_targets = false;
if(!scan_secondary_targets)
{
if(head.classname == "misc_breakablemodel")
+ {
+ have_secondary_targets = true;
continue;
+ }
}
else
{
}
}
- if(!best && !scan_secondary_targets)
+ if(!best && have_secondary_targets && !scan_secondary_targets)
{
scan_secondary_targets = true;
+ // restart the loop
head = head2;
bestrating = 100000000;
}