> Bare in mind I have a limited grasp of the HL engine so this may be quite
simple
> an I'm just oblivious.
>
> Anyhow, as you all may (or may not) know, entites can be used through
world
> geometry. For example, you have a wall mounted health recharger and you as
long
> as the wall is not too thick and you can go around back of it, you can use
the
> health charger, through the wall.  My goal here is to simply know how to
keep the
> user from being able to use entities through a wall.

Use a UTIL_TraceLine() to trace a line from the player's origin to the brush
model origin (VecBModelOrigin).  If the trace completes (tr.flFraction ==
1.0) then the player is on the same side of the wall as the brush model.  If
the trace doesn't complete, return from the USE function (of the brush model
entity) before USEing the entity.

Jeffrey "botman" Broome

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to