From 0ae6e117618b0a64246a9c60c4ca785a7b221078 Mon Sep 17 00:00:00 2001 From: Erik Broes Date: Sat, 17 Sep 2011 14:35:48 +0200 Subject: [PATCH] Fix silly infiniteloop in pingpacket --- .../java/net/minecraft/server/ServerConfigurationManager.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/net/minecraft/server/ServerConfigurationManager.java b/src/main/java/net/minecraft/server/ServerConfigurationManager.java index eb8edb6e07..5acded3e0b 100644 --- a/src/main/java/net/minecraft/server/ServerConfigurationManager.java +++ b/src/main/java/net/minecraft/server/ServerConfigurationManager.java @@ -330,9 +330,8 @@ public class ServerConfigurationManager { int lastIndex = (this.server.ticks * packetsToSend) % totalPacketCount; for (int i = lastIndex; i < lastIndex + packetsToSend; i++) { - i %= totalPacketCount; 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)); }