From f755a1eeb45262fe3aea64efc3914709d572afcc Mon Sep 17 00:00:00 2001 From: untodesu Date: Fri, 26 Dec 2025 18:09:35 +0500 Subject: Add interpolation to Velocity component; fixes #20 - Also disabled snapping to grid for sideways movement as it was somehow messing with player_move code and was making you slide on voxels as if you were on ice (not good) --- src/game/shared/entity/velocity.hh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/game/shared/entity/velocity.hh') diff --git a/src/game/shared/entity/velocity.hh b/src/game/shared/entity/velocity.hh index 69fce9e..0266bd0 100644 --- a/src/game/shared/entity/velocity.hh +++ b/src/game/shared/entity/velocity.hh @@ -2,7 +2,7 @@ class Dimension; -struct Velocity final { +struct Velocity { glm::fvec3 value; public: @@ -11,3 +11,10 @@ public: // NOTE: This system was previously called inertial static void fixed_update(Dimension* dimension); }; + +namespace client +{ +// Client-side only - interpolated and previous velocity +struct VelocityIntr final : public Velocity {}; +struct VelocityPrev final : public Velocity {}; +} // namespace client -- cgit