mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Added some general UI improvements such as autofilling the color field of the form, and looked at how best to deal with response packets, as it should be part of the spec.
tags: #story[1142]
This commit is contained in:
@@ -186,7 +186,6 @@ public class ServerToClientThread implements Runnable, Observer {
|
||||
long computedCrc = checksum.getValue();
|
||||
long packetCrc = Message.bytesToLong(getBytes(4));
|
||||
if (computedCrc == packetCrc) {
|
||||
//System.out.println("RECEIVED A PACKET");
|
||||
switch (PacketType.assignPacketType(type, payload)) {
|
||||
case BOAT_ACTION:
|
||||
BoatAction actionType = ServerPacketParser
|
||||
@@ -203,7 +202,6 @@ public class ServerToClientThread implements Runnable, Observer {
|
||||
break;
|
||||
|
||||
case RACE_CUSTOMIZATION_REQUEST:
|
||||
System.out.println("CUSTOMIZATION RECEIVED");
|
||||
Long sourceID = Message
|
||||
.bytesToLong(Arrays.copyOfRange(payload, 0, 3));
|
||||
CustomizeRequestType requestType = ServerPacketParser
|
||||
@@ -212,6 +210,7 @@ public class ServerToClientThread implements Runnable, Observer {
|
||||
GameState.customizePlayer(sourceID, requestType,
|
||||
Arrays.copyOfRange(payload, 6, payload.length));
|
||||
GameState.setCustomizationFlag();
|
||||
//// TODO: 17/08/2017 ajm412: Send a response packet here.
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user