mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-06-20 15:39:25 +02:00
fix(Core/Travel): Drop dead future field, restore default copy on LastMovement
This commit is contained in:
parent
c64ac89924
commit
9d3f47b19f
@ -28,10 +28,8 @@ class LastMovement
|
||||
public:
|
||||
LastMovement();
|
||||
|
||||
// Non-copyable: holds a std::future and several state fields the
|
||||
// historical copy-helpers omitted. Always pass by reference.
|
||||
LastMovement(LastMovement const&) = delete;
|
||||
LastMovement& operator=(LastMovement const&) = delete;
|
||||
LastMovement(LastMovement const&) = default;
|
||||
LastMovement& operator=(LastMovement const&) = default;
|
||||
|
||||
void clear();
|
||||
|
||||
@ -57,7 +55,6 @@ public:
|
||||
MovementPriority priority;
|
||||
TravelPath lastPath;
|
||||
time_t nextTeleport;
|
||||
std::future<TravelPath> future;
|
||||
};
|
||||
|
||||
class LastMovementValue : public ManualSetValue<LastMovement&>
|
||||
@ -65,11 +62,6 @@ class LastMovementValue : public ManualSetValue<LastMovement&>
|
||||
public:
|
||||
LastMovementValue(PlayerbotAI* botAI) : ManualSetValue<LastMovement&>(botAI, data) {}
|
||||
|
||||
// LastMovement is non-copyable; the base Reset/Set rely on
|
||||
// operator= which we deleted. Override both to do the right thing.
|
||||
void Reset() override { data.clear(); }
|
||||
void Set(LastMovement& /*val*/) override {}
|
||||
|
||||
private:
|
||||
LastMovement data{};
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user