BVB Source Codes

CRYENGINE Show GameSessionHandler.cpp Source code

Return Download CRYENGINE: download GameSessionHandler.cpp Source code - Download CRYENGINE Source code - Type:.cpp
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. /*************************************************************************
  4.    -------------------------------------------------------------------------
  5.    $Id$
  6.    $DateTime$
  7.    Description: Default session handler implementation.
  8.  
  9.    -------------------------------------------------------------------------
  10.    History:
  11.    - 08:12:2009 : Created By Ben Johnson
  12.  
  13. *************************************************************************/
  14. #include "StdAfx.h"
  15. #include <CryCore/Platform/IPlatformOS.h>
  16. #include "GameSessionHandler.h"
  17. #include "CryAction.h"
  18.  
  19. //-------------------------------------------------------------------------
  20. CGameSessionHandler::CGameSessionHandler()
  21. {
  22. }
  23.  
  24. //-------------------------------------------------------------------------
  25. CGameSessionHandler::~CGameSessionHandler()
  26. {
  27. }
  28.  
  29. //-------------------------------------------------------------------------
  30. void CGameSessionHandler::JoinSessionFromConsole(CrySessionID sessionID)
  31. {
  32. }
  33.  
  34. //-------------------------------------------------------------------------
  35. int CGameSessionHandler::EndSession()
  36. {
  37.         return 1;
  38. }
  39.  
  40. //-------------------------------------------------------------------------
  41. int CGameSessionHandler::StartSession()
  42. {
  43.         return 1;
  44. }
  45.  
  46. //-------------------------------------------------------------------------
  47. void CGameSessionHandler::LeaveSession()
  48. {
  49. }
  50.  
  51. //-------------------------------------------------------------------------
  52. void CGameSessionHandler::OnUserQuit()
  53. {
  54. }
  55.  
  56. //-------------------------------------------------------------------------
  57. void CGameSessionHandler::OnGameShutdown()
  58. {
  59. }
  60.  
  61. //-------------------------------------------------------------------------
  62. CrySessionHandle CGameSessionHandler::GetGameSessionHandle() const
  63. {
  64.         return CrySessionInvalidHandle;
  65. }
  66.  
  67. //-------------------------------------------------------------------------
  68. bool CGameSessionHandler::ShouldMigrateNub() const
  69. {
  70.         return true;
  71. }
  72.  
  73. //-------------------------------------------------------------------------
  74. bool CGameSessionHandler::IsMultiplayer() const
  75. {
  76.         return false;
  77. }
  78.  
  79. //-------------------------------------------------------------------------
  80. int CGameSessionHandler::GetNumberOfExpectedClients()
  81. {
  82.         return 0;
  83. }
  84.  
  85. //-------------------------------------------------------------------------
  86. bool CGameSessionHandler::IsGameSessionMigrating() const
  87. {
  88.         return false;
  89. }
  90.  
  91. //-------------------------------------------------------------------------
  92. bool CGameSessionHandler::IsMidGameLeaving() const
  93. {
  94.         return false;
  95. }
  96.  
  97. bool CGameSessionHandler::ShouldCallMapCommand(const char* pLevelName, const char* pGameRules)
  98. {
  99.         IPlatformOS* pPlatform = gEnv->pSystem->GetPlatformOS();
  100.  
  101.         SStreamingInstallProgress progress;
  102.         pPlatform->QueryStreamingInstallProgressForLevel(pLevelName, &progress);
  103.         const bool bLevelReady = SStreamingInstallProgress::eState_Completed == progress.m_state;
  104.         if (!bLevelReady)
  105.         {
  106.                 gEnv->pSystem->GetISystemEventDispatcher()->OnSystemEvent(ESYSTEM_EVENT_LEVEL_NOT_READY, (UINT_PTR)pLevelName, 0);
  107.         }
  108.         return bLevelReady;
  109. }
  110.  
downloadGameSessionHandler.cpp Source code - Download CRYENGINE Source code
Related Source Codes/Software:
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top