From 2d082ee04a435f62abd1d04cf96261635e8975f0 Mon Sep 17 00:00:00 2001 From: Caleb Foust Date: Sun, 10 Oct 2021 11:31:53 -0700 Subject: [PATCH] Upgrade the server protocol --- .earthignore | 2 ++ Earthfile | 4 +--- services/server/engine/server.cpp | 1 + services/server/fpsgame/game.h | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 .earthignore diff --git a/.earthignore b/.earthignore new file mode 100644 index 00000000..855c7981 --- /dev/null +++ b/.earthignore @@ -0,0 +1,2 @@ +services/server/CMakeCache.txt +services/server/CMakeFiles/** diff --git a/Earthfile b/Earthfile index bee479fe..e59222bc 100644 --- a/Earthfile +++ b/Earthfile @@ -16,9 +16,7 @@ server: FROM +cpp COPY services/server . RUN cmake . - # cache cmake temp files to prevent rebuilding .o files - # when the .cpp files don't change - RUN --mount=type=cache,target=/code/CMakeFiles make + RUN make SAVE ARTIFACT qserv AS LOCAL "build/qserv" assets: diff --git a/services/server/engine/server.cpp b/services/server/engine/server.cpp index 98dd22c4..af8b02cd 100755 --- a/services/server/engine/server.cpp +++ b/services/server/engine/server.cpp @@ -1154,6 +1154,7 @@ void initserver(bool listen, bool dedicated) //, const char *path if(listen) setuplistenserver(dedicated); server::serverinit(); + logoutf("Protocol version: %d", PROTOCOL_VERSION); if(listen) { diff --git a/services/server/fpsgame/game.h b/services/server/fpsgame/game.h index 307d6dff..8ae26e42 100755 --- a/services/server/fpsgame/game.h +++ b/services/server/fpsgame/game.h @@ -280,7 +280,7 @@ static const int msgsizes[] = // size inclusive message token, 0 f #define SAUERBRATEN_SERVER_PORT 28785 #define SAUERBRATEN_SERVINFO_PORT 28786 #define SAUERBRATEN_MASTER_PORT 28787 -#define PROTOCOL_VERSION 259 // bump when protocol changes +#define PROTOCOL_VERSION 260 // bump when protocol changes #define DEMO_VERSION 1 // bump when demo format changes #define DEMO_MAGIC "SAUERBRATEN_DEMO"