diff options
author | sfan5 <sfan5@live.de> | 2019-07-16 14:00:42 +0200 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2019-08-10 19:44:27 +0200 |
commit | cf64054390970f3cf974afb2b174340a3e1da382 (patch) | |
tree | 9f3a62d3f935ae76f00fb1c0002f9ba59e59f219 /src/content_sao.h | |
parent | b19400aa74f30ef61ba0c1bb4a25a978e7cf4125 (diff) | |
download | minetest-cf64054390970f3cf974afb2b174340a3e1da382.tar.gz minetest-cf64054390970f3cf974afb2b174340a3e1da382.tar.bz2 minetest-cf64054390970f3cf974afb2b174340a3e1da382.zip |
Implement adding velocity to player from Lua
The intended usecase is knockback, but there's potential for more.
Diffstat (limited to 'src/content_sao.h')
-rw-r--r-- | src/content_sao.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/content_sao.h b/src/content_sao.h index beaf697e6..2dd839e11 100644 --- a/src/content_sao.h +++ b/src/content_sao.h @@ -322,6 +322,7 @@ public: { return m_dig_pool; } + void setMaxSpeedOverride(const v3f &vel); // Returns true if cheated bool checkMovementCheat(); @@ -361,6 +362,8 @@ private: float m_time_from_last_punch = 0.0f; v3s16 m_nocheat_dig_pos = v3s16(32767, 32767, 32767); float m_nocheat_dig_time = 0.0f; + float m_max_speed_override_time = 0.0f; + v3f m_max_speed_override = v3f(0.0f, 0.0f, 0.0f); // Timers IntervalLimiter m_breathing_interval; |