Added: #1469 Basis of the implementation of the camera animation action : function created but still empty

--HG--
branch : gsoc2012-fabien
hg/feature/gsoc2012-fabien
Fabien_HENON 13 years ago
parent 5f51257a7d
commit e72956026a

@ -127,4 +127,9 @@ bool CCameraAnimationManager::parseCameraAnimations(const IPrimitive* prim, cons
} }
return ok; return ok;
} }
}
void CCameraAnimationManager::sendAnimation(const NLMISC::CEntityId& eid, const std::string& _AnimationName)
{
} }

@ -20,6 +20,7 @@
#include "nel/ligo/primitive.h" #include "nel/ligo/primitive.h"
#include <string> #include <string>
#include "camera_animation_manager/camera_animation_step_factory.h" #include "camera_animation_manager/camera_animation_step_factory.h"
#include "nel/misc/entity_id.h"
/************************************************************************/ /************************************************************************/
/* Class that manages the camera animations. (singleton). /* Class that manages the camera animations. (singleton).
@ -41,6 +42,9 @@ public:
/// Releases the animations /// Releases the animations
static void release(); static void release();
/// Function that sends all the instructions of a camera animation to the specified entity
void sendAnimation(const NLMISC::CEntityId& eid, const std::string& _AnimationName);
private: private:
/// Constructor /// Constructor
CCameraAnimationManager(); CCameraAnimationManager();

@ -56,6 +56,7 @@
#include "shop_type/named_items.h" #include "shop_type/named_items.h"
#include "server_share/log_item_gen.h" #include "server_share/log_item_gen.h"
#include "server_share/log_character_gen.h" #include "server_share/log_character_gen.h"
#include "camera_animation_manager/camera_animation_manager.h"
using namespace std; using namespace std;
using namespace NLMISC; using namespace NLMISC;
@ -5422,6 +5423,16 @@ class CMissionActionCameraAnimation : public IMissionAction
LOGMISSIONACTION("camera_animation"); LOGMISSIONACTION("camera_animation");
// We tell the client to play the animation by sending him the animation steps // We tell the client to play the animation by sending him the animation steps
std::vector<TDataSetRow> entities;
instance->getEntities(entities);
// For all entities that do this mission
for (uint i = 0; i < entities.size(); i++)
{
// We send the message
CEntityId eid = TheDataset.getEntityId(entities[i]);
CCameraAnimationManager::getInstance()->sendAnimation(eid, _AnimationName);
}
}; };
std::string _AnimationName; std::string _AnimationName;

Loading…
Cancel
Save