mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
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:
parent
25bd407b39
commit
cf41004f74
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user