diff options
author | SmallJoker <mk939@ymail.com> | 2019-11-27 20:36:51 +0100 |
---|---|---|
committer | SmallJoker <SmallJoker@users.noreply.github.com> | 2019-12-07 15:12:26 +0100 |
commit | aa8df112ff42d94b6dc59a0153d989bd8c0b115e (patch) | |
tree | 3488aea2ccd10228740d810f9a34da2260c95a57 /src/client/localplayer.h | |
parent | 51f230895c2b6d99a6fddc1c235140fcf9938742 (diff) | |
download | hax-minetest-server-aa8df112ff42d94b6dc59a0153d989bd8c0b115e.tar.gz hax-minetest-server-aa8df112ff42d94b6dc59a0153d989bd8c0b115e.zip |
Attachments: Fix interpolation from (0,0,0) after detach
GenericCAO::getPosition() did not take the camera offset into account
LocalPlayer attachment cleanup: Use sane getParent() function
Make that getPosition() (GenericCAO and LocalPlayer) always return the absolute position
Diffstat (limited to '')
-rw-r--r-- | src/client/localplayer.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/client/localplayer.h b/src/client/localplayer.h index 45dc6776e..95dceb1f4 100644 --- a/src/client/localplayer.h +++ b/src/client/localplayer.h @@ -47,12 +47,9 @@ public: LocalPlayer(Client *client, const char *name); virtual ~LocalPlayer() = default; - ClientActiveObject *parent = nullptr; - // Initialize hp to 0, so that no hearts will be shown if server // doesn't support health points u16 hp = 0; - bool isAttached = false; bool touching_ground = false; // This oscillates so that the player jumps a bit above the surface bool in_liquid = false; @@ -72,8 +69,6 @@ public: // Temporary option for old move code bool physics_override_new_move = true; - v3f overridePosition; - void move(f32 dtime, Environment *env, f32 pos_max_d); void move(f32 dtime, Environment *env, f32 pos_max_d, std::vector<CollisionInfo> *collision_info); @@ -112,6 +107,8 @@ public: GenericCAO *getCAO() const { return m_cao; } + ClientActiveObject *getParent() const; + void setCAO(GenericCAO *toset) { assert(!m_cao); // Pre-condition |