From e584749c5a51a3b822b4c3c6a8baacfd165dbe73 Mon Sep 17 00:00:00 2001 From: Fabien_HENON Date: Thu, 5 Jul 2012 22:22:43 +0200 Subject: [PATCH] Added: #1469 Impulse to tell the client when the animation is finished --HG-- branch : gsoc2012-fabien --- .../camera_animation_manager/camera_animation_manager.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/code/ryzom/server/src/entities_game_service/camera_animation_manager/camera_animation_manager.cpp b/code/ryzom/server/src/entities_game_service/camera_animation_manager/camera_animation_manager.cpp index 5d4888e5e..a64df0edf 100644 --- a/code/ryzom/server/src/entities_game_service/camera_animation_manager/camera_animation_manager.cpp +++ b/code/ryzom/server/src/entities_game_service/camera_animation_manager/camera_animation_manager.cpp @@ -147,7 +147,7 @@ void CCameraAnimationManager::sendAnimation(const NLMISC::CEntityId& eid, const void CCameraAnimationManager::TCameraAnimInfo::sendAnimationSteps(const NLMISC::CEntityId& eid) { // We first send an impulse to the client to tell him an animation will start (this way he can remember its current position) - PlayerManager.sendImpulseToClient(eid, "CAMERA_ANIMATION:PLAY", Name); + PlayerManager.sendImpulseToClient(eid, "CAMERA_ANIMATION:PLAY"); // We send the first step, and then the others sendAnimationStepsFrom(eid, 0); @@ -193,4 +193,9 @@ void CCameraAnimationManager::TCameraAnimInfo::sendAnimationStepsFrom(const NLMI NLMISC::TGameCycle duration = (NLMISC::TGameCycle)(Steps[firstStep]->getDuration() / CTickEventHandler::getGameTimeStep()); _Timer->setRemaining(duration, event); } + else + { + // There was no other step, so we send an impulse to tell the client it's finished + PlayerManager.sendImpulseToClient(eid, "CAMERA_ANIMATION:FINISHED"); + } } \ No newline at end of file