[hlcoders] Detecting point is outside world

2008-09-18 Thread Andrew Watkins
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



Re: [hlcoders] How to do things

2008-09-18 Thread arch angel
Hmm it is helpful in a way but could you add me on steam friends
(arcangel845) or msn ([EMAIL PROTECTED]) please?

On Thu, Sep 18, 2008 at 12:07 AM, Chris Deegan [EMAIL PROTECTED] wrote:
 Not sure if this will help you at all, but my old plug-in is open
 source: http://zombiehorde.svn.sourceforge.net/viewvc/zombiehorde/

 Hopefully you will find a variety of goodies in there...(Note that this
 plug still works!)

 deegz

 arch angel wrote:
 LOL ^_^. Although some people figured it out like the guy made the
 mani plug-in I've emailed him.

 On Wed, Sep 17, 2008 at 8:12 PM, Maarten De Meyer [EMAIL PROTECTED] wrote:

 I'm very sorry but I can't help saying it:

 Welcome to Source development.


 I've only just got into the plug-in scene but I've got several years
 experience in C++, C# and Java. Thing that I'm confused about, is if
 I'm missing something. I was looking at in-game menus and saw a
 tutorial on sdk source wiki site. It uses the user message ShowMenu.
 It works fine but how did the person figure it out when there's no
 example of it being used in the source code. In trying to figure it
 out I looked up UserMessageBegin function only to find that there's
 no code for the function. Instead I find a interface class for a DLL.
 So I can't see a working example (where the functions used) and I
 can't see the functions code, so how on earth does anyone figure out
 how to use the function?

 I was also looking at colouring in user messages. I think
 UTIL_SayText2Filter does that but it uses the user message
 SayText2. That hasn't been declared in the source although because
 there's SayText it might not matter. I across a forum where they
 figured out you can use escape characters like \1 for yellow and \2
 for green. Once again there's doesn't seem to any example of that in
 the source code.

 What I want is to be able to create in-game menus and user messages
 with colouring (like in mani plug-in) but from what I see, I can't see
 how you can figure that out. When you don't have access to the
 complete code (you get a bunch of interfaces with no explanation). Am
 I missing something that big, please tell me I am?

 ___
 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



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



Re: [hlcoders] Detecting point is outside world

2008-09-18 Thread Kevin Ottalini
Andrew,
You could make a custom invisible (solid) tool brush (like 
teleport_clip) or see if you can test against player_clip perhaps that 
you would use in all your maps both in areas outside (or just in outside 
walls) and inside where you don't want players going.

Players attempting to go past that brush would be not allowed to teleport, 
bounced back to their starting position or just stop a certain distance from 
the brush.

I would guess that you could also use tools/trigger on a custom brush entity 
like trigger_teleport that you can test against, see if any of that code 
might be useful.

You must have some sort of testing going on already to make sure players 
don't teleport inside walls, solids, models (hollows inside the map 
structure?)and each other.

This way all you have to add is a (hopefully simple) test and make very 
simple changes to your maps and as a result you would have pretty good 
control over this feature.

qUiCkSiLvEr


- Original Message - 
From: Andrew Watkins
To: hlcoders@list.valvesoftware.com
Sent: Thursday, September 18, 2008 12:19 AM
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



Re: [hlcoders] Detecting point is outside world

2008-09-18 Thread Haza
You only need to do 2 traces on one axis. Since a map is supposed to be
completely enclosed. Aslong as the trace hits a brush in both directions,
then they are inside the world. You could also assume that aslong as a
player is not nocliping and their Z velocity is under like 1000 they are in
the world. If both are false, then you do the trace check, if the trace
doesn't hit twice then kill the player.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Andrew Watkins
Sent: Thursday, 18 September 2008 5:20 PM
To: hlcoders@list.valvesoftware.com
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



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



Re: [hlcoders] Detecting point is outside world

2008-09-18 Thread Garry Newman
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



Re: [hlcoders] Old recorded demos

2008-09-18 Thread botman
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



Re: [hlcoders] Old recorded demos

2008-09-18 Thread Nick
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



Re: [hlcoders] Detecting point is outside world

2008-09-18 Thread Tony Sergi
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: hlcoders@list.valvesoftware.com
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


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



Re: [hlcoders] Old recorded demos

2008-09-18 Thread Andrew Ritchie
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


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



Re: [hlcoders] Old recorded demos

2008-09-18 Thread Garry Newman
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



Re: [hlcoders] Old recorded demos

2008-09-18 Thread Tom Leighton
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



Re: [hlcoders] Old recorded demos

2008-09-18 Thread Nick
Yes, every new update to the demo system would mean including a new
DLL as well as keeping all of the previous DLL versions in existence.
It is a small price to pay to keep all of the
Demoversion(insertversionshere).dll on the hard drive. Hard drives are
getting half as expensive every 2 years. I would gladly have even
500mb of demoversion(1-84).dll if I knew that demos would last
forever. I should have made my previous email clear about keeping all
previous DLL. Sorry.

On Thu, Sep 18, 2008 at 11:15 AM, Andrew Ritchie [EMAIL PROTECTED] wrote:
 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


 ___
 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



Re: [hlcoders] Detecting point is outside world

2008-09-18 Thread Gayan Ediriweera
I don't think you can use traces because the map enclosure isn't
necessarily a convex shape. So you could imagine a point where a trace
in any direction would hit brushes which is still not a valid position
for the player.

Cheers

On Thu, Sep 18, 2008 at 5:49 PM, 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