diff options
author | Perttu Ahola <celeron55@gmail.com> | 2010-12-20 14:04:31 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2010-12-20 14:04:31 +0200 |
commit | 5a36956f75959887f75fda90c39d56181cd1f196 (patch) | |
tree | 7532418d0f0343bde620932e226446bb75408f86 /src/clientserver.h | |
parent | ab7477c4c3e2a3647dc4fb65c71567946d33b0e3 (diff) | |
download | minetest-5a36956f75959887f75fda90c39d56181cd1f196.tar.gz minetest-5a36956f75959887f75fda90c39d56181cd1f196.tar.bz2 minetest-5a36956f75959887f75fda90c39d56181cd1f196.zip |
working time-of-day sending from server to client
Diffstat (limited to 'src/clientserver.h')
-rw-r--r-- | src/clientserver.h | 17 |
1 files changed, 15 insertions, 2 deletions
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<u8> makePacket_TOCLIENT_TIME_OF_DAY(u16 time) +{ + SharedBuffer<u8> data(2+2); + writeU16(&data[0], TOCLIENT_TIME_OF_DAY); + writeU16(&data[2], time); + return data; +} #endif |