mirror of
https://github.com/rehlds/rehlds.git
synced 2025-01-01 01:25:38 +03:00
parent
612e1b01ff
commit
fb4247d8ef
@ -949,7 +949,7 @@ void EXT_FUNC Cmd_ExecuteString_internal(const char* cmdName, cmd_source_t src,
|
||||
cmd_function_t *cmd = cmd_functions;
|
||||
while (cmd)
|
||||
{
|
||||
if (!Q_stricmp(cmd_argv[0], cmd->name))
|
||||
if (!Q_stricmp(cmdName, cmd->name))
|
||||
{
|
||||
cmd->function();
|
||||
|
||||
@ -968,7 +968,7 @@ void EXT_FUNC Cmd_ExecuteString_internal(const char* cmdName, cmd_source_t src,
|
||||
cmdalias_t *a = cmd_alias;
|
||||
while (a)
|
||||
{
|
||||
if (!Q_stricmp(cmd_argv[0], a->name))
|
||||
if (!Q_stricmp(cmdName, a->name))
|
||||
{
|
||||
|
||||
Cbuf_InsertText(a->value);
|
||||
@ -979,10 +979,15 @@ void EXT_FUNC Cmd_ExecuteString_internal(const char* cmdName, cmd_source_t src,
|
||||
}
|
||||
|
||||
// Search in cvars
|
||||
if (!Cvar_Command() && g_pcls.state >= ca_connected)
|
||||
if (!Cvar_Command())
|
||||
{
|
||||
// Send to a server if nothing processed locally and connected
|
||||
Cmd_ForwardToServer();
|
||||
if (g_pcls.state >= ca_connected)
|
||||
Cmd_ForwardToServer();
|
||||
#ifdef REHLDS_FIXES
|
||||
else if (sv_echo_unknown_cmd.string[0] == '2' || (sv_echo_unknown_cmd.string[1] == '1' && src == src_command))
|
||||
Con_Printf("unknown command \"%s\"\n", cmdName);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -522,6 +522,9 @@ extern cvar_t sv_logblocks;
|
||||
extern cvar_t sv_downloadurl;
|
||||
extern cvar_t sv_allow_dlfile;
|
||||
extern cvar_t sv_version;
|
||||
#ifdef REHLDS_FIXES
|
||||
extern cvar_t sv_echo_unknown_cmd;
|
||||
#endif
|
||||
extern int sv_playermodel;
|
||||
|
||||
extern char outputbuf[MAX_ROUTEABLE_PACKET];
|
||||
|
@ -196,6 +196,7 @@ cvar_t sv_downloadurl = { "sv_downloadurl", "", FCVAR_PROTECTED, 0.0f, NULL };
|
||||
cvar_t sv_allow_dlfile = { "sv_allow_dlfile", "1", 0, 0.0f, NULL };
|
||||
#ifdef REHLDS_FIXES
|
||||
cvar_t sv_version = { "sv_version", "", FCVAR_SERVER, 0.0f, NULL };
|
||||
cvar_t sv_echo_unknown_cmd = { "sv_echo_unknown_cmd", "0", 0, 0.0f, NULL };
|
||||
#else
|
||||
cvar_t sv_version = {"sv_version", "", 0, 0.0f, NULL};
|
||||
#endif
|
||||
@ -7091,6 +7092,9 @@ void SV_Init(void)
|
||||
Cvar_RegisterVariable(&sv_version);
|
||||
Cvar_RegisterVariable(&sv_allow_dlfile);
|
||||
Cvar_RegisterVariable(&sv_force_ent_intersection);
|
||||
#ifdef REHLDS_FIXES
|
||||
Cvar_RegisterVariable(&sv_echo_unknown_cmd);
|
||||
#endif
|
||||
|
||||
for (int i = 0; i < MAX_MODELS; i++)
|
||||
{
|
||||
|
@ -1,9 +1,9 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
cvar_t sv_rehlds_movecmdrate_max_avg = { "sv_rehlds_movecmdrate_max_avg", "750", 0, 750.0f, NULL };
|
||||
cvar_t sv_rehlds_movecmdrate_max_avg = { "sv_rehlds_movecmdrate_max_avg", "300", 0, 300.0f, NULL };
|
||||
cvar_t sv_rehlds_movecmdrate_max_burst = { "sv_rehlds_movecmdrate_max_burst", "1500", 0, 1500.0f, NULL };
|
||||
cvar_t sv_rehlds_stringcmdrate_max_avg = {"sv_rehlds_stringcmdrate_max_avg", "64", 0, 64.0f, NULL};
|
||||
cvar_t sv_rehlds_stringcmdrate_max_burst = {"sv_rehlds_stringcmdrate_max_burst", "128", 0, 128.0f, NULL};
|
||||
cvar_t sv_rehlds_stringcmdrate_max_avg = {"sv_rehlds_stringcmdrate_max_avg", "80", 0, 80.0f, NULL};
|
||||
cvar_t sv_rehlds_stringcmdrate_max_burst = {"sv_rehlds_stringcmdrate_max_burst", "400", 0, 400.0f, NULL};
|
||||
|
||||
CMoveCommandRateLimiter g_MoveCommandRateLimiter;
|
||||
CStringCommandsRateLimiter g_StringCommandsRateLimiter;
|
||||
|
Loading…
Reference in New Issue
Block a user