BVB Source Codes

CRYENGINE Show FeatureCommonImpl.h Source code

Return Download CRYENGINE: download FeatureCommonImpl.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. namespace pfx2
  4. {
  5.  
  6. ILINE void KillOnParentDeath(const SUpdateContext& context)
  7. {
  8.         CParticleContainer& container = context.m_container;
  9.         const CParticleContainer& parentContainer = context.m_parentContainer;
  10.         const auto parentStates = parentContainer.GetTIStream<uint8>(EPDT_State);
  11.         const IPidStream parentIds = container.GetIPidStream(EPDT_ParentId);
  12.         auto states = container.GetTIOStream<uint8>(EPDT_State);
  13.         IOFStream ages = container.GetIOFStream(EPDT_NormalAge);
  14.  
  15.         CRY_PFX2_FOR_ACTIVE_PARTICLES(context)
  16.         {
  17.                 const TParticleId parentId = parentIds.Load(particleId);
  18.                 const uint8 parentState = (parentId != gInvalidId) ? parentStates.Load(parentId) : ES_Expired;
  19.                 if ((parentState & ESB_Dead) != 0)
  20.                 {
  21.                         states.Store(particleId, ES_Expired);
  22.                         ages.Store(particleId, 1.0f);
  23.                 }
  24.         }
  25.         CRY_PFX2_FOR_END;
  26. }
  27.  
  28. }
  29.  
downloadFeatureCommonImpl.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