diff --git a/code/ryzom/server/src/entities_game_service/camera_animation_manager/camera_animation_modifier_factory.h b/code/ryzom/server/src/entities_game_service/camera_animation_manager/camera_animation_modifier_factory.h index e08d1d416..f30dff890 100644 --- a/code/ryzom/server/src/entities_game_service/camera_animation_manager/camera_animation_modifier_factory.h +++ b/code/ryzom/server/src/entities_game_service/camera_animation_manager/camera_animation_modifier_factory.h @@ -32,6 +32,10 @@ class ICameraAnimationModifier public: /// This function is called when it's time to parse the primitive to load the camera animation modifier virtual bool parseModifier(const NLLIGO::IPrimitive* prim, const std::string& filename) = 0; + + + /// Function to get the name of the modifier + virtual std::string getModifierName() const = 0; }; /************************************************************************/ @@ -55,7 +59,7 @@ protected: }; // Define used to register the different types of camera animation modifiers -#define CAMERA_ANIMATION_REGISTR_MODIFIER(_class_,_name_) \ +#define CAMERA_ANIMATION_REGISTER_MODIFIER(_class_,_name_) \ class _class_##CameraAnimationModifierFactory : public ICameraAnimationModifierFactory \ {\ public:\ @@ -76,4 +80,10 @@ public:\ };\ static _class_##CameraAnimationModifierFactory* _class_##CameraAnimationModifierFactoryInstance = new _class_##CameraAnimationModifierFactory; +#define CAMERA_ANIMATION_MODIFIER_NAME(name) \ + std::string getModifierName() const \ +{ \ + return name; \ +} + #endif /* RY_CAMERAANIMATIONMODIFIERFACTORY_H */ diff --git a/code/ryzom/server/src/entities_game_service/camera_animation_manager/camera_animation_modifiers.cpp b/code/ryzom/server/src/entities_game_service/camera_animation_manager/camera_animation_modifiers.cpp index 3bcad1aed..c89bc5300 100644 --- a/code/ryzom/server/src/entities_game_service/camera_animation_manager/camera_animation_modifiers.cpp +++ b/code/ryzom/server/src/entities_game_service/camera_animation_manager/camera_animation_modifiers.cpp @@ -51,8 +51,10 @@ public: return true; } + + CAMERA_ANIMATION_MODIFIER_NAME("camera_modifier_shake"); }; -CAMERA_ANIMATION_REGISTR_MODIFIER(CCameraAnimationModifierShake, "camera_modifier_shake"); +CAMERA_ANIMATION_REGISTER_MODIFIER(CCameraAnimationModifierShake, "camera_modifier_shake"); ///////////////////////////////////////////////////////////////////////////// /// This animation modifier plays a sound. The parameters are @@ -97,5 +99,7 @@ public: return true; } + + CAMERA_ANIMATION_MODIFIER_NAME("sound_trigger"); }; -CAMERA_ANIMATION_REGISTR_MODIFIER(CCameraAnimationModifierSoundTrigger, "sound_trigger"); \ No newline at end of file +CAMERA_ANIMATION_REGISTER_MODIFIER(CCameraAnimationModifierSoundTrigger, "sound_trigger"); \ No newline at end of file