debug overlay and others

This commit is contained in:
Sen 2025-03-11 16:18:06 +01:00
parent 8038516a66
commit d629e8fb7b
4 changed files with 115 additions and 67 deletions

View file

@ -3,6 +3,7 @@ package game.network;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import game.Game;
import game.audio.PositionedSound;
@ -1492,14 +1493,14 @@ public class NetHandlerPlayClient extends NetHandler
else
this.playerList.put(data.getKey(), data.getValue());
}
String[] list = new String[this.playerList.size()];
int[] data = new int[this.playerList.size()];
int pos = 0;
for(Entry<String, Integer> entry : this.playerList.entrySet()) {
list[pos] = entry.getKey();
data[pos++] = entry.getValue();
}
this.gameController.infolist(list, data);
// String[] list = new String[this.playerList.size()];
// int[] data = new int[this.playerList.size()];
// int pos = 0;
// for(Entry<String, Integer> entry : this.playerList.entrySet()) {
// list[pos] = entry.getKey();
// data[pos++] = entry.getValue();
// }
// this.gameController.infolist(list, data);
}
public void handleKeepAlive(SPacketKeepAlive packetIn)
@ -1849,8 +1850,8 @@ public class NetHandlerPlayClient extends NetHandler
return this.netManager;
}
// public List<Entry<String, Integer>> getPlayerList()
// {
// return this.players;
// }
public Set<Entry<String, Integer>> getPlayerList()
{
return this.playerList.entrySet();
}
}