refactor(Core/Movement): follower management of references (#25060)

Co-authored-by: Shauren <shauren.trinity@gmail.com>
This commit is contained in:
sogladev
2026-03-12 10:59:16 +01:00
committed by GitHub
parent a8a96eb8f8
commit 40f55bb0f3
9 changed files with 28 additions and 135 deletions
+2 -9
View File
@@ -18,8 +18,6 @@
#ifndef ACORE_ABSTRACTFOLLOWER_H
#define ACORE_ABSTRACTFOLLOWER_H
#include "FollowerReference.h"
class Unit;
class AbstractFollower
@@ -29,15 +27,10 @@ public:
virtual ~AbstractFollower() { SetTarget(nullptr); }
void SetTarget(Unit* unit);
Unit* GetTarget() const { return _target; }
bool IsTargetValid() const { return i_target.isValid(); }
virtual void stopFollowing() { }
[[nodiscard]] Unit* GetTarget() const { return _target; }
private:
Unit* _target = nullptr;
protected:
FollowerReference i_target;
};
#endif