Core/Movement: Make MovementGenerators use pointers instead of references. cleanup
This commit is contained in:
@@ -38,12 +38,12 @@ namespace Movement
|
||||
class TransportPathTransform
|
||||
{
|
||||
public:
|
||||
TransportPathTransform(Unit& owner, bool transformForTransport)
|
||||
TransportPathTransform(Unit* owner, bool transformForTransport)
|
||||
: _owner(owner), _transformForTransport(transformForTransport) { }
|
||||
Vector3 operator()(Vector3 input);
|
||||
|
||||
private:
|
||||
Unit& _owner;
|
||||
Unit* _owner;
|
||||
bool _transformForTransport;
|
||||
};
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace Movement
|
||||
{
|
||||
public:
|
||||
|
||||
explicit MoveSplineInit(Unit& m);
|
||||
explicit MoveSplineInit(Unit* m);
|
||||
|
||||
/* Final pass of initialization that launches spline movement.
|
||||
*/
|
||||
@@ -76,7 +76,7 @@ namespace Movement
|
||||
*/
|
||||
void SetFacing(float angle);
|
||||
void SetFacing(Vector3 const& point);
|
||||
void SetFacing(const Unit * target);
|
||||
void SetFacing(const Unit* target);
|
||||
|
||||
/* Initializes movement by path
|
||||
* @param path - array of points, shouldn't be empty
|
||||
@@ -138,7 +138,7 @@ namespace Movement
|
||||
protected:
|
||||
|
||||
MoveSplineInitArgs args;
|
||||
Unit& unit;
|
||||
Unit* unit;
|
||||
};
|
||||
|
||||
inline void MoveSplineInit::SetFly() { args.flags.EnableFlying(); }
|
||||
|
||||
Reference in New Issue
Block a user