Files

34 lines
572 B
C
Raw Permalink Normal View History

2026-03-01 12:16:08 +08:00
#pragma once
#include "Control.h"
class Mob;
class MoveControl : public Control
{
public:
static const float MIN_SPEED;
static const float MIN_SPEED_SQR;
private:
static const int MAX_TURN = 30;
Mob *mob;
double wantedX;
double wantedY;
double wantedZ;
double speedModifier;
2026-03-01 12:16:08 +08:00
bool _hasWanted;
public:
MoveControl(Mob *mob);
bool hasWanted();
double getSpeedModifier();
void setWantedPosition(double x, double y, double z, double speedModifier);
2026-03-01 12:16:08 +08:00
void setSpeed(float speed);
virtual void tick();
private:
float rotlerp(float a, float b, float max);
};