BVB Source Codes

CRYENGINE Show SimulateRemoveEntityParts.cpp Source code

Return Download CRYENGINE: download SimulateRemoveEntityParts.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:  network breakability: generic 'remove parts' events - try not to use
  8.    -------------------------------------------------------------------------
  9.    History:
  10.    - 22/01/2007   10:34 : Created by Craig Tiller
  11. *************************************************************************/
  12.  
  13. #include "StdAfx.h"
  14. #if !NET_USE_SIMPLE_BREAKAGE
  15.         #include "SimulateRemoveEntityParts.h"
  16.         #include "BreakReplicator.h"
  17.  
  18. void SSimulateRemoveEntityParts::SerializeWith(TSerialize ser)
  19. {
  20.         CryFatalError("THIS CODE IS DEFUNCT");
  21.         //ent.SerializeWith(ser);
  22.         ser.Value("partIds0", partIds[0]);
  23.         ser.Value("partIds1", partIds[1]);
  24.         ser.Value("partIds2", partIds[2]);
  25.         ser.Value("partIds3", partIds[3]);
  26.         ser.Value("massOrg", massOrg);
  27.  
  28.         LOGBREAK("SSimulateRemoveEntityParts: %s", ser.IsReading() ? "Reading:" : "Writing");
  29.  
  30.         LOGBREAK("partIds0: %d", partIds[0]);
  31.         LOGBREAK("partIds1: %d", partIds[1]);
  32.         LOGBREAK("partIds2: %d", partIds[2]);
  33.         LOGBREAK("partIds3: %d", partIds[3]);
  34.         LOGBREAK("massOrg: %f", massOrg);
  35. }
  36.  
  37. void SSimulateRemoveEntityPartsMessage::SerializeWith(TSerialize ser)
  38. {
  39.         LOGBREAK("SSimulateRemoveEntityPartsMessage: %s", ser.IsReading() ? "Reading:" : "Writing");
  40.  
  41.         SSimulateRemoveEntityParts::SerializeWith(ser);
  42.         ser.Value("breakId", breakId, 'brId');
  43.  
  44.         LOGBREAK("breakId: %d", breakId);
  45. }
  46.  
  47. void SSimulateRemoveEntityPartsInfo::GetAffectedRegion(AABB& aabb)
  48. {
  49.         SMessagePositionInfo center;
  50.         ent.GetPositionInfo(center);
  51.         aabb.min = center.position - Vec3(20);
  52.         aabb.max = center.position + Vec3(20);
  53. }
  54.  
  55. void SSimulateRemoveEntityPartsInfo::AddSendables(INetSendableSink* pSink, int32 brkId)
  56. {
  57.         CBreakReplicator::SendSimulateRemoveEntityPartsWith(SSimulateRemoveEntityPartsMessage(*this, brkId), pSink);
  58. }
  59. #endif // !NET_USE_SIMPLE_BREAKAGE
  60.  
downloadSimulateRemoveEntityParts.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