diff --git a/protocol.h b/protocol.h
index 68ec54a55aaa9a7c44b2a1af22c74c6c66a71652..a96d6932a6728f0eb5d6cb7b6cc95e45abafa63e 100644 (file)
--- a/protocol.h
+++ b/protocol.h
#include <string.h>
#define PROTOCOL_PORT 29386
-#define PROTOCOL_VERSION 2
+#define PROTOCOL_VERSION 3
#define PROTOCOL_F8FRAC (1 << 7)
#define PACKED __attribute__((__packed__))
uint8_t live;
uint8_t x, y, r;
uint8_t vx, vy, vr;
+ uint8_t shoot;
} SvSplr;
typedef struct PACKED SvSbul {
return (ProtocolMessage) (SvMessage) m;
}
-static inline ProtocolMessage sv_splr(int clid, bool live, float x, float y, float r, float vx, float vy, float vr) {
+static inline ProtocolMessage sv_splr(int clid, bool live, float x, float y, float r, float vx, float vy, float vr, int shoot) {
return (ProtocolMessage) (SvMessage) (SvSplr) {
- .type = SV_SPLR,
- .clid = clid,
- .live = live,
- .x = f2b(x),
- .y = f2b(y),
- .r = f2b(r),
+ .type = SV_SPLR,
+ .clid = clid,
+ .live = live,
+ .x = f2b(x),
+ .y = f2b(y),
+ .r = f2b(r),
.vx = f2b(vx),
.vy = f2b(vy),
.vr = f2b(vr),
+ .shoot = shoot,
};
}