mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-28 13:36:16 +01:00
Fix silly infiniteloop in pingpacket
This commit is contained in:
parent
e83a197567
commit
0ae6e11761
@ -330,9 +330,8 @@ public class ServerConfigurationManager {
|
|||||||
int lastIndex = (this.server.ticks * packetsToSend) % totalPacketCount;
|
int lastIndex = (this.server.ticks * packetsToSend) % totalPacketCount;
|
||||||
|
|
||||||
for (int i = lastIndex; i < lastIndex + packetsToSend; i++) {
|
for (int i = lastIndex; i < lastIndex + packetsToSend; i++) {
|
||||||
i %= totalPacketCount;
|
|
||||||
toIndex = i % playerCount;
|
toIndex = i % playerCount;
|
||||||
fromIndex = i / playerCount;
|
fromIndex = (i % totalPacketCount) / playerCount;
|
||||||
|
|
||||||
((EntityPlayer) this.players.get(toIndex)).netServerHandler.sendPacket(new Packet201PlayerInfo(((EntityPlayer) this.players.get(fromIndex)).name, true, ((EntityPlayer) this.players.get(fromIndex)).i));
|
((EntityPlayer) this.players.get(toIndex)).netServerHandler.sendPacket(new Packet201PlayerInfo(((EntityPlayer) this.players.get(fromIndex)).name, true, ((EntityPlayer) this.players.get(fromIndex)).i));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user