MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / aSoundPlay2DObj

Function aSoundPlay2DObj

scripts/DallasFuncs.cpp:2717–2726  ·  view source on GitHub ↗

$$ACTION Sound && Music Play 2D Sound [n:Sound] for player [o:PlayerObject=IT], volume = [p:Volume=1.0:0.0|1.0] aSoundPlay2DObj Play 2D Sound Plays a sound in 2D Parameters: Sound: the sound to play PlayerObject: the player who hears the sound Volume: how loud to play the sound $$END */

Source from the content-addressed store, hash-verified

2715$$END
2716*/
2717void aSoundPlay2DObj(int soundnum, int objhandle, float volume) {
2718 msafe_struct mstruct;
2719
2720 mstruct.state = 1; // specific player
2721 mstruct.index = soundnum;
2722 mstruct.objhandle = dfGetPlayer(objhandle);
2723 mstruct.volume = volume;
2724
2725 MSafe_CallFunction(MSAFE_SOUND_2D, &mstruct);
2726}
2727
2728/*
2729$$ACTION

Callers 10

CallEventMethod · 0.85
CallEventMethod · 0.85
CallEventMethod · 0.85
CallEventMethod · 0.85
CallEventMethod · 0.85
CallEventMethod · 0.85
CallEventMethod · 0.85
CallEventMethod · 0.85
CallEventMethod · 0.85
CallEventMethod · 0.85

Calls 1

dfGetPlayerFunction · 0.85

Tested by

no test coverage detected