X-Git-Url: http://deadsoftware.ru/gitweb?p=netwar.git;a=blobdiff_plain;f=protocol.h;h=a96d6932a6728f0eb5d6cb7b6cc95e45abafa63e;hp=68ec54a55aaa9a7c44b2a1af22c74c6c66a71652;hb=0aebaa861295894d8bfd51ee7d02da0d4b63e477;hpb=0ce00cd1d7ade8d9f72a4b7f67154e82ed9079b6 diff --git a/protocol.h b/protocol.h index 68ec54a..a96d693 100644 --- a/protocol.h +++ b/protocol.h @@ -6,7 +6,7 @@ #include #define PROTOCOL_PORT 29386 -#define PROTOCOL_VERSION 2 +#define PROTOCOL_VERSION 3 #define PROTOCOL_F8FRAC (1 << 7) #define PACKED __attribute__((__packed__)) @@ -69,6 +69,7 @@ typedef struct PACKED SvSplr { uint8_t live; uint8_t x, y, r; uint8_t vx, vy, vr; + uint8_t shoot; } SvSplr; typedef struct PACKED SvSbul { @@ -164,17 +165,18 @@ static inline ProtocolMessage sv_kill(const char * msg) { 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, }; }