mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
working time-of-day sending from server to client
This commit is contained in:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user