cmd name is already protected by spam by the sv_clientcommand_antispam system anyway
Also remove unused floodcontrol_voice* fields
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
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;
|| 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);
}
.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))
.int killcount;
-//flood fields
-.float nickspamtime; // time of last nick change
-.float nickspamcount;
-
void SendWelcomeMessage(entity this, int msg_type);
// respawning
// 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)