From 5a36956f75959887f75fda90c39d56181cd1f196 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Mon, 20 Dec 2010 14:04:31 +0200 Subject: working time-of-day sending from server to client --- src/clientserver.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src/clientserver.h') diff --git a/src/clientserver.h b/src/clientserver.h index 4526083da..5e919b2f7 100644 --- a/src/clientserver.h +++ b/src/clientserver.h @@ -20,6 +20,8 @@ with this program; if not, write to the Free Software Foundation, Inc., #ifndef CLIENTSERVER_HEADER #define CLIENTSERVER_HEADER +#include "utility.h" + #define PROTOCOL_ID 0x4f457403 enum ToClientCommand @@ -90,6 +92,12 @@ enum ToClientCommand v3s16 blockpos block objects */ + + TOCLIENT_TIME_OF_DAY = 0x29, + /* + u16 command + u16 time (0-23999) + */ }; enum ToServerCommand @@ -185,8 +193,13 @@ enum ToServerCommand */ }; -// Flags for TOSERVER_GETBLOCK -#define TOSERVER_GETBLOCK_FLAG_OPTIONAL (1<<0) +inline SharedBuffer makePacket_TOCLIENT_TIME_OF_DAY(u16 time) +{ + SharedBuffer data(2+2); + writeU16(&data[0], TOCLIENT_TIME_OF_DAY); + writeU16(&data[2], time); + return data; +} #endif -- cgit v1.2.3