Re: [hlcoders] Is there an easy way to get an entity list client side?

2006-04-26 Thread Tim Holt
Thanks - had just found it :^)

I'm betting this is the basis for what I want to do - i'll just have to do my
own filtering by ent name, distance from query point, etc.

C_BaseEntityIterator iterator;
C_BaseEntity *pEnt;
while ( (pEnt = iterator.Next()) != NULL )
{
pEnt-Simulate();
}

Quoting Scott Loyd [EMAIL PROTECTED]:

 --
 [ Picked text/plain from multipart/alternative ]
 ClientEntityList()
 cliententitylist.cpp/.h

 On 4/25/06, Tim Holt [EMAIL PROTECTED] wrote:
 
  I would like to get an entity list for a client HUD element, ideally
  calling
  something like FindEntityByClassnameWithin on the client side.  The
  problem is,
  this is a server side thingey, so no luck.
 
  Any advice on a clean way to do this?   The console cl_showents command
  seems
  like it would be a good code example/model, but it doesn't seem to be
  actually
  implemented anywhere in the SDK (which makes me think it's non-trivial).
 
  ___
  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] Is there an easy way to get an entity list client side?

2006-04-25 Thread Jason Houston
--
[ Picked text/plain from multipart/alternative ]
Is this for specific types of entities?

For BG2 I was using messages to change hud data, Tjoppen used this instead

// Global list of client side team entities
CUtlVector C_Flag *  g_Flags;

//=
// C_Team functionality

//-
// Purpose:
//-
C_Flag::C_Flag()
{
m_sFlagName[0] = 0;//nullterm just in case
// Add myself to the global list of team entities
g_Flags.AddToTail( this );
}

C_Flag::~C_Flag()
{
g_Flags.FindAndRemove( this );
}


We can then use g_Flags anywhere we include the c_flag header.

--
Draco
--

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



Re: [hlcoders] Is there an easy way to get an entity list client side?

2006-04-25 Thread Tim Holt
I was looking at that code actually.  Ideally I'd like a solution that let me
query any kind of entity but I could probably live with specific ones.

Quoting Jason Houston [EMAIL PROTECTED]:

 --
 [ Picked text/plain from multipart/alternative ]
 Is this for specific types of entities?

 For BG2 I was using messages to change hud data, Tjoppen used this instead

 // Global list of client side team entities
 CUtlVector C_Flag *  g_Flags;


//=
 // C_Team functionality


//-
 // Purpose:

//-
 C_Flag::C_Flag()
 {
 m_sFlagName[0] = 0;//nullterm just in case
 // Add myself to the global list of team entities
 g_Flags.AddToTail( this );
 }

 C_Flag::~C_Flag()
 {
 g_Flags.FindAndRemove( this );
 }


 We can then use g_Flags anywhere we include the c_flag header.

 --
 Draco
 --

 ___
 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] Is there an easy way to get an entity list client side?

2006-04-25 Thread Scott Loyd
--
[ Picked text/plain from multipart/alternative ]
ClientEntityList()
cliententitylist.cpp/.h

On 4/25/06, Tim Holt [EMAIL PROTECTED] wrote:

 I would like to get an entity list for a client HUD element, ideally
 calling
 something like FindEntityByClassnameWithin on the client side.  The
 problem is,
 this is a server side thingey, so no luck.

 Any advice on a clean way to do this?   The console cl_showents command
 seems
 like it would be a good code example/model, but it doesn't seem to be
 actually
 implemented anywhere in the SDK (which makes me think it's non-trivial).

 ___
 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