BVB Source Codes

CRYENGINE Show HideSpot.cpp Source code

Return Download CRYENGINE: download HideSpot.cpp Source code - Download CRYENGINE Source code - Type:.cpp
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. /********************************************************************
  4.    -------------------------------------------------------------------------
  5.    File name:   HideSpot.cpp
  6.    $Id$
  7.    Description: Hidespot-related structures
  8.  
  9.    -------------------------------------------------------------------------
  10.    History:
  11.  
  12.  *********************************************************************/
  13.  
  14. #include "StdAfx.h"
  15. #include "HideSpot.h"
  16.  
  17. SHideSpot::SHideSpot() : pNavNode(0), pNavNodes(0), pAnchorObject(0), pObstacle(0), entityId(0)
  18. {
  19. }
  20.  
  21. SHideSpot::SHideSpot(SHideSpotInfo::EHideSpotType type, const Vec3& pos, const Vec3& dir)
  22.         : info(type, pos, dir), pNavNode(0), pNavNodes(0), pAnchorObject(0), pObstacle(0), entityId(0)
  23. {
  24. }
  25.  
  26. bool SHideSpot::IsSecondary() const
  27. {
  28.         switch (info.type)
  29.         {
  30.         case SHideSpotInfo::eHST_TRIANGULAR:
  31.                 return pObstacle && !pObstacle->IsCollidable();
  32.         case SHideSpotInfo::eHST_WAYPOINT:
  33.                 return pNavNode && (pNavNode->navType == IAISystem::NAV_WAYPOINT_HUMAN) &&
  34.                        (pNavNode->GetWaypointNavData()->type == WNT_HIDESECONDARY);
  35.         case SHideSpotInfo::eHST_ANCHOR:
  36.                 return pAnchorObject && (pAnchorObject->GetType() == AIANCHOR_COMBAT_HIDESPOT_SECONDARY);
  37.         }
  38.  
  39.         return false;
  40. }
  41.  
downloadHideSpot.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