mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Fixed bug where players were being added to the GameState twice
#story[1047]
This commit is contained in:
@@ -28,8 +28,6 @@ public class ServerListenThread extends Thread{
|
|||||||
SocketChannel thisClient = socketChannel.accept();
|
SocketChannel thisClient = socketChannel.accept();
|
||||||
if (thisClient.socket() != null){
|
if (thisClient.socket() != null){
|
||||||
Player thisPlayer = new Player(thisClient);
|
Player thisPlayer = new Player(thisClient);
|
||||||
GameState.addPlayer(thisPlayer);
|
|
||||||
|
|
||||||
delegate.clientConnected(thisPlayer);
|
delegate.clientConnected(thisPlayer);
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ public class Header {
|
|||||||
private void putInBuffer(byte[] bytes, long val){
|
private void putInBuffer(byte[] bytes, long val){
|
||||||
byte[] tmp = bytes.clone();
|
byte[] tmp = bytes.clone();
|
||||||
Message.reverse(tmp);
|
Message.reverse(tmp);
|
||||||
|
|
||||||
buff.put(tmp);
|
buff.put(tmp);
|
||||||
buffPos += tmp.length;
|
buffPos += tmp.length;
|
||||||
buff.position(buffPos);
|
buff.position(buffPos);
|
||||||
|
|||||||
Reference in New Issue
Block a user