dao::attack::FacingTurn

struct

The turn an attacker’s command makes to face its target before the blow, computed for now.

Declared in dao/Attack.h.

Fields

Field Type  
degrees float = 0 The turn still to make, in degrees from -180 to 180; positive is counter-clockwise seen from above.
done bool = false already facing to within 1 degree, so the command will not turn
point Vector The point the attacker turns toward: a point on the target for a melee attacker, the target’s position for a ranged one.
stalls bool = false The turn is not done and the game will never start it, so the command waits forever. This happens when the creature’s movement controller, which walks and turns it, is idle and already thinks it faces toward. FaceExactly fixes it.
toward Vector the unit direction on the ground from the attacker to point
waits bool = false The turn is not done and has not started only because one of the creature’s own animations is playing. It starts by itself when the animation ends, so nothing needs fixing.