diff options
-rw-r--r-- | source/sv_game.c | 2 | ||||
-rw-r--r-- | source/sv_init.c | 11 | ||||
-rw-r--r-- | source/sv_local.h | 5 | ||||
-rw-r--r-- | source/sv_main.c | 15 |
4 files changed, 18 insertions, 15 deletions
diff --git a/source/sv_game.c b/source/sv_game.c index 24074f4..f135b36 100644 --- a/source/sv_game.c +++ b/source/sv_game.c @@ -701,7 +701,7 @@ void PF_Pmove( pmove_t *pm ) { if( sv_client ) { Pmove( pm, &sv_client->pmp ); } else { - Pmove( pm, &sv.pmp ); + Pmove( pm, &sv_pmp ); } } diff --git a/source/sv_init.c b/source/sv_init.c index cb91de2..66d71f5 100644 --- a/source/sv_init.c +++ b/source/sv_init.c @@ -107,17 +107,6 @@ void SV_SpawnServer( const char *server, const char *spawnpoint ) { } // - // set up default pmove parameters - // - sv.pmp.maxspeed = 300; - sv.pmp.upspeed = 350; - sv.pmp.friction = 6; - sv.pmp.flyfriction = 9; - sv.pmp.waterfriction = 1; - sv.pmp.airaccelerate = sv_airaccelerate->integer ? qtrue : qfalse; - sv.pmp.speedMultiplier = 1; - - // // clear physics interaction links // SV_ClearWorld(); diff --git a/source/sv_local.h b/source/sv_local.h index 5bbd9db..b4bb68c 100644 --- a/source/sv_local.h +++ b/source/sv_local.h @@ -75,8 +75,6 @@ typedef struct server_s { byte dcs[CS_BITMAP_BYTES]; } mvd; - pmoveParams_t pmp; - uint32 tracecount; } server_t; @@ -321,6 +319,9 @@ extern list_t sv_blacklist; extern server_static_t svs; // persistant server info extern server_t sv; // local server +extern pmoveParams_t sv_pmp; + + extern cvar_t *sv_hostname; extern cvar_t *sv_maxclients; extern cvar_t *sv_password; diff --git a/source/sv_main.c b/source/sv_main.c index 8b40ff9..008a194 100644 --- a/source/sv_main.c +++ b/source/sv_main.c @@ -23,6 +23,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. netadr_t master_adr[MAX_MASTERS]; // address of group servers +pmoveParams_t sv_pmp; + LIST_DECL( sv_banlist ); LIST_DECL( sv_blacklist ); @@ -799,7 +801,8 @@ static void SVC_DirectConnect( void ) { strcpy( newcl->reconnect_val, reconnect_val ); // copy default pmove parameters - newcl->pmp = sv.pmp; + newcl->pmp = sv_pmp; + newcl->pmp.airaccelerate = sv_airaccelerate->integer ? qtrue : qfalse; #ifdef PMOVE_HACK newcl->pmp.highprec = qtrue; #endif @@ -1716,6 +1719,16 @@ void SV_Init( void ) { SV_RateInit( &svs.ratelimit_status, sv_status_limit->integer, 1000 ); SV_RateInit( &svs.ratelimit_badpass, 1, sv_badauth_time->value * 1000 ); SV_RateInit( &svs.ratelimit_badrcon, 1, sv_badauth_time->value * 1000 ); + + // + // set up default pmove parameters + // + sv_pmp.maxspeed = 300; + sv_pmp.upspeed = 350; + sv_pmp.friction = 6; + sv_pmp.flyfriction = 9; + sv_pmp.waterfriction = 1; + sv_pmp.speedMultiplier = 1; } /* |