Added: #1469 Impulse to tell the client when the animation is finished

--HG--
branch : gsoc2012-fabien
hg/feature/gsoc2012-fabien
Fabien_HENON 13 years ago
parent 73d578b764
commit e584749c5a

@ -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");
}
}
Loading…
Cancel
Save