QcServerDebug Class
Debug data for the clients that ask for it (QcMsg::DebugSubscribe, decision E-225): the tick phases of the server's window, its counts and, on request, where the creatures near the player are heading. More...
| Header: | #include <server/core/QcServerDebug.h> |
Public Functions
| QcMsg::ServerDebug | build(const QcServerClient &client) const |
| void | subscribe(QcServerClient &client, quint8 flags) const |
| void | update(QcServerClient &client) const |
Static Public Members
| const double | goalRange |
| const quint64 | intervalTicks |
Detailed Description
Sent at most twice a second per client and only while subscribed, so a client without a debug display costs nothing. Only operators get it (the local player and listed operators; widened from the local player in stage 24): the counts of the whole server and the positions of chased players are not for every client.
Member Function Documentation
QcMsg::ServerDebug QcServerDebug::build(const QcServerClient &client) const
Returns the debug data for client now, as its subscription asks for it.
void QcServerDebug::subscribe(QcServerClient &client, quint8 flags) const
Subscribes client with flags as in QcMsg::DebugSubscribe, the latest subscription counts. The first message follows with the next tick, unless the previous one went out less than intervalTicks ago (a flood of subscriptions does not speed up the messages). Players without operator rights get nothing.
void QcServerDebug::update(QcServerClient &client) const
Sends client its debug data when it is subscribed and the interval has passed.
Member Variable Documentation
const double QcServerDebug::goalRange
Creatures this close to the player report their goal.
const quint64 QcServerDebug::intervalTicks
Ticks between two messages to a client at least.