]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove cruft of an outdated system against cmd name spam (not functional because...
authorterencehill <piuntn@gmail.com>
Fri, 9 Aug 2024 21:27:28 +0000 (23:27 +0200)
committerterencehill <piuntn@gmail.com>
Sat, 10 Aug 2024 00:01:20 +0000 (02:01 +0200)
cmd name is already protected by spam by the sv_clientcommand_antispam system anyway

Also remove unused floodcontrol_voice* fields

qcsrc/common/physics/player.qc
qcsrc/common/physics/player.qh
qcsrc/ecs/systems/sv_physics.qc
qcsrc/server/chat.qh
qcsrc/server/client.qh
qcsrc/server/command/common.qc

index 670aa854933ddcd644786367631fb0ea1464cf32..b007afaf1875342cfd2b5afa988ba81603bf8320 100644 (file)
@@ -602,28 +602,6 @@ bool PM_check_specialcommand(entity this, int buttons)
        return false;
 }
 
-void PM_check_nickspam(entity this)
-{
-#ifdef SVQC
-       if (time >= this.nickspamtime)
-               return;
-       if (this.nickspamcount >= autocvar_g_nick_flood_penalty_yellow)
-       {
-               // slight annoyance for nick change scripts
-               PHYS_CS(this).movement = -1 * PHYS_CS(this).movement;
-               PHYS_INPUT_BUTTON_ATCK(this) = PHYS_INPUT_BUTTON_JUMP(this) = PHYS_INPUT_BUTTON_ATCK2(this) = PHYS_INPUT_BUTTON_ZOOM(this) = PHYS_INPUT_BUTTON_CROUCH(this) = PHYS_INPUT_BUTTON_HOOK(this) = PHYS_INPUT_BUTTON_USE(this) = false;
-
-               if (this.nickspamcount >= autocvar_g_nick_flood_penalty_red) // if you are persistent and the slight annoyance above does not stop you, I'll show you!
-               {
-                       this.v_angle_x = random() * 360;
-                       this.v_angle_y = random() * 360;
-                       // at least I'm not forcing retardedview by also assigning to angles_z
-                       this.fixangle = true;
-               }
-       }
-#endif
-}
-
 void PM_check_punch(entity this, float dt)
 {
 #ifdef SVQC
index 4bd214929658c80afa23d6c21c9cf515546f5ae2..ea827f4fedb168523b15691f60ece620d66a77ab 100644 (file)
@@ -36,10 +36,6 @@ bool autocvar_g_physics_clientselect;
 float autocvar_g_maxspeed;
 float autocvar_g_movement_highspeed = 1;
 bool autocvar_g_movement_highspeed_q3_compat = 0;
-//float autocvar_g_nick_flood_penalty;
-int autocvar_g_nick_flood_penalty_red;
-int autocvar_g_nick_flood_penalty_yellow;
-//float autocvar_g_nick_flood_timeout;
 bool autocvar_speedmeter;
 string autocvar_sv_jumpspeedcap_max;
 float autocvar_sv_jumpspeedcap_max_disable_on_ramps;
index 1454d0049fe76b0d6211f0e98e7379b47bb20857..2d00a4d21a81ff7b28d5b08b35dfd4e0cac7823e 100644 (file)
@@ -31,7 +31,6 @@ void sys_phys_monitor(entity this, float dt)
                    || CS(this).movement != CS(this).movement_old
                    || this.v_angle != CS(this).v_angle_old) { CS(this).parm_idlesince = time; }
        }
-       PM_check_nickspam(this);
        PM_check_punch(this, dt);
 }
 
index 7d7a730f488aab2b479eb8e0cfe537b0f370f597..1b2f970b46b33b753529729db1873bcf049fc196 100644 (file)
@@ -26,8 +26,6 @@ float nearest_length[NUM_NEAREST_ENTITIES];
 .float floodcontrol_chat;
 .float floodcontrol_chatteam;
 .float floodcontrol_chattell;
-.float floodcontrol_voice;
-.float floodcontrol_voiceteam;
 
 #define CHAT_NOSPECTATORS() ((autocvar_g_chat_nospectators == 1) || (autocvar_g_chat_nospectators == 2 && !warmup_stage))
 
index d7fb948373ab1c45e692deb63f518cc1d2ca2e63..815e2639041f006759e05d0fd83cee3a5b7f8588 100644 (file)
@@ -316,10 +316,6 @@ bool independent_players;
 
 .int killcount;
 
-//flood fields
-.float nickspamtime; // time of last nick change
-.float nickspamcount;
-
 void SendWelcomeMessage(entity this, int msg_type);
 
 // respawning
index 6138bd8b5b4734ed0222d0eedbbcade4b2904aeb..c446664ec054ebeeeaa3f6ba3c4378d7410f4802 100644 (file)
@@ -246,9 +246,7 @@ void timeout_handler_think(entity this)
 
                                // reset all the flood variables
                                FOREACH_CLIENT(true, {
-                                       it.nickspamcount = it.nickspamtime = it.floodcontrol_chat =
-                                               it.floodcontrol_chatteam = it.floodcontrol_chattell =
-                                                       it.floodcontrol_voice = it.floodcontrol_voiceteam = 0;
+                                       it.floodcontrol_chat = it.floodcontrol_chatteam = it.floodcontrol_chattell = 0;
                                });
 
                                // copy .v_angle to .lastV_angle for every player in order to fix their view during pause (see PlayerPreThink)