Cleanup 'CServerGameClients::ProcessUserCmds'

Client gets dropped if buffer overflow flag is set, remove old code and just print the warning.
This commit is contained in:
Amos 2023-08-13 18:08:14 +02:00
parent 25bd407b39
commit cf41004f74

View File

@ -15,6 +15,7 @@
#include "gameinterface.h"
#include "entitylist.h"
#include "baseanimating.h"
#include "engine/server/server.h"
#include "game/shared/usercmd.h"
#include "game/server/util_server.h"
@ -137,16 +138,11 @@ void CServerGameClients::ProcessUserCmds(CServerGameClients* thisp, edict_t edic
if (totalCmds < 0 || totalCmds >= (MAX_BACKUP_COMMANDS_PROCESS - 1) ||
numCmds < 0 || numCmds > totalCmds)
{
//const char* name = "unknown";
//if (pPlayer)
//{
// name = pPlayer->GetPlayerName();
//}
//Warning(eDLL_T::SERVER, "%s: too many cmds %i sent for player %s\n", __FUNCTION__, totalCmds, name);
// !TODO: Drop the client from here.
CClient* pClient = g_pServer->GetClient(edict-1);
Warning(eDLL_T::SERVER, "%s: Player '%s' sent too many cmds (%i)\n", __FUNCTION__, pClient->GetServerName(), totalCmds);
buf->SetOverflowFlag();
return;
}
@ -158,7 +154,7 @@ void CServerGameClients::ProcessUserCmds(CServerGameClients* thisp, edict_t edic
from = to;
}
// Client not fully connected or server has gone inactive or is paused, just ignore
// Client not fully connected or server has gone inactive or is paused, just ignore
if (ignore || !pPlayer)
{
return;