diff --git a/source/src/client.cpp b/source/src/client.cpp index 1d7d65f1..e407c517 100644 --- a/source/src/client.cpp +++ b/source/src/client.cpp @@ -556,12 +556,9 @@ void c2sinfo(playerent *d) // send update to the server lastupdate = totalmillis; } -void sendintro() +int getbuildtype() { - packetbuf p(MAXTRANS, ENET_PACKET_FLAG_RELIABLE); - putint(p, SV_CONNECT); - putint(p, AC_VERSION); - putint(p, (isbigendian() ? 0x80 : 0 )|(adler((unsigned char *)guns, sizeof(guns)) % 31 << 8)| + return (isbigendian() ? 0x80 : 0 )|(adler((unsigned char *)guns, sizeof(guns)) % 31 << 8)| #ifdef WIN32 0x40 | #endif @@ -574,7 +571,15 @@ void sendintro() #ifdef __GNUC__ 0x04 | #endif - 0); + 0; +} + +void sendintro() +{ + packetbuf p(MAXTRANS, ENET_PACKET_FLAG_RELIABLE); + putint(p, SV_CONNECT); + putint(p, AC_VERSION); + putint(p, getbuildtype()); sendstring(player1->name, p); sendstring(genpwdhash(player1->name, clientpassword, sessionid), p); const char *lang = getalias("LANG"); diff --git a/source/src/protos.h b/source/src/protos.h index f6f2ba11..7f766ec8 100644 --- a/source/src/protos.h +++ b/source/src/protos.h @@ -358,6 +358,7 @@ extern void changeteam(int team, bool respawn = true); // deprecated? extern void getmap(); extern void newteam(char *name); extern bool securemapcheck(const char *map, bool msg = true); +extern int getbuildtype(); extern void sendintro(); extern void getdemo(char *idx, char *dsp); extern void listdemos(); diff --git a/source/src/serverbrowser.cpp b/source/src/serverbrowser.cpp index 9eb195f2..2cc5d236 100644 --- a/source/src/serverbrowser.cpp +++ b/source/src/serverbrowser.cpp @@ -1287,7 +1287,7 @@ void retrieveservers(vector &data) int starttime = SDL_GetTicks(), timeout = 0; string request; - sprintf(request, "list %s %d\n",global_name,AC_VERSION); + sprintf(request, "list %s %d %d\n",global_name,AC_VERSION,getbuildtype()); const char *req = request; int reqlen = strlen(req); ENetBuffer buf;