Quote:
Originally Posted by DarthMan
He jsut told me not to sue TraceLine, becuz that ignores un-solid and SOLID_TRIGGER objects. The EntMod by DrunkenF00l was able to find SOLID_NOT too from a distance. Basically, ti could find every possible entity, even the water.
|
No, that's what you understood. I did not tell you not to use traceline, as there are workarounds for this, by adding more code instead of only using traceline.
You have to do something similar to your first code, but as you seem confused(mixing TR_ members) I suggested you to actually check what they mean. Anyway, what you have to do:
-make a traceline from player gun position
-check if you hit something with TR_pHit.
-if it's 0 then you have to get the end position with TR_vecEndPos and search around that origin with find_sphere_class, get the entity that's closer to your origin(if there are more entities) and that's what you should hit. This is a workaround, BECAUSE SOLID_TRIGGER ENTS AREN'T HIT BY TRACELINE.
__________________