From: cloudwalk Date: Mon, 20 Jul 2020 14:27:32 +0000 (+0000) Subject: sv_main: Rename sv_ratelimitlocalplayer to host_limitlocal. Old name still works X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b3111563c36c46f81459d8fb8499849ee8132491;p=xonotic%2Fdarkplaces.git sv_main: Rename sv_ratelimitlocalplayer to host_limitlocal. Old name still works git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12842 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/server.h b/server.h index d83c908b..480769be 100644 --- a/server.h +++ b/server.h @@ -487,7 +487,7 @@ extern cvar_t sv_playerphysicsqc; extern cvar_t sv_progs; extern cvar_t sv_protocolname; extern cvar_t sv_random_seed; -extern cvar_t sv_ratelimitlocalplayer; +extern cvar_t host_limitlocal; extern cvar_t sv_sound_land; extern cvar_t sv_sound_watersplash; extern cvar_t sv_stepheight; diff --git a/sv_main.c b/sv_main.c index 8750bac1..7e560a54 100644 --- a/sv_main.c +++ b/sv_main.c @@ -142,7 +142,7 @@ cvar_t sv_playerphysicsqc = {CVAR_SERVER | CVAR_NOTIFY, "sv_playerphysicsqc", "1 cvar_t sv_progs = {CVAR_SERVER, "sv_progs", "progs.dat", "selects which quakec progs.dat file to run" }; cvar_t sv_protocolname = {CVAR_SERVER, "sv_protocolname", "DP7", "selects network protocol to host for (values include QUAKE, QUAKEDP, NEHAHRAMOVIE, DP1 and up)"}; cvar_t sv_random_seed = {CVAR_SERVER, "sv_random_seed", "", "random seed; when set, on every map start this random seed is used to initialize the random number generator. Don't touch it unless for benchmarking or debugging"}; -cvar_t sv_ratelimitlocalplayer = {CVAR_SERVER, "sv_ratelimitlocalplayer", "0", "whether to apply rate limiting to the local player in a listen server (only useful for testing)"}; +cvar_t host_limitlocal = {CVAR_SERVER, "host_limitlocal", "0", "whether to apply rate limiting to the local player in a listen server (only useful for testing)"}; cvar_t sv_sound_land = {CVAR_SERVER, "sv_sound_land", "demon/dland2.wav", "sound to play when MOVETYPE_STEP entity hits the ground at high speed (empty cvar disables the sound)"}; cvar_t sv_sound_watersplash = {CVAR_SERVER, "sv_sound_watersplash", "misc/h2ohit1.wav", "sound to play when MOVETYPE_FLY/TOSS/BOUNCE/STEP entity enters or leaves water (empty cvar disables the sound)"}; cvar_t sv_stepheight = {CVAR_SERVER | CVAR_NOTIFY, "sv_stepheight", "18", "how high you can step up (TW_SV_STEPCONTROL extension)"}; @@ -564,7 +564,8 @@ void SV_Init (void) Cvar_RegisterVariable (&sv_progs); Cvar_RegisterVariable (&sv_protocolname); Cvar_RegisterVariable (&sv_random_seed); - Cvar_RegisterVariable (&sv_ratelimitlocalplayer); + Cvar_RegisterVariable (&host_limitlocal); + Cvar_RegisterAlias(&host_limitlocal, "sv_ratelimitlocalplayer"); Cvar_RegisterVariable (&sv_sound_land); Cvar_RegisterVariable (&sv_sound_watersplash); Cvar_RegisterVariable (&sv_stepheight); @@ -2536,7 +2537,7 @@ static void SV_SendClientDatagram (client_t *client) break; } - if (LHNETADDRESS_GetAddressType(&host_client->netconnection->peeraddress) == LHNETADDRESSTYPE_LOOP && !sv_ratelimitlocalplayer.integer) + if (LHNETADDRESS_GetAddressType(&host_client->netconnection->peeraddress) == LHNETADDRESSTYPE_LOOP && !host_limitlocal.integer) { // for good singleplayer, send huge packets maxsize = sizeof(sv_sendclientdatagram_buf);