]> git.lizzy.rs Git - dragonblocks_alpha.git/blob - src/server/server_commands.h
35025d5ff690adde274b2b5f1292b3199600184a
[dragonblocks_alpha.git] / src / server / server_commands.h
1 #ifndef _SERVER_COMMANDS_H_
2 #define _SERVER_COMMANDS_H_
3
4 // this file must be included after client.h or server.h and before network.h
5
6 typedef enum
7 {
8         SERVER_COMMAND_NULL,    // invalid command
9         SC_DISCONNECT,                  // client notifies server about disconnecting
10         SC_AUTH,                                // client wants to authentify [body: name (zero terminated string)]
11         SC_SETNODE,                             // player placed a node [body: pos (v3s32), node (MapNode)]
12         SC_POS,                                 // player moved [body: pos (v3f)]
13         SC_REQUEST_BLOCK,               // request to send a block [body: pos (v3s32)]
14         SERVER_COMMAND_COUNT,   // count of available commands
15 } ServerCommand;
16
17 #ifdef _CLIENT_H_
18 typedef ServerCommand RemoteCommand;
19 #endif
20
21 #ifdef _SERVER_H_
22 typedef ServerCommand HostCommand;
23 #define HOST_COMMAND_COUNT SERVER_COMMAND_COUNT
24 #endif
25
26 #endif