Does UTIL_PointContents return anything useful? garry
On Thu, Sep 18, 2008 at 8:19 AM, Andrew Watkins <[EMAIL PROTECTED]> wrote: > Hey all, very simple question that I can't seem to find the answer to - how > to tell if a point is outside the game world or not? > > I've added an ability allowing players to teleport a short distance, > including through walls, to our HL2MP OB mod. This is great, and the code > successfully avoids getting the player stuck inside world brushes or > anything else when teleporting. It is unfortunately possible for them to > teleport to completely outside the world geometry, and I can't work out how > to stop this. I've tried my hull traces using various likely-looking masks & > collision groups, and have looked at all the UTIL_PointContents flags, but I > can't see how to determine if a point is outside the world or not. > > I've also looked through gamemovement.cpp, as players don't fall when they > teleport outside the world, so something must be stopping them, as they > aren't "in a solid" - but nothing jumps out at me. So, does anyone know how > to determine if a point / trace / entity is completely outside the world > geometry? > > The best "hacky" method I can come up with is testing if a > several-thousand-unit-long trace can be done in any direction > (up/down/n/s/e/w), and if any can, assume its outside. I'm sure there's a > point contents method, but I can't work it out. Help would be appreciated. > > Thanks > > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, please > visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > > _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders