summaryrefslogtreecommitdiff
path: root/src/content_sao.h
diff options
context:
space:
mode:
authoryou <ovvv@web.de>2018-03-31 14:48:38 +0200
committerSmallJoker <mk939@ymail.com>2018-03-31 14:50:17 +0200
commit93eb0794d6f7366df5fb375855b2e5e5888304c6 (patch)
treef07bbb4af6148aecb28c3441232601c28f33500b /src/content_sao.h
parent0a8ca598915a906e665141dc79fc0c1bbab8cc91 (diff)
downloadminetest-93eb0794d6f7366df5fb375855b2e5e5888304c6.tar.gz
minetest-93eb0794d6f7366df5fb375855b2e5e5888304c6.tar.bz2
minetest-93eb0794d6f7366df5fb375855b2e5e5888304c6.zip
ObjectRef: Add add_velocity() (#3208)
Allow changing the velocity of objects relatively to their current velocity
Diffstat (limited to 'src/content_sao.h')
-rw-r--r--src/content_sao.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/content_sao.h b/src/content_sao.h
index 509f477dd..3f75a7890 100644
--- a/src/content_sao.h
+++ b/src/content_sao.h
@@ -121,6 +121,10 @@ public:
s16 getHP() const;
/* LuaEntitySAO-specific */
void setVelocity(v3f velocity);
+ void addVelocity(v3f velocity)
+ {
+ m_velocity += velocity;
+ }
v3f getVelocity();
void setAcceleration(v3f acceleration);
v3f getAcceleration();