Apparently this curtime fluctuation issue to is due to ConCommands not being handled within CServerGameDLL::GameFrame() but instead starting from within the ConCommand::Dispatch() callback. This is all very bizarre, and what few comments there are on this are things like
// tickcount currently isn't set during prediction, although gpGlobals->curtime and // gpGlobals->frametime are. We should probably set tickcount (to player->m_nTickBase), // but we're REALLY close to shipping, so we can change that later and people can use // player->CurrentCommandNumber() in the meantime. which leads me to believe there are known limitations here that just aren't otherwise documented. It's not clear whether the GameFrame/Dispatch dichotomy was intentional or a bug. The upshot is that, apparently, you should never do anything involving simulation time inside a console command. Instead it looks like the only reliable process is to set flags and such inside the ConCommand, and then wait until later in the CServerGameDLL::GameFrame() callback inside PhysicsSimulate etc to actually make use of the command data that was fed in. Confirmation from someone (presumably Valve) that the above statement is true and there is no simple work around to this limitation/bug would be helpful. Not sure if that helps clear things up for you, or if I'm on a tangent. :) At 2006/06/03 02:04 PM, Tony \"omega\" Sergi wrote: >He's probably referring to network snapshots, where it may run code at x >time; for a previous snapshot, for prediction purposes and whatnot. > >-------------- >-- omega >Heroes of Excelsior >http://www.heroesofexcelsior.com >Blackened Interactive >http://www.blackened-interactive.com > >> -----Original Message----- >> From: John Sheu [mailto:[EMAIL PROTECTED] >> Sent: June 3, 2006 2:36 PM >> To: [email protected] >> Subject: Re: [hlcoders] gpGlobals->curtime >> >> On Sat, 2006-06-03 at 13:21 -0500, [EMAIL PROTECTED] wrote: >> > Coincidentally I'd just been doing some more research into gpGlobals- >> >curtime server-side. Not sure if this applies to client-side too, >> however it seems that gpGlobals->curtime server side is able to go >> slightly backwards in some situations. Apparently it depends on what call >> back is occurring to get you to the mod code. >> > >> > My guess is that when the server is compensating for lagged packets it >> sets curtime to the time it thinks the thing should have happened? This >> is all very sketchy, but at least it seems more reasonable than realtime. >> >> That seems entirely plausible, but I've never seen it happen. On which >> callbacks is gpGlobals->curtime reversing server-side? In any case, I >> think there is less reason (other than that outlined above) for curtime >> to change server-side than client-side. >> >> As an aside, I considered tacking this onto the end of your realtime >> thread, but decided that it's sufficiently different to warrant a new >> thread. :) >> >> -John Sheu >> >> _______________________________________________ > > >_______________________________________________ >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

