X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fclientserver.h;h=b4e9ccfc8931fc3e4ced1132eaf7db859ef481d7;hb=569fca53089b7b7e87b02edd44e2ad47166f7af6;hp=acb4f85308f9ef6240933618694d963f07870cb6;hpb=6a76c226e10e92c3e3339096f07f8ab065e2098b;p=minetest.git diff --git a/src/clientserver.h b/src/clientserver.h index acb4f8530..b4e9ccfc8 100644 --- a/src/clientserver.h +++ b/src/clientserver.h @@ -44,9 +44,11 @@ with this program; if not, write to the Free Software Foundation, Inc., Obsolete TOCLIENT_TOOLDEF Obsolete TOCLIENT_CRAFTITEMDEF Compress the contents of TOCLIENT_ITEMDEF and TOCLIENT_NODEDEF + PROTOCOL_VERSION 8: + Digging based on item groups */ -#define PROTOCOL_VERSION 7 +#define PROTOCOL_VERSION 8 #define PROTOCOL_ID 0x4f457403 @@ -133,6 +135,8 @@ enum ToClientCommand /* u16 command u16 time (0-23999) + Added in a later version: + f1000 time_speed */ // (oops, there is some gap here) @@ -451,11 +455,12 @@ enum ToServerCommand }; -inline SharedBuffer makePacket_TOCLIENT_TIME_OF_DAY(u16 time) +inline SharedBuffer makePacket_TOCLIENT_TIME_OF_DAY(u16 time, float time_speed) { - SharedBuffer data(2+2); + SharedBuffer data(2+2+4); writeU16(&data[0], TOCLIENT_TIME_OF_DAY); writeU16(&data[2], time); + writeF1000(&data[4], time_speed); return data; }