Thank you very much, Alfred!

     -----David Anderson

On Fri, 3 Dec 2004, Alfred Reynolds wrote:

You can use IEffects::Time from the IEFFECTS_INTERFACE_VERSION in the
game dll to get access to gpGlobals->curtime. gpGlobals is a crutch and
I want to kill it off :) Looking at the class defn for it you only need
curtime and maxplayers from it which can be found via other sources, so
lets leave it out for now.

- Alfred

----Original Message----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David
Anderson Sent: Friday, December 03, 2004 9:31 PM To:
[EMAIL PROTECTED] Subject: RE: [hlcoders] Using
gpGlobals->maxclients

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

_______________________________________________ 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