QtCraft API C++ classes QML types Handbook

QcMsg::MapUpdate Struct

struct QcMsg::MapUpdate

Server -> client: what is new of map id for a player holding it (decision E-802): its place on the grid, the pixels of area row by row (QcMapPixel; an empty area sends none) and the players shown on it now (QcMapMarker). More...

Header: #include <common/protocol/QcMapMessages.h>

Public Variables

QRect area
QPoint centre
quint32 id
QList<QcMapMarker> markers
QList<quint16> pixels
quint8 scale

Detailed Description

The first update of a map the client has not seen covers every pixel shown so far; later ones only the rectangle that changed since. The pixels travel compressed when that is shorter.

Member Variable Documentation

QRect MapUpdate::area

The rectangle of pixels sent.

QPoint MapUpdate::centre

The block column at its middle (QcMapData::centre).

quint32 MapUpdate::id

The map's id.

QList<QcMapMarker> MapUpdate::markers

The players shown on it.

QList<quint16> MapUpdate::pixels

The pixels of area, row by row.

quint8 MapUpdate::scale

The map's scale (QcMapData::scale).