Thanks guys. Tony, thats just what I was hoping for, it works perfectly. I hadn't realised that the void would count as CONTENTS_SOLID, but it does indeed.
----- Original Message ----- > Date: Thu, 18 Sep 2008 08:29:44 -0700 > From: "Tony Sergi" <[EMAIL PROTECTED]> > Subject: Re: [hlcoders] Detecting point is outside world > To: "Discussion of Half-Life Programming" > <[email protected]> > Message-ID: > <[EMAIL PROTECTED]> > Content-Type: text/plain; charset="US-ASCII" > > Pointcontents should return CONTENTS_SOLID if you're in the void. > Part of the map compilation process is to 'fill the outside' with > contents_solid. > > So a simple > If ( UTIL_PointContents( position ) & CONTENTS_SOLID ) ) > { > In a solid, or the void > } > > Should work. > > Noclip around and test it with this command: > CON_COMMAND_F( dbg_contents, "dbg contents", FCVAR_CHEAT ) > { > CBasePlayer *pPlayer = UTIL_GetCommandClient(); > if ( !pPlayer ) > return; > > int contents = UTIL_PointContents( pPlayer->GetAbsOrigin() ); > if ( contents & CONTENTS_SOLID ) > DevMsg("in solid\n"); > > DevMsg(" Contents: %i\n", contents ); > > } > > > -Tony > > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Andrew > Watkins > Sent: September-18-08 3:20 AM > To: [email protected] > Subject: [hlcoders] Detecting point is outside world > > 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 > > > > > ------------------------------ > > Message: 6 > Date: Thu, 18 Sep 2008 17:15:35 +0100 > From: "Andrew Ritchie" <[EMAIL PROTECTED]> > Subject: Re: [hlcoders] Old recorded demos > To: "Discussion of Half-Life Programming" > <[email protected]> > Message-ID: > <[EMAIL PROTECTED]> > Content-Type: text/plain; charset=ISO-8859-1 > > Wouldn't you also need the appropriate client/server libraries that match > up > with the version you recorded the demos in? > > On Thu, Sep 18, 2008 at 4:24 PM, Nick <[EMAIL PROTECTED]> wrote: > >> The only possible solution valve could do for such a thing is a version >> system. >> >> Valve GAME ENGINE demo control interface> >> >> Demoversion1.dll >> Demoversion2.dll >> Demoversion3.dll >> Demoversion4.dll <newest one is added instead of replacing the old one >> >> Every saved demo uses specific version ID that enables it to work with >> the previous Demoversion1.dll. >> >> As long as the "<demo control interface>" remains the same, or keeps >> the same functionality, it should last as long as the engine does. >> >> >> On Thu, Sep 18, 2008 at 9:28 AM, botman <[EMAIL PROTECTED]> >> wrote: >> > Nick wrote: >> >> A new format that won't have this problem? LOLOL >> > >> > Maybe they're going to store everything in a text file? XML? :) >> > >> > -- >> > Jeffrey "botman" Broome >> > >> > _______________________________________________ >> > 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 >> >> > > > ------------------------------ > > Message: 7 > Date: Thu, 18 Sep 2008 17:41:27 +0100 > From: "Garry Newman" <[EMAIL PROTECTED]> > Subject: Re: [hlcoders] Old recorded demos > To: "Discussion of Half-Life Programming" > <[email protected]> > Message-ID: > <[EMAIL PROTECTED]> > Content-Type: text/plain; charset=ISO-8859-1 > > I dunno. I'm guessing it could be even simpler than that. > > For the demo's you've only got to really record what things looked and > sounded like. So things like models, angles, positions, gestures. You > don't need to know all the internal data like reload timings etc.. > with the exceptions of data for HUD stuff, like health and ammo > counts. > > > garry > > > On Thu, Sep 18, 2008 at 4:24 PM, Nick <[EMAIL PROTECTED]> wrote: >> The only possible solution valve could do for such a thing is a version >> system. >> >> Valve GAME ENGINE demo control interface> >> >> Demoversion1.dll >> Demoversion2.dll >> Demoversion3.dll >> Demoversion4.dll <newest one is added instead of replacing the old one >> >> Every saved demo uses specific version ID that enables it to work with >> the previous Demoversion1.dll. >> >> As long as the "<demo control interface>" remains the same, or keeps >> the same functionality, it should last as long as the engine does. >> >> >> On Thu, Sep 18, 2008 at 9:28 AM, botman <[EMAIL PROTECTED]> >> wrote: >>> Nick wrote: >>>> A new format that won't have this problem? LOLOL >>> >>> Maybe they're going to store everything in a text file? XML? :) >>> >>> -- >>> Jeffrey "botman" Broome >>> >>> _______________________________________________ >>> 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 >> >> > > > > ------------------------------ > > Message: 8 > Date: Thu, 18 Sep 2008 19:13:29 +0100 > From: Tom Leighton <[EMAIL PROTECTED]> > Subject: Re: [hlcoders] Old recorded demos > To: Discussion of Half-Life Programming > <[email protected]> > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Yeah, exactly. HUD wise all it's gotta do is poll for changes (Likewise > for other networkvars). Find some way of storing all their values in a > structure that wont depend on game version. > > Garry Newman wrote: >> I dunno. I'm guessing it could be even simpler than that. >> >> For the demo's you've only got to really record what things looked and >> sounded like. So things like models, angles, positions, gestures. You >> don't need to know all the internal data like reload timings etc.. >> with the exceptions of data for HUD stuff, like health and ammo >> counts. >> >> >> garry >> >> >> On Thu, Sep 18, 2008 at 4:24 PM, Nick <[EMAIL PROTECTED]> wrote: >> >>> The only possible solution valve could do for such a thing is a version >>> system. >>> >>> Valve GAME ENGINE demo control interface> >>> >>> Demoversion1.dll >>> Demoversion2.dll >>> Demoversion3.dll >>> Demoversion4.dll <newest one is added instead of replacing the old one >>> >>> Every saved demo uses specific version ID that enables it to work with >>> the previous Demoversion1.dll. >>> >>> As long as the "<demo control interface>" remains the same, or keeps >>> the same functionality, it should last as long as the engine does. >>> >>> >>> On Thu, Sep 18, 2008 at 9:28 AM, botman <[EMAIL PROTECTED]> >>> wrote: >>> >>>> Nick wrote: >>>> >>>>> A new format that won't have this problem? LOLOL >>>>> >>>> Maybe they're going to store everything in a text file? XML? :) >>>> >>>> -- >>>> Jeffrey "botman" Broome >>>> >>>> _______________________________________________ >>>> 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 >>> >>> >>> >> >> _______________________________________________ >> 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 > > > > End of hlcoders Digest, Vol 7, Issue 25 > *************************************** _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders

