BVB Source Codes

CRYENGINE Show IProceduralBreakType.h Source code

Return Download CRYENGINE: download IProceduralBreakType.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: handle different methods of procedurally breaking something
  8.    -------------------------------------------------------------------------
  9.    History:
  10.    - 22/01/2007   10:34 : Created by Craig Tiller
  11. *************************************************************************/
  12. #ifndef __IPROCEDURALBREAKTYPE_H__
  13. #define __IPROCEDURALBREAKTYPE_H__
  14.  
  15. #pragma once
  16.  
  17. #if !NET_USE_SIMPLE_BREAKAGE
  18.  
  19.         #include "ProceduralBreak.h"
  20.         #include "ObjectSelector.h"
  21.  
  22. struct SExplosiveObjectState;
  23.  
  24. enum EProceduralBreakTypeFlags
  25. {
  26.         ePBTF_NoJointBreaks = BIT(0),
  27.         ePBTF_ChainBreaking = BIT(1)
  28. };
  29.  
  30. struct IProceduralBreakType;
  31. typedef _smart_ptr<IProceduralBreakType> IProceduralBreakTypePtr;
  32.  
  33. struct SProceduralBreakRecordingState
  34. {
  35.         SProceduralBreakRecordingState() : gotRemove(false), numEmptySteps(0) {}
  36.         bool gotRemove;
  37.         int  numEmptySteps;
  38. };
  39.  
  40. struct IProceduralBreakType : public _reference_target_t
  41. {
  42.         const uint8 flags;
  43.         const char  type;
  44.  
  45.         IProceduralBreakType(uint8 f, char t) : flags(f), type(t) {}
  46.  
  47.         virtual bool                         AttemptAbsorb(const IProceduralBreakTypePtr& pBT) = 0;
  48.         virtual void                         AbsorbStep() = 0;
  49.         virtual int                          GetVirtualId(IPhysicalEntity* pEnt) = 0;
  50.         virtual bool                         GotExplosiveObjectState(const SExplosiveObjectState* pState) = 0;
  51.         virtual _smart_ptr<SProceduralBreak> CompleteSend() = 0;
  52.         virtual void                         PreparePlayback() = 0;
  53.         virtual void                         BeginPlayback(bool hasJointBreaks) = 0;
  54.         virtual CObjectSelector              GetObjectSelector(int idx) = 0;
  55.         virtual const char*                  GetName() = 0;
  56.  
  57.         virtual void                         PatchRecording(DynArray<SProceduralSpawnRec>& spawnRecs, DynArray<SJointBreakRec>& jointBreaks) = 0;
  58.  
  59.         virtual bool                         AllowComplete(const SProceduralBreakRecordingState& state) = 0;
  60.  
  61.         virtual bool                         SendOnlyOnClientJoin() { return false; }
  62. };
  63.  
  64. #endif // !NET_USE_SIMPLE_BREAKAGE
  65.  
  66. #endif
  67.  
downloadIProceduralBreakType.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