]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
sv_main: Rename sv_ratelimitlocalplayer to host_limitlocal. Old name still works
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 20 Jul 2020 14:27:32 +0000 (14:27 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 20 Jul 2020 14:27:32 +0000 (14:27 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12842 d7cf8633-e32d-0410-b094-e92efae38249

server.h
sv_main.c

index d83c908bf92725b67448d25ddc7676687ebfafac..480769be00f40d1247af0bb206621803cc5aa61d 100644 (file)
--- 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;
index 8750bac1ebbd7e72beff2be32ec688202a234e32..7e560a544c8503cbaeba104c314d7227986880c3 100644 (file)
--- 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);