mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
Merge branch 'fix-keepbody-ping' into 'master'
Fix disconnected players being kicked for high ping See merge request STJr/SRB2!866
This commit is contained in:
commit
b6f1155ae1
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]++;
|
||||||
|
// ok your net has been bad for too long, you deserve to die.
|
||||||
if (pingtimeout[i] > cv_pingtimeout.value)
|
if (pingtimeout[i] > cv_pingtimeout.value)
|
||||||
// ok your net has been bad for too long, you deserve to die.
|
|
||||||
{
|
{
|
||||||
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