Exemple #1
0
        /// <summary>
        /// Host_ServerFrame
        /// </summary>
        public static void ServerFrame()
        {
            // run the world state
            Progs.GlobalStruct.frametime = (float)Host.FrameTime;

            // set the time and clear the general datagram
            Server.ClearDatagram();

            // check for new clients
            Server.CheckForNewClients();

            // read client messages
            Server.RunClients();

            // move things around and think
            // always pause in single player if in console or menus
            if (!Server.sv.paused && (Server.svs.maxclients > 1 || Key.Destination == keydest_t.key_game))
            {
                Server.Physics();
            }

            // send all messages to the clients
            Server.SendClientMessages();
        }