Changed: #1469 Sound trigger client impulse implemented

--HG--
branch : gsoc2012-fabien
hg/feature/gsoc2012-fabien
Fabien_HENON 12 years ago
parent a019880cbd
commit 1eadeb0ed5

@ -90,6 +90,7 @@
#include "game_share/position_or_entity_type.h"
#include "nel/misc/vector.h"
#include "nel/misc/entity_id.h"
#include "entity_cl.h"
#define OLD_STRING_SYSTEM
@ -3576,14 +3577,22 @@ void impulsePlaySoundTrigger(NLMISC::CBitMemStream& impulse)
SoundMngr->spawnSource(SoundId, SoundPosition.getPosition());
else
{
NLMISC::CVector pos;
NLMISC::CVectorD pos;
TDataSetIndex compressedIndex = SoundPosition.getEntityId();
CEntityCL *entity = EntitiesMngr.getEntityByCompressedIndex(compressedIndex);
if (!entity)
{
nlwarning("<impulsePlaySoundTrigger> invalid entity with compressed id %d", compressedIndex);
return;
}
else
{
pos = entity->pos();
SoundMngr->spawnSource(SoundId, pos);
}
}
}
void impulseCameraAnimationPlay(NLMISC::CBitMemStream& impulse)
{

@ -15,6 +15,8 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#include "camera_animation_manager/position_or_entity_type_helper.h"
#include "monitor_service/mirrors.h"
#include "game_share/mirror.h"

Loading…
Cancel
Save