BVB Source Codes

CRYENGINE Show SimulateCreateEntityPart.h Source code

Return Download CRYENGINE: download SimulateCreateEntityPart.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: generic 'create part' events - try not to use
  8.    -------------------------------------------------------------------------
  9.    History:
  10.    - 22/01/2007   10:34 : Created by Craig Tiller
  11. *************************************************************************/
  12. #ifndef __SIMULATECREATEENTITYPART_H__
  13. #define __SIMULATECREATEENTITYPART_H__
  14.  
  15. #pragma once
  16.  
  17. // dummy struct to resolve compilation of BreakReplicator.cpp on gcc-4.2
  18. struct SSimulateCreateEntityPartMessage
  19. {
  20. };
  21.  
  22. /*
  23.    #include "ObjectSelector.h"
  24.  
  25.    struct SSimulateCreateEntityPart
  26.    {
  27.    bool bInvalid;
  28.    CObjectSelector entSrc;
  29.    CObjectSelector entNew;
  30.    int partidSrc;
  31.    int partidNew;
  32.    int nTotParts;
  33.    Vec3 breakImpulse;
  34.    Vec3 breakAngImpulse;
  35.    float cutRadius;
  36.    Vec3 cutPtLoc[2];
  37.    Vec3 cutDirLoc[2];
  38.  
  39.    bool GetPosition(Vec3& pos)
  40.    {
  41.     Vec3 a, b;
  42.     if (entSrc.GetPosition(a))
  43.     {
  44.       if (entNew.GetPosition(b))
  45.         pos = 0.5f * (a+b);
  46.       else
  47.         pos = a;
  48.       return true;
  49.     }
  50.     else
  51.       return entNew.GetPosition(pos);
  52.    }
  53.  
  54.    void SerializeWith( TSerialize ser )
  55.    {
  56.     ser.Value("bInvalid", bInvalid);
  57.     entSrc.SerializeWith(ser);
  58.     entNew.SerializeWith(ser);
  59.     ser.Value("partidSrc", partidSrc);
  60.     ser.Value("partidNew", partidNew);
  61.     ser.Value("nTotParts", nTotParts);
  62.     ser.Value("breakImpulse", breakImpulse);
  63.     ser.Value("breakAngImpulse", breakAngImpulse);
  64.     ser.Value("cutRadius", cutRadius);
  65.     ser.Value("cutPtLoc0", cutPtLoc[0]);
  66.     ser.Value("cutPtLoc1", cutPtLoc[1]);
  67.     ser.Value("cutDirLoc0", cutDirLoc[0]);
  68.     ser.Value("cutDirLoc1", cutDirLoc[1]);
  69.    }
  70.    };
  71.  
  72.    struct SSimulateCreateEntityPartInfo : public IBreakDescriptionInfo
  73.    {
  74.    SSimulateCreateEntityPartInfo( int bid ) : breakId(bid) {}
  75.  
  76.    SSimulateCreateEntityPart msg;
  77.    int breakId;
  78.    };
  79.  */
  80.  
  81. #endif
  82.  
downloadSimulateCreateEntityPart.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