diff --git a/code/ryzom/server/src/entities_game_service/camera_animation_manager/camera_animation_step_factory.h b/code/ryzom/server/src/entities_game_service/camera_animation_manager/camera_animation_step_factory.h index a21422845..4e6eed933 100644 --- a/code/ryzom/server/src/entities_game_service/camera_animation_manager/camera_animation_step_factory.h +++ b/code/ryzom/server/src/entities_game_service/camera_animation_manager/camera_animation_step_factory.h @@ -34,9 +34,12 @@ class ICameraAnimationStep public: /// This function is called when it's time to parse the primitive to load the camera animation step virtual bool parseStep(const NLLIGO::IPrimitive* prim, const std::string& filename) = 0; - // Function that adds a camera animation modifier to this step + /// Function that adds a camera animation modifier to this step void addModifier(ICameraAnimationModifier* modifier); + /// Function that returns the duration of the step (in seconds) + virtual float getDuration() const = 0; + protected: // The list of modifiers std::vector Modifiers; 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 de069a4f6..11bb6ceee 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 @@ -70,6 +70,11 @@ public: return true; } + + virtual float getDuration() const + { + return Duration; + } }; // This class must not be registered because it a base class ///////////////////////////////////////////////////////////////////////////// @@ -278,5 +283,10 @@ public: return true; } + + virtual float getDuration() const + { + return Duration; + } }; CAMERA_ANIMATION_REGISTR_STEP(CCameraAnimationStepReturn, "camera_animation_return"); \ No newline at end of file