void updateMyMovement(Player player, Stream outStream) {
		synchronized (player) {
			if (player.mapRegionChanged) {
				sendMapRegion();
			}
			if (player.playerTeleported) {
				outStream.createFrameVarSizeWord(81);
				outStream.initBitAccess();
				outStream.writeBits(1, 1);
				outStream.writeBits(2, 3);
				outStream.writeBits(2, player.height);
				outStream.writeBits(1, 1);
				outStream.writeBits(1, (player.updateRequired) ? 1 : 0);
				outStream.writeBits(7, player.curY);
				outStream.writeBits(7, player.curX);
				return;
			}
			if (player.primaryDirection == -1) {
				outStream.createFrameVarSizeWord(81);
				outStream.initBitAccess();
				player.isMoving = false;
				if (player.updateRequired) {
					outStream.writeBits(1, 1);
					outStream.writeBits(2, 0);
				} else {
					outStream.writeBits(1, 0);
				}
			} else {
				outStream.createFrameVarSizeWord(81);
				outStream.initBitAccess();
				outStream.writeBits(1, 1);

				if (player.secondaryDirection == -1) {
					player.isMoving = true;
					outStream.writeBits(2, 1);
					outStream.writeBits(3,
							Misc.xlateDirection[player.primaryDirection]);
					if (player.updateRequired)
						outStream.writeBits(1, 1);
					else
						outStream.writeBits(1, 0);
				} else {
					player.isMoving = true;
					outStream.writeBits(2, 2);
					outStream.writeBits(3,
							Misc.xlateDirection[player.primaryDirection]);
					outStream.writeBits(3,
							Misc.xlateDirection[player.secondaryDirection]);
					if (player.updateRequired)
						outStream.writeBits(1, 1);
					else
						outStream.writeBits(1, 0);
				}
			}
		}
	}