QcMobLegs::State Struct
struct QcMobLegs::StateWhat a walker remembers of its way between ticks. More...
| Header: | #include <server/pathing/QcMobLegs.h> |
Public Functions
| QcMobLegs::Towards | towards(const QcCreature &mob, QcBlockPos target, const QcMobLegs::Routes &routes, QcMobLegs::Budget budget) |
| QcMobLegs::Way | wayOutOfWater(const QcCreature &mob, const QcMobLegs::Routes &routes, QcMobLegs::Budget budget) |
Public Variables
Detailed Description
Member Function Documentation
QcMobLegs::Towards State::towards(const QcCreature &mob, QcBlockPos target, const QcMobLegs::Routes &routes, QcMobLegs::Budget budget)
Returns the cell mob searches a path to now towards target: the shore while it must get out of the water, the target when it lies within reach, else the leg towards it. Asks routes only while budget allows.
QcMobLegs::Way State::wayOutOfWater(const QcCreature &mob, const QcMobLegs::Routes &routes, QcMobLegs::Budget budget)
Returns the shore mob, a walker in water, swims to when it has no path from there (asks routes while budget allows); none while it has a path or stands on dry ground (where it forgets the shore).
Member Variable Documentation
std::optional<QcBlockPos> State::shore
In water without a path to its goal: the cell on land it gets out to first.