diff options
| author | untodesu <kirill@untode.su> | 2025-12-26 18:09:35 +0500 |
|---|---|---|
| committer | untodesu <kirill@untode.su> | 2025-12-26 18:09:35 +0500 |
| commit | f755a1eeb45262fe3aea64efc3914709d572afcc (patch) | |
| tree | bb08dff89a7ddd446a4363edabac8f9ee0514234 /src/game/shared/entity/velocity.hh | |
| parent | eebc2b776717f18e4a24af39b0209afa8eb7404f (diff) | |
| download | voxelius-f755a1eeb45262fe3aea64efc3914709d572afcc.tar.bz2 voxelius-f755a1eeb45262fe3aea64efc3914709d572afcc.zip | |
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)
Diffstat (limited to 'src/game/shared/entity/velocity.hh')
| -rw-r--r-- | src/game/shared/entity/velocity.hh | 9 |
1 files changed, 8 insertions, 1 deletions
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 |
