Advertisement
Guest User

Untitled

a guest
Jul 30th, 2015
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.30 KB | None | 0 0
  1. Index: source/network/NetTurnManager.cpp
  2. ===================================================================
  3. --- source/network/NetTurnManager.cpp   (revision 16895)
  4. +++ source/network/NetTurnManager.cpp   (working copy)
  5. @@ -547,10 +547,13 @@
  6.     {
  7.         JS::RootedValue command(m_Simulation2.GetScriptInterface().GetContext());
  8.         m_Simulation2.GetScriptInterface().ParseJSON(pair.second, &command);
  9.         AddCommand(m_ClientId, pair.first, command, m_CurrentTurn + 1);
  10.     }
  11. +
  12. +   if (turn == m_FinalReplayTurn)
  13. +       g_GUI->SendEventToAll("ReplayFinished");
  14.  }
  15.  
  16.  CNetServerTurnManager::CNetServerTurnManager(CNetServerWorker& server) :
  17.     m_NetServer(server), m_ReadyTurn(1), m_TurnLength(DEFAULT_TURN_LENGTH_MP)
  18.  {
  19. Index: source/ps/Game.cpp
  20. ===================================================================
  21. --- source/ps/Game.cpp  (revision 16895)
  22. +++ source/ps/Game.cpp  (working copy)
  23. @@ -389,16 +388,14 @@
  24.         {
  25.             {
  26.                 PROFILE3("gui sim update");
  27.                 g_GUI->SendEventToAll("SimulationUpdate");
  28.             }
  29. -           if (m_IsReplay && m_TurnManager->GetCurrentTurn() == m_FinalReplayTurn - 1)
  30. -               g_GUI->SendEventToAll("ReplayFinished");
  31.  
  32.             GetView()->GetLOSTexture().MakeDirty();
  33.         }
  34. -      
  35. +
  36.         if (CRenderer::IsInitialised())
  37.             g_Renderer.GetTimeManager().Update(deltaSimTime);
  38.     }
  39.  
  40.     if (doInterpolate)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement