diff options
author | est31 <MTest31@outlook.com> | 2015-06-20 00:30:38 +0200 |
---|---|---|
committer | est31 <MTest31@outlook.com> | 2015-06-20 02:59:53 +0200 |
commit | 40226e52747156cbdc5128a416480b226e498fff (patch) | |
tree | e0863a9c88f78bc578e7c8d60222c5f52dac81c5 /src/environment.cpp | |
parent | 3b65a6a36c3e910359c69cd3e3e3fd89e50ba23e (diff) | |
download | minetest-40226e52747156cbdc5128a416480b226e498fff.tar.gz minetest-40226e52747156cbdc5128a416480b226e498fff.tar.bz2 minetest-40226e52747156cbdc5128a416480b226e498fff.zip |
Make attached objects visible in 3rd person view
Diffstat (limited to 'src/environment.cpp')
-rw-r--r-- | src/environment.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/environment.cpp b/src/environment.cpp index dc18fd58f..7d80619bc 100644 --- a/src/environment.cpp +++ b/src/environment.cpp @@ -2400,6 +2400,15 @@ void ClientEnvironment::addSimpleObject(ClientSimpleObject *simple) m_simple_objects.push_back(simple); } +GenericCAO* ClientEnvironment::getGenericCAO(u16 id) +{ + ClientActiveObject *obj = getActiveObject(id); + if (obj && obj->getType() == ACTIVEOBJECT_TYPE_GENERIC) + return (GenericCAO*) obj; + else + return NULL; +} + ClientActiveObject* ClientEnvironment::getActiveObject(u16 id) { std::map<u16, ClientActiveObject*>::iterator n; |