From 0e1f448b619de6651205692806c6f137f481dc43 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Mon, 2 Jan 2012 13:31:50 +0200 Subject: Texture cache on client (mostly made by sapier) (breaks network compatibility) --- src/clientserver.h | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'src/clientserver.h') diff --git a/src/clientserver.h b/src/clientserver.h index 4d6cd716d..3f97d3732 100644 --- a/src/clientserver.h +++ b/src/clientserver.h @@ -37,9 +37,11 @@ with this program; if not, write to the Free Software Foundation, Inc., Obsolete TOSERVER_GROUND_ACTION PROTOCOL_VERSION 5: Make players to be handled mostly as ActiveObjects + PROTOCOL_VERSION 6: + Only non-cached textures are sent */ -#define PROTOCOL_VERSION 5 +#define PROTOCOL_VERSION 6 #define PROTOCOL_ID 0x4f457403 @@ -235,6 +237,19 @@ enum ToClientCommand u32 length of the next item serialized CraftiItemDefManager */ + + TOCLIENT_ANNOUNCE_TEXTURES = 0x3c, + + /* + u16 command + u32 number of textures + for each texture { + u16 length of name + string name + u16 length of sha1_digest + string sha1_digest + } + */ }; enum ToServerCommand @@ -408,6 +423,17 @@ enum ToServerCommand (Obsoletes TOSERVER_GROUND_ACTION and TOSERVER_CLICK_ACTIVEOBJECT.) */ + TOSERVER_REQUEST_TEXTURES = 0x40, + + /* + u16 command + u16 number of textures requested + for each texture { + u16 length of name + string name + } + */ + }; inline SharedBuffer makePacket_TOCLIENT_TIME_OF_DAY(u16 time) -- cgit v1.2.3