Converted NormalSHook to typeset and added old prototype.

New prototype was added in PR #247
This commit is contained in:
Nicholas Hastings 2015-11-25 17:25:35 -05:00
parent c11ac4c25e
commit 0d787e24ce

View File

@ -336,37 +336,45 @@ typedef AmbientSHook = function Action (
float &delay float &delay
); );
/** typeset NormalSHook
* Called when a sound is going to be emitted to one or more clients. {
* NOTICE: all params can be overwritten to modify the default behavior. // Called when a sound is going to be emitted to one or more clients.
* // NOTICE: all params can be overwritten to modify the default behavior.
* @param clients Array of client indexes. //
* @param numClients Number of clients in the array (modify this value if you add/remove elements from the client array). // @param clients Array of client indexes.
* @param sample Sound file name relative to the "sounds" folder. // @param numClients Number of clients in the array (modify this value if you add/remove elements from the client array).
* @param entity Entity emitting the sound. // @param sample Sound file name relative to the "sounds" folder.
* @param channel Channel emitting the sound. // @param entity Entity emitting the sound.
* @param volume Sound volume. // @param channel Channel emitting the sound.
* @param level Sound level. // @param volume Sound volume.
* @param pitch Sound pitch. // @param level Sound level.
* @param flags Sound flags. // @param pitch Sound pitch.
* @param soundEntry Game sound entry name. (Used in engines newer than Portal 2) // @param flags Sound flags.
* @param seed Sound seed. (Used in engines newer than Portal 2) // @param soundEntry Game sound entry name. (Used in engines newer than Portal 2)
* @return Plugin_Continue to allow the sound to be played, Plugin_Stop to block it, // @param seed Sound seed. (Used in engines newer than Portal 2)
* Plugin_Changed when any parameter has been modified. // @return Plugin_Continue to allow the sound to be played, Plugin_Stop to block it,
*/ // Plugin_Changed when any parameter has been modified.
typedef NormalSHook = function Action ( function Action (int clients[64], int &numClients, char sample[PLATFORM_MAX_PATH],
int clients[64], int &entity, int &channel, float &volume, int &level, int &pitch, int &flags,
int &numClients, char soundEntry[PLATFORM_MAX_PATH], int &seed);
char sample[PLATFORM_MAX_PATH],
int &entity, // Called when a sound is going to be emitted to one or more clients.
int &channel, // NOTICE: all params can be overwritten to modify the default behaviour.
float &volume, //
int &level, // @param clients Array of client indexes.
int &pitch, // @param numClients Number of clients in the array (modify this value if you add/remove elements from the client array).
int &flags, // @param sample Sound file name relative to the "sounds" folder.
char soundEntry[PLATFORM_MAX_PATH], // @param entity Entity emitting the sound.
int &seed // @param channel Channel emitting the sound.
); // @param volume Sound volume.
// @param level Sound level.
// @param pitch Sound pitch.
// @param flags Sound flags.
// @return Plugin_Continue to allow the sound to be played, Plugin_Stop to block it,
// Plugin_Changed when any parameter has been modified.
function Action (int clients[64], int &numClients, char sample[PLATFORM_MAX_PATH],
int &entity, int &channel, float &volume, int &level, int &pitch, int &flags);
};
/** /**
* Hooks all played ambient sounds. * Hooks all played ambient sounds.