mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
MarkRounding Message now sent out correctly.
Added submark seqID attribute to each mark of a compound mark from parsing xml Added Rounding side attribute to each individual mark as read from the xml RoundingSide enum now has a method to get Enum from String literal Now store the closest mark to each yacht in each update for purpose of knowing which mark they round Minor code tidying, Added logger to serverToClientThread, removed 'serverLog' method removed obsolete code
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package seng302.gameServer.server.messages;
|
||||
|
||||
import seng302.gameServer.GameState;
|
||||
|
||||
public class MarkRoundingMessage extends Message{
|
||||
private final long MESSAGE_VERSION_NUMBER = 1;
|
||||
private final int MESSAGE_SIZE = 21;
|
||||
@@ -24,7 +26,7 @@ public class MarkRoundingMessage extends Message{
|
||||
* @param markId markId
|
||||
*/
|
||||
public MarkRoundingMessage(int ackNumber, int raceId, int sourceId, RoundingBoatStatus roundingBoatStatus,
|
||||
RoundingSide roundingSide, int markId){
|
||||
RoundingSide roundingSide, MarkType markType, int markId) {
|
||||
this.time = System.currentTimeMillis() / 1000L;
|
||||
this.ackNumber = ackNumber;
|
||||
this.raceId = raceId;
|
||||
@@ -44,6 +46,7 @@ public class MarkRoundingMessage extends Message{
|
||||
putInt((int) sourceId, 4);
|
||||
putByte((byte) boatStatus.getCode());
|
||||
putByte((byte) roundingSide.getCode());
|
||||
putByte((byte) markType.getCode());
|
||||
putByte((byte) markId);
|
||||
|
||||
writeCRC();
|
||||
|
||||
Reference in New Issue
Block a user