View Single Post
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,207

Old August 21st, 2019, 06:22 PM
First, just a best practice - in any foreach, you should always try to use the "from <component>"

So
Code:
foreach bootstrap in this from WeapQual
and
Code:
foreach pick in gizmo from WeapQual
That's a speed savings for HL.

Ok, I think I see what's going on - my example was from a vehicle, designed to handle the bootstraps that are coming from the vehicle, but not from the vehicle's entity.
Code:
foreach bootstrap in entity from WeaponQual
Would be the way to look inside the gun's entity. "foreach bootstrap in this" will look at the bootstraps outside the entity.
Mathias is offline   #9 Reply With Quote