diff options
Diffstat (limited to 'src/content_sao.cpp')
-rw-r--r-- | src/content_sao.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/content_sao.cpp b/src/content_sao.cpp index 74824d573..b013069aa 100644 --- a/src/content_sao.cpp +++ b/src/content_sao.cpp @@ -1748,6 +1748,11 @@ void LuaEntitySAO::setAcceleration(v3f acceleration) m_acceleration = acceleration; } +v3f LuaEntitySAO::getAcceleration() +{ + return m_acceleration; +} + void LuaEntitySAO::setTextureMod(const std::string &mod) { std::ostringstream os(std::ios::binary); @@ -1760,6 +1765,22 @@ void LuaEntitySAO::setTextureMod(const std::string &mod) m_messages_out.push_back(aom); } +void LuaEntitySAO::setSprite(v2s16 p, int num_frames, float framelength, + bool select_horiz_by_yawpitch) +{ + std::ostringstream os(std::ios::binary); + // command (2 = set sprite) + writeU8(os, 2); + // parameters + writeV2S16(os, p); + writeU16(os, num_frames); + writeF1000(os, framelength); + writeU8(os, select_horiz_by_yawpitch); + // create message and add to list + ActiveObjectMessage aom(getId(), false, os.str()); + m_messages_out.push_back(aom); +} + void LuaEntitySAO::sendPosition(bool do_interpolate, bool is_movement_end) { m_last_sent_move_precision = m_base_position.getDistanceFrom( |