Alfred, is it possible the plugin interface could be extended to do this?

The tasking system for most Metamod-plugins I wrote for HL1 used the timer
in gpGlobals to work.  It was a nice, OS independent way of measuring in
sub-second intervals matched with the framerate.

Are there any other ways to do this?

Thanks,

     -----David Anderson


On Fri, 3 Dec 2004, Alfred Reynolds wrote:

You don't have any code there to make gpGlobals point anywhere
useful....

The game dll initializes it in CServerGameDLL::DLLInit() but plugins
don't have that call so you can't get access to it.

Use IServerGameClients::GetPlayerLimits() to get the min and max players
for the mod, or record the maxplayers in use for the current map from
CEmptyServerPlugin::ServerActivate().

- Alfred

----Original Message----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Josh Sent:
Friday, December 03, 2004 6:40 PM To: [EMAIL PROTECTED]
Subject: [hlcoders] Using gpGlobals->maxclients

OK how Do I use it? I tried
static CGlobalVarsBase dummyvars( true ); // So stuff that might
reference gpGlobals during DLL initialization won't have a NULL
pointer. // Once the engine calls Init on this DLL, this pointer gets
assigned to the shared data in the engine CGlobalVarsBase *gpGlobals
= &dummyvars;

Then did gpGlobals->maxclients, but I'm getting a 0 in return.  Does
it need to be defined elsewhere?  I'm lost :(  I'm trying to use this
in a plugin.

Thanks,
Josh (Pimp Daddy)


_______________________________________________ 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



Reply via email to