QtCraft API C++ classes QML types Handbook

QcCreatureBodies Class

The creatures' push on players (decision E-882): the bodies of the awake creatures that push players (QcBodyPush::pushesPlayers) in a grid of columns (QcBodyGrid). More...

Header: #include <server/mobs/QcCreatureBodies.h>

Public Functions

QcVec3 pushOnPlayer(const QcVec3 &feet, const QList<QcCreature> &mobs, QcMobKinds definitions, quint64 tick, quint64 generation)

Detailed Description

Players move between the server's ticks, as their inputs arrive; the creatures stand still then, so the grid is built at most once between two ticks, when the first input needs it, and every input of every player looks only at the columns around that player.

Member Function Documentation

QcVec3 QcCreatureBodies::pushOnPlayer(const QcVec3 &feet, const QList<QcCreature> &mobs, QcMobKinds definitions, quint64 tick, quint64 generation)

Returns the push on a player with their feet at feet (a velocity, QcBodyPush::playerVelocity) from mobs (kinds in definitions) as they stand in server tick tick, with generation counting every creature added to or removed from them (QcMobManager).