@Override public byte[] constructResponseInBytes() { GamePacket packet = new GamePacket(responseCode); packet.addString(username); packet.addString(character); return packet.getBytes(); }
@Override public byte[] constructResponseInBytes() { // TODO Auto-generated method stub GamePacket packet = new GamePacket(responseCode); packet.addString(player.getUsername()); packet.addFloat(player.getPosition().getX()); packet.addFloat(player.getPosition().getY()); packet.addFloat(player.getPosition().getZ()); packet.addFloat(player.getPosition().getH()); packet.addFloat(player.getPosition().getP()); packet.addFloat(player.getPosition().getR()); packet.addInt32(this.forward); packet.addInt32(this.backward); packet.addInt32(this.right); packet.addInt32(this.left); return packet.getBytes(); }
@Override public byte[] constructResponseInBytes() { // TODO Auto-generated method stub GamePacket packet = new GamePacket(responseCode); System.out.println( "Sending Protocol: " + responseCode + " class: " + this.getClass().getName()); packet.addString(player.getUsername()); packet.addFloat(player.getPosition().getSteering()); packet.addFloat(player.getPosition().getWheelforce()); packet.addFloat(player.getPosition().getBrakeforce()); packet.addFloat(player.getPosition().getX()); packet.addFloat(player.getPosition().getY()); packet.addFloat(player.getPosition().getZ()); packet.addFloat(player.getPosition().getH()); packet.addFloat(player.getPosition().getP()); packet.addFloat(player.getPosition().getR()); return packet.getBytes(); }