BVB Source Codes

CRYENGINE Show GameChannel.cpp Source code

Return Download CRYENGINE: download GameChannel.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: Common functionality for CGameServerChannel, CGameClientChannel
  8.  
  9.    -------------------------------------------------------------------------
  10.    History:
  11.    - 6:10:2004   11:38 : Created by Craig Tiller
  12.  
  13. *************************************************************************/
  14. #include "StdAfx.h"
  15. #include "GameChannel.h"
  16. #include "PhysicsSync.h"
  17. #include "GameObjects/GameObject.h"
  18. #include "CryAction.h"
  19. #include "GameContext.h"
  20.  
  21. CGameChannel::CGameChannel() : m_pNetChannel(NULL), m_pContext(NULL), m_playerId(0)
  22. {
  23.         m_pPhysicsSync.reset(new CPhysicsSync(this));
  24. }
  25.  
  26. CGameChannel::~CGameChannel()
  27. {
  28. }
  29.  
  30. void CGameChannel::Init(INetChannel* pNetChannel, CGameContext* pGameContext)
  31. {
  32.         m_pNetChannel = pNetChannel;
  33.         m_pContext = pGameContext;
  34. }
  35.  
  36. void CGameChannel::ConfigureContext(bool isLocal)
  37. {
  38.         if (isLocal)
  39.                 return;
  40.  
  41.         GameWarning("Need to set physics time here");
  42. }
  43.  
  44. void CGameChannel::SetPlayerId(EntityId id)
  45. {
  46.         m_playerId = id;
  47.         if (id)
  48.                 m_pNetChannel->DeclareWitness(id);
  49. }
  50.  
downloadGameChannel.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