1 #ifndef PROTOCOL_H_INCLUDED
2 #define PROTOCOL_H_INCLUDED
4 #include <stdint.h>
5 #include <stdbool.h>
6 #include <string.h>
8 #define PROTOCOL_PORT 29386
9 #define PROTOCOL_VERSION 3
10 #define PROTOCOL_F8FRAC (1 << 7)
12 #define PACKED __attribute__((__packed__))
35 };
50 DoesBits code;
87 ClInfo info;
88 ClKill kill;
89 ClDoes does;
94 SvInfo info;
95 SvKill kill;
96 SvSplr splr;
97 SvSbul sbul;
102 ClMessage cl;
103 SvMessage sv;
120 }
121 }
125 }
128 ClInfo m = {
131 };
134 }
139 };
140 }
146 };
147 }
150 SvInfo m = {
155 };
158 }
161 SvKill m = {
163 };
166 }
168 static inline ProtocolMessage sv_splr(int clid, bool live, float x, float y, float r, float vx, float vy, float vr, int shoot) {
180 };
181 }
183 static inline ProtocolMessage sv_sbul(int id, int owner, bool live, float x, float y, float vx, float vy, int tick) {
194 };
195 }
197 #undef PACKED