This looks much improved, thanks a lot, Alfred!

Just one minor question: what happens if a client has a cvar set to "Bad
CVAR request" :)

  ~dvander

> We have updated the client CVAR query interface in Half-Life 1 with two
> new functions that will help you better track queries and responses.
>
> The enginefuncs_t structure has had this function added to the end:
>       void (*pfnQueryClientCvarValue2)( const edict_t *player, const
> char *cvarName, int requestID );
>
> It will query a cvar value from a player and return to you the supplied
> requestID on success (or failure).
>
> The response is sent to a pfnCvarValue2 callback in the
> NEW_DLL_FUNCTIONS structure, its full definition is:
> typedef struct
> {
>       // Called right before the object's memory is freed.
>       // Calls its destructor.
>       void                    (*pfnOnFreeEntPrivateData)(edict_t
> *pEnt);
>       void                    (*pfnGameShutdown)(void);
>       int                             (*pfnShouldCollide)( edict_t
> *pentTouched, edict_t *pentOther );
>       void                    (*pfnCvarValue)( const edict_t *pEnt,
> const char *value );
>       void                    (*pfnCvarValue2)( const edict_t *pEnt,
> int requestID, const char *cvarName, const char *value );
> } NEW_DLL_FUNCTIONS;
>
> When the pfnQueryClientCvarValue2() completes it will call
> pfnCvarValue2() with the request ID you supplied earlier, the name of
> the cvar you requested and the value of that cvar. On failure (i.e that
> user is not connected or the cvar does not exist) the value of the
> returned cvar will be "Bad CVAR request". If you specify an invalid
> player edict you will get "Bad Player" as the value response.
>
> - Alfred
>
> _______________________________________________
> 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

Reply via email to