From 9d1ae54baae521c3078ff38f51b026db3643e610 Mon Sep 17 00:00:00 2001 From: Spoike Date: Wed, 17 Nov 2004 17:49:18 +0000 Subject: [PATCH] server switches to bigcoords git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@444 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/server/sv_init.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/engine/server/sv_init.c b/engine/server/sv_init.c index 8d2ca05e5..ab40a6a9b 100644 --- a/engine/server/sv_init.c +++ b/engine/server/sv_init.c @@ -33,6 +33,7 @@ char localinfo[MAX_LOCALINFO_STRING+1]; // local game info extern cvar_t skill, sv_loadentfiles; extern cvar_t sv_cheats; +extern cvar_t sv_bigcoords; extern qboolean sv_allow_cheats; /* @@ -514,8 +515,19 @@ void SV_SpawnServer (char *server, char *startspot, qboolean noents, qboolean us svs.clients[i].nextservertimeupdate = 0; if (!svs.clients[i].state) //bots with the net_preparse module. svs.clients[i].userinfo[0] = '\0'; //clear the userinfo to clear the name + + if (svs.clients[i].netchan.remote_address.type == NA_LOOPBACK) + { //forget this client's message buffers, so that any shared client/server network state persists (eg: float coords) + svs.clients[i].num_backbuf = 0; + svs.clients[i].datagram.cursize = 0; + } } + if (sv_bigcoords.value) + sizeofcoord = 4; + else + sizeofcoord = 2; + VoteFlushAll(); #ifndef SERVERONLY D_FlushCaches(); @@ -614,7 +626,9 @@ void SV_SpawnServer (char *server, char *startspot, qboolean noents, qboolean us SCR_BeginLoadingPlaque(); #endif - if (sv.worldmodel->fromgame == fg_halflife) + if (sv.worldmodel->fromgame == fg_doom) + Info_SetValueForStarKey(svs.info, "*bspversion", "1", MAX_SERVERINFO_STRING); + else if (sv.worldmodel->fromgame == fg_halflife) Info_SetValueForStarKey(svs.info, "*bspversion", "30", MAX_SERVERINFO_STRING); else if (sv.worldmodel->fromgame == fg_quake2) Info_SetValueForStarKey(svs.info, "*bspversion", "38", MAX_SERVERINFO_STRING);