BVB Source Codes

CRYENGINE Show MovementBlock_UseSmartObject.h Source code

Return Download CRYENGINE: download MovementBlock_UseSmartObject.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. #ifndef MovementBlock_UseSmartObject_h
  6.         #define MovementBlock_UseSmartObject_h
  7.  
  8.         #include "MovementBlock_UseExactPositioningBase.h"
  9.  
  10. namespace Movement
  11. {
  12. namespace MovementBlocks
  13. {
  14. // If the exact positioning fails to position the character at the
  15. // start of the smart object it reports the error through the bubbles
  16. // and teleports to the end of it, and then proceeds with the plan.
  17.  
  18. class UseSmartObject : public UseExactPositioningBase
  19. {
  20. public:
  21.         typedef UseExactPositioningBase Base;
  22.  
  23.         UseSmartObject(const CNavPath& path, const PathPointDescriptor::OffMeshLinkData& mnmData, const MovementStyle& style);
  24.         virtual const char* GetName() const override          { return "UseSmartObject"; }
  25.         virtual bool        InterruptibleNow() const override { return m_state == Prepare; }
  26.         virtual void        Begin(IMovementActor& actor) override;
  27.         virtual Status      Update(const MovementUpdateContext& context) override;
  28.         void                SetUpcomingPath(const CNavPath& path);
  29.         void                SetUpcomingStyle(const MovementStyle& style);
  30.  
  31. protected:
  32.         virtual void OnTraverseStarted(const MovementUpdateContext& context) override;
  33.  
  34. private:
  35.         virtual UseExactPositioningBase::TryRequestingExactPositioningResult TryRequestingExactPositioning(const MovementUpdateContext& context) override;
  36.         virtual void                                                         HandleExactPositioningError(const MovementUpdateContext& context) override;
  37.  
  38.         Vec3                                                                 GetSmartObjectEndPosition() const;
  39.  
  40. private:
  41.         CNavPath                                   m_upcomingPath;
  42.         MovementStyle                              m_upcomingStyle;
  43.         const PathPointDescriptor::OffMeshLinkData m_smartObjectMNMData;
  44.         float m_timeSpentWaitingForSmartObjectToBecomeFree;
  45. };
  46. }
  47. }
  48.  
  49. #endif // MovementBlock_UseSmartObject_h
  50.  
downloadMovementBlock_UseSmartObject.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