BVB Source Codes

CRYENGINE Show FlowFrameworkBaseNode.h Source code

Return Download CRYENGINE: download FlowFrameworkBaseNode.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. #pragma once
  4.  
  5. #include <CryFlowGraph/IFlowBaseNode.h>
  6.  
  7. template<ENodeCloneType CLONE_TYPE>
  8. class CFlowFrameworkBaseNode : public CFlowBaseNode<CLONE_TYPE>
  9. {
  10. protected:
  11.         bool InputEntityIsLocalPlayer(const IFlowNode::SActivationInfo* const pActInfo) const
  12.         {
  13.                 bool bRet = true;
  14.  
  15.                 if (pActInfo->pEntity)
  16.                 {
  17.                         IActor* pActor = gEnv->pGameFramework->GetIActorSystem()->GetActor(pActInfo->pEntity->GetId());
  18.                         if (pActor != gEnv->pGameFramework->GetClientActor())
  19.                         {
  20.                                 bRet = false;
  21.                         }
  22.                 }
  23.                 else if (gEnv->bMultiplayer)
  24.                 {
  25.                         bRet = false;
  26.                 }
  27.  
  28.                 return bRet;
  29.         }
  30.  
  31.         //-------------------------------------------------------------
  32.         // returns the actor associated with the input entity. In single player, it returns the local player if that actor does not exists.
  33.         IActor* GetInputActor(const IFlowNode::SActivationInfo* const pActInfo) const
  34.         {
  35.                 IActor* pActor = pActInfo->pEntity ? gEnv->pGameFramework->GetIActorSystem()->GetActor(pActInfo->pEntity->GetId()) : nullptr;
  36.                 if (!pActor && !gEnv->bMultiplayer)
  37.                 {
  38.                         pActor = gEnv->pGameFramework->GetClientActor();
  39.                 }
  40.  
  41.                 return pActor;
  42.         }
  43. };
  44.  
downloadFlowFrameworkBaseNode.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