Here's what the engine does:

//-----------------------------------------------------------------------------
// SV_IsSimulating
//-----------------------------------------------------------------------------
bool SV_IsSimulating( void )
{
        if ( sv.IsPaused() )
                return false;

#ifndef SWDS
        // Don't simulate in single player if console is down or the bug UI is 
active and we're in a game
        if ( !sv.IsMultiplayer() )
        {
                if ( g_LostVideoMemory )
                        return false;

                // Don't simulate in single player if console is down or the 
bug UI is active and we're in a game
                if ( cl.IsActive() && ( Con_IsVisible() || 
EngineVGui()->ShouldPause() ) )
                        return false;
        }
#endif //SWDS

        return true;
}


...

        bool bIsSimulating = SV_IsSimulating();
        bool bSendDuringPause = sv_noclipduringpause ? 
sv_noclipduringpause->GetBool() : false;


        // Run any commands from client and play client Think functions if it 
is time.
        sv.RunFrame(); // read network input etc

        if ( SV_HasPlayers() )
        {
                ...

                SV_Think( bIsSimulating );
        }
        else if ( sv.IsMultiplayer() )
        {
                SV_Think( false );      // let the game.dll systems think
        }

So unless you have players, the server doesn't advance time in multiplayer.



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Janek Le_Vert
Sent: Friday, September 28, 2007 8:41 AM
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] FW: gpGlobals->curtime frozen

--
[ Picked text/plain from multipart/alternative ]

I'm not in singleplayer. I 'm using HL2DM base SDK (appid=320). I run a linux 
version and I discovered that gpGlobals->curtime remains the same (1.0000) till 
a first player joins. After that it is ok.> From: [EMAIL PROTECTED]> To: 
hlcoders@list.valvesoftware.com> Subject: Re: [hlcoders] FW: gpGlobals->curtime 
frozen> Date: Fri, 28 Sep 2007 16:37:49 +0100> > If you're in singleplayer the 
game pauses when you have the console> up.. could that be the problem?> > 
garry> > On 9/28/07, Janek Le_Vert <[EMAIL PROTECTED]> wrote:> > --> > [ Picked 
text/plain from multipart/alternative ]> >> >> >> >> > Hi all, I have a strange 
trouble.My mod is based on HL2DM SDK.When I start my mod, gpGlobals->curtime 
(server side) never changed : it stays to 1.0000 all the time. When a first 
player joins, it starts counting seconds.I don't understand why. I have checked 
that engine is not paused (engine->IsPaused returns false). I have also checked 
that m_flGameStartTime is not changed and that mp_timelimit is correct and it 
is.Do you have any idea which can explain why when starting the first time 
gpGlobals->curtime never changes ? Thank you in advance for your help.> > 
_________________________________________________________________> > Essayez 
Live.com, votre nouvelle page d'accueil ! Personnalisez-la en quelques clics 
pour retrouver tout ce qui vous intéresse au même endroit.> > 
http://www.live.com/getstarted> > --> >> > 
_______________________________________________> > 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>
_________________________________________________________________
Essayez Live.com et créez l'Internet qui vous ressemble : infos, sports, météo 
et bien plus encore !
http://www.live.com/getstarted
--

_______________________________________________
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