From ae6aeb5c22a4ff9a15c9da0f20adbb055fc7d5a8 Mon Sep 17 00:00:00 2001 From: Fabien_HENON Date: Thu, 14 Jun 2012 21:31:04 +0200 Subject: [PATCH] Added: #1469 Parsing of sound_trigger action in missions --HG-- branch : gsoc2012-fabien --- .../mission_manager/mission_action.cpp | 40 ++++++++++++++++++- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/code/ryzom/server/src/entities_game_service/mission_manager/mission_action.cpp b/code/ryzom/server/src/entities_game_service/mission_manager/mission_action.cpp index c37522bea..6a052f0d0 100644 --- a/code/ryzom/server/src/entities_game_service/mission_manager/mission_action.cpp +++ b/code/ryzom/server/src/entities_game_service/mission_manager/mission_action.cpp @@ -5398,7 +5398,7 @@ class CMissionActionHandleRelease : public IMissionAction MISSION_REGISTER_ACTION(CMissionActionHandleRelease, "handle_release"); */ -/// user receive money +/// camera animation // ---------------------------------------------------------------------------- class CMissionActionCameraAnimation : public IMissionAction { @@ -5427,4 +5427,40 @@ class CMissionActionCameraAnimation : public IMissionAction MISSION_ACTION_GETNEWPTR(CMissionActionCameraAnimation) }; -MISSION_REGISTER_ACTION(CMissionActionCameraAnimation, "camera_animation"); \ No newline at end of file +MISSION_REGISTER_ACTION(CMissionActionCameraAnimation, "camera_animation"); + +/// sound trigger +// ---------------------------------------------------------------------------- +class CMissionActionSoundTrigger : public IMissionAction +{ + bool buildAction( uint32 line, const std::vector< std::string > & script, CMissionGlobalParsingData & globalData, CMissionSpecificParsingData & missionData) + { + bool ret = true; + _SourceLine = line; + if (script.size() != 3) + { + MISLOGSYNTAXERROR(" : "); + return false; + } + + _SoundName = script[1]; + if (script.size() >= 3) + _SoundPosition = script[2]; + else + _SoundPosition = ""; + + return ret; + } + + void launch(CMission* instance, std::list< CMissionEvent * > & eventList) + { + LOGMISSIONACTION("sound_trigger"); + + // We tell the client to play the sound + }; + std::string _SoundName; + std::string _SoundPosition; + + MISSION_ACTION_GETNEWPTR(CMissionActionSoundTrigger) +}; +MISSION_REGISTER_ACTION(CMissionActionSoundTrigger, "sound_trigger");