From 2b954a23db23e38a4dc0ab452778ed2f6165c253 Mon Sep 17 00:00:00 2001 From: Fabien_HENON Date: Wed, 4 Jul 2012 19:02:00 +0200 Subject: [PATCH] Added: #1469 getDuration function to get the duration of the step (useful for timers) --HG-- branch : gsoc2012-fabien --- .../camera_animation_step_factory.h | 5 ++++- .../camera_animation_steps.cpp | 10 ++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) 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