diff options
author | Perttu Ahola <celeron55@gmail.com> | 2012-03-24 19:01:26 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-03-24 19:01:26 +0200 |
commit | 601d1936c9ab4787d43f55d67900ed7c46fd3452 (patch) | |
tree | b328ea7a66ee7dc37fffddd0ee063a0c7b1ea10f /src/clientserver.h | |
parent | 06e93f8d9508a23e86751dfae2f6a7e550d8e1af (diff) | |
download | minetest-601d1936c9ab4787d43f55d67900ed7c46fd3452.tar.gz minetest-601d1936c9ab4787d43f55d67900ed7c46fd3452.tar.bz2 minetest-601d1936c9ab4787d43f55d67900ed7c46fd3452.zip |
Lua API for playing sounds
Diffstat (limited to 'src/clientserver.h')
-rw-r--r-- | src/clientserver.h | 39 |
1 files changed, 32 insertions, 7 deletions
diff --git a/src/clientserver.h b/src/clientserver.h index b4e9ccfc8..9cbb7a685 100644 --- a/src/clientserver.h +++ b/src/clientserver.h @@ -46,6 +46,7 @@ with this program; if not, write to the Free Software Foundation, Inc., Compress the contents of TOCLIENT_ITEMDEF and TOCLIENT_NODEDEF PROTOCOL_VERSION 8: Digging based on item groups + Many things */ #define PROTOCOL_VERSION 8 @@ -268,7 +269,25 @@ enum ToClientCommand u32 length of next item serialized ItemDefManager */ + + TOCLIENT_PLAY_SOUND = 0x3f, + /* + u16 command + s32 sound_id + u16 len + u8[len] sound name + s32 gain*1000 + u8 type (0=local, 1=positional, 2=object) + s32[3] pos_nodes*10000 + u16 object_id + u8 loop (bool) + */ + TOCLIENT_STOP_SOUND = 0x40, + /* + u16 command + s32 sound_id + */ }; enum ToServerCommand @@ -442,15 +461,21 @@ enum ToServerCommand (Obsoletes TOSERVER_GROUND_ACTION and TOSERVER_CLICK_ACTIVEOBJECT.) */ - TOSERVER_REQUEST_TEXTURES = 0x40, + TOSERVER_REMOVED_SOUNDS = 0x3a, + /* + u16 command + u16 len + s32[len] sound_id + */ + TOSERVER_REQUEST_TEXTURES = 0x40, /* - u16 command - u16 number of textures requested - for each texture { - u16 length of name - string name - } + u16 command + u16 number of textures requested + for each texture { + u16 length of name + string name + } */ }; |