diff --git a/code/ryzom/server/src/entities_game_service/camera_animation_manager/camera_animation_steps.cpp b/code/ryzom/server/src/entities_game_service/camera_animation_manager/camera_animation_steps.cpp index 9e7f4768b..4e54a1f4d 100644 --- a/code/ryzom/server/src/entities_game_service/camera_animation_manager/camera_animation_steps.cpp +++ b/code/ryzom/server/src/entities_game_service/camera_animation_manager/camera_animation_steps.cpp @@ -73,6 +73,7 @@ public: } }; // This class must not be registered because it a base class +///////////////////////////////////////////////////////////////////////////// /// Static camera animation step (that does not have specific variables) class CCameraAnimationStepStatic : public CCameraAnimationStepBasic { @@ -88,3 +89,39 @@ public: } }; CAMERA_ANIMATION_REGISTR_STEP(CCameraAnimationStepStatic, "camera_animation_static"); + +///////////////////////////////////////////////////////////////////////////// +/// Static camera animation step (that does not have specific variables) +class CCameraAnimationStepGoTo: public CCameraAnimationStepBasic +{ +protected: + std::string EndPos; + +public: + CCameraAnimationStepGoTo() + { + EndPos = ""; + } + + bool parseStep(const NLLIGO::IPrimitive* prim, const std::string& filename) + { + if (!CCameraAnimationStepBasic::parseStep(prim, filename)) + { + nlwarning(" impossible to parse the basic part of the step in primitive : %s", filename.c_str()); + return false; + } + + std::string value; + + // We get the look at position + if (!prim->getPropertyByName("end_position", value)) + { + nlwarning(" impossible to get the end_position property of the basic step in primitive : %s", filename.c_str()); + return false; + } + LookAtPos = value; + + return true; + } +}; +CAMERA_ANIMATION_REGISTR_STEP(CCameraAnimationStepGoTo, "camera_animation_go_to");