mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
Fix disconnected players being kicked for high ping
This commit is contained in:
parent
48e8c9058a
commit
8130599a4f
1 changed files with 3 additions and 2 deletions
|
@ -4855,7 +4855,8 @@ static inline void PingUpdate(void)
|
||||||
{
|
{
|
||||||
for (i = 1; i < MAXPLAYERS; i++)
|
for (i = 1; i < MAXPLAYERS; i++)
|
||||||
{
|
{
|
||||||
if (playeringame[i] && (realpingtable[i] / pingmeasurecount > (unsigned)cv_maxping.value))
|
if (playeringame[i] && !players[i].quittime
|
||||||
|
&& (realpingtable[i] / pingmeasurecount > (unsigned)cv_maxping.value))
|
||||||
{
|
{
|
||||||
if (players[i].jointime > 30 * TICRATE)
|
if (players[i].jointime > 30 * TICRATE)
|
||||||
laggers[i] = true;
|
laggers[i] = true;
|
||||||
|
@ -4874,8 +4875,8 @@ static inline void PingUpdate(void)
|
||||||
if (playeringame[i] && laggers[i])
|
if (playeringame[i] && laggers[i])
|
||||||
{
|
{
|
||||||
pingtimeout[i]++;
|
pingtimeout[i]++;
|
||||||
if (pingtimeout[i] > cv_pingtimeout.value)
|
|
||||||
// ok your net has been bad for too long, you deserve to die.
|
// ok your net has been bad for too long, you deserve to die.
|
||||||
|
if (pingtimeout[i] > cv_pingtimeout.value)
|
||||||
{
|
{
|
||||||
pingtimeout[i] = 0;
|
pingtimeout[i] = 0;
|
||||||
SendKick(i, KICK_MSG_PING_HIGH | KICK_MSG_KEEP_BODY);
|
SendKick(i, KICK_MSG_PING_HIGH | KICK_MSG_KEEP_BODY);
|
||||||
|
|
Loading…
Reference in a new issue