summaryrefslogtreecommitdiffstats
path: root/src/main/java/net
diff options
context:
space:
mode:
authorErik Broes <erikbroes@grum.nl>2011-09-17 14:35:48 +0200
committerErik Broes <erikbroes@grum.nl>2011-09-17 14:35:48 +0200
commit0ae6e117618b0a64246a9c60c4ca785a7b221078 (patch)
tree9b667067cd48baf84574e119bb4320ee9cc6be9a /src/main/java/net
parente83a1975677b1e25e30036e72501980bb646acc2 (diff)
downloadcraftbukkit-0ae6e117618b0a64246a9c60c4ca785a7b221078.tar
craftbukkit-0ae6e117618b0a64246a9c60c4ca785a7b221078.tar.gz
craftbukkit-0ae6e117618b0a64246a9c60c4ca785a7b221078.tar.lz
craftbukkit-0ae6e117618b0a64246a9c60c4ca785a7b221078.tar.xz
craftbukkit-0ae6e117618b0a64246a9c60c4ca785a7b221078.zip
Fix silly infiniteloop in pingpacket
Diffstat (limited to 'src/main/java/net')
-rw-r--r--src/main/java/net/minecraft/server/ServerConfigurationManager.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main/java/net/minecraft/server/ServerConfigurationManager.java b/src/main/java/net/minecraft/server/ServerConfigurationManager.java
index eb8edb6e..5acded3e 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));
}