diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-11-26 12:35:30 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-11-29 19:13:53 +0200 |
commit | 70363847aacbf765c60a294940ba50c8bb256cc6 (patch) | |
tree | b1f5c1e5c519f578b858be98b98a522020d6515d /src/content_sao.cpp | |
parent | 1ce749c86a2af539549ecefab5d3de0fde8aeedf (diff) | |
download | minetest-70363847aacbf765c60a294940ba50c8bb256cc6.tar.gz minetest-70363847aacbf765c60a294940ba50c8bb256cc6.tar.bz2 minetest-70363847aacbf765c60a294940ba50c8bb256cc6.zip |
Reshape LuaEntityCAO implementation a bit and make TNT to blink
Diffstat (limited to 'src/content_sao.cpp')
-rw-r--r-- | src/content_sao.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/content_sao.cpp b/src/content_sao.cpp index 5d63b295e..74824d573 100644 --- a/src/content_sao.cpp +++ b/src/content_sao.cpp @@ -1748,6 +1748,18 @@ void LuaEntitySAO::setAcceleration(v3f acceleration) m_acceleration = acceleration; } +void LuaEntitySAO::setTextureMod(const std::string &mod) +{ + std::ostringstream os(std::ios::binary); + // command (1 = set texture modification) + writeU8(os, 1); + // parameters + os<<serializeString(mod); + // 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( |