Added: #1469 Implementation of the sound trigger action

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

@ -5464,6 +5464,15 @@ class CMissionActionSoundTrigger : public IMissionAction
LOGMISSIONACTION("sound_trigger");
// We tell the client to play the sound
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]);
PlayerManager.sendImpulseToClient(eid, "SOUND_TRIGGER:PLAY", _SoundId, _SoundPosition);
}
};
std::string _SoundPosition;
NLMISC::CSheetId _SoundId;

Loading…
Cancel
Save