QtCraft API C++ classes QML types Handbook

QcRefusalThrottle Class

Reports an action the game mode refused (adventure mode, decision E-735) at most once in reportTicks ticks, so that a held button does not flood the HUD with notices. More...

Header: #include <clientcore/player/QcRefusalThrottle.h>

Public Functions

bool report(quint64 tick)

Static Public Members

const quint64 reportTicks

Detailed Description

Part of QcClientSession, which emits QcClientSession::actionRefused() when report() agrees.

Member Function Documentation

bool QcRefusalThrottle::report(quint64 tick)

An action was refused at tick tick. Returns whether to report it; a report holds back the next ones for reportTicks ticks.

Member Variable Documentation

const quint64 QcRefusalThrottle::reportTicks

A refused action is reported at most once in this many ticks (2 s).