Beispiel #1
0
//----------------------------------------------------------------------------
void StdClientProcessList::onAdvanceObjects()
{
   PROFILE_SCOPE( StdClientProcessList_OnAdvanceObjects );

   GameConnection* connection = GameConnection::getServerConnection();
   if ( connection )
   {
      // process any demo blocks that are NOT moves, and exactly one move
      // we advance time in the demo stream by a move inserted on
      // each tick.  So before doing the tick processing we advance
      // the demo stream until a move is ready
      if ( connection->isPlayingBack() )
      {
         U32 blockType;
         do
         {
            blockType = connection->getNextBlockType();
            bool res = connection->processNextBlock();
            // if there are no more blocks, exit out of this function,
            // as no more client time needs to process right now - we'll
            // get it all on the next advanceClientTime()
            if(!res)
               return;
         }
         while ( blockType != GameConnection::BlockTypeMove );
      }

      connection->mMoveList->collectMove();
      advanceObjects();
   }
   else
      advanceObjects();
}