> I've been going over the mapcycle code recently, and I've run across
> a question that I have been unable to answer.  There are a couple
> lines like this:
>
> s = g_engfuncs.pfnInfoKeyValue( szBuffer, "minplayers" );
>
> By the context, I can tell that it returns a string containing a
> number of minplayers.  This engine call is also used to parse the
> model and name out of some info buffers in client.cpp.  What exactly
> does this method do?

I believe all that engine function does is scan a infobuffer string like
this...

/player/bob/topcolor/240/bottomcolor/45/model/scout/minplayers/5/maxplayers/10

...and looks for the match for the second argument.  Then it sucks out the next
field (between the '/'s) and returns that value.

It's basically a util type function that parses a '/' separated string and
returns the value for a key.

Jeffrey "botman" Broome

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

Reply via email to