BVB Source Codes

CRYENGINE Show NullListener.h Source code

Return Download CRYENGINE: download NullListener.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. /*************************************************************************
  4.    -------------------------------------------------------------------------
  5.    $Id$
  6.    $DateTime$
  7.    Description:  network breakability: don't listen to anything
  8.    -------------------------------------------------------------------------
  9.    History:
  10.    - 22/01/2007   10:34 : Created by Craig Tiller
  11. *************************************************************************/
  12. #ifndef __NULLLISTENER_H__
  13. #define __NULLLISTENER_H__
  14.  
  15. #pragma once
  16.  
  17. #if !NET_USE_SIMPLE_BREAKAGE
  18.  
  19. class CNullListener : public IBreakReplicatorListener
  20. {
  21. public:
  22.         bool AttemptAbsorb(const IProceduralBreakTypePtr& pBT)
  23.         {
  24.                 return false;
  25.         }
  26.  
  27.         bool AcceptUpdateMesh(const EventPhysUpdateMesh* pEvent)
  28.         {
  29.                 return true;
  30.         }
  31.         bool AcceptCreateEntityPart(const EventPhysCreateEntityPart* pEvent)
  32.         {
  33.                 return true;
  34.         }
  35.         bool AcceptRemoveEntityParts(const EventPhysRemoveEntityParts* pEvent)
  36.         {
  37.                 return true;
  38.         }
  39.         bool AcceptJointBroken(const EventPhysJointBroken* pEvent)
  40.         {
  41.                 return true;
  42.         }
  43.  
  44.         void OnSpawn(IEntity* pEntity, SEntitySpawnParams& params)
  45.         {
  46.         }
  47.         void OnRemove(IEntity* pEntity)
  48.         {
  49.         }
  50.  
  51.         void EndEvent(INetContext* pCtx)
  52.         {
  53.         }
  54.  
  55.         void OnPostStep()
  56.         {
  57.         }
  58.  
  59.         virtual void OnStartFrame()
  60.         {
  61.         }
  62.  
  63.         virtual bool OnEndFrame()
  64.         {
  65.                 CRY_ASSERT(false);
  66.                 return false;
  67.         }
  68.  
  69.         virtual void OnTimeout()
  70.         {
  71.         }
  72.  
  73.         const char* GetName()
  74.         {
  75.                 return "NullListener";
  76.         }
  77. };
  78.  
  79. #endif // !NET_USE_SIMPLE_BREAKAGE
  80.  
  81. #endif
  82.  
downloadNullListener.h 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