Core/Movement: partial cherrypick of f8ad7017dd

This commit is contained in:
Ovahlord
2022-06-19 22:11:09 +02:00
parent 8733f6fafa
commit da8cb5e5b0
3 changed files with 17 additions and 1 deletions

View File

@@ -59,6 +59,11 @@ class TC_GAME_API PathGenerator
explicit PathGenerator(WorldObject const* owner);
~PathGenerator();
PathGenerator(PathGenerator const& right) = delete;
PathGenerator(PathGenerator&& right) = delete;
PathGenerator& operator=(PathGenerator const& right) = delete;
PathGenerator& operator=(PathGenerator&& right) = delete;
// Calculate the path from owner to given destination
// return: true if new path was calculated, false otherwise (no change needed)
bool CalculatePath(float destX, float destY, float destZ, bool forceDest = false);

View File

@@ -282,6 +282,12 @@ void SplineBase::InitBezier3(Vector3 const* controls, index_type count, index_ty
//mov_assert(points.size() % 3 == 0);
}
SplineBase::SplineBase() : index_lo(0), index_hi(0), m_mode(UninitializedMode), cyclic(false), initialOrientation(0.f)
{
}
SplineBase::~SplineBase() = default;
void SplineBase::clear()
{
index_lo = 0;

View File

@@ -87,7 +87,12 @@ protected:
public:
explicit SplineBase() : index_lo(0), index_hi(0), m_mode(UninitializedMode), cyclic(false), initialOrientation(0.f) { }
explicit SplineBase();
SplineBase(SplineBase const& right) = delete;
SplineBase(SplineBase&& right) = delete;
SplineBase& operator=(SplineBase const& right) = delete;
SplineBase& operator=(SplineBase&& right) = delete;
virtual ~SplineBase();
/** Caclulates the position for given segment Idx, and percent of segment length t
@param t - percent of segment length, assumes that t in range [0, 1]