aboutsummaryrefslogtreecommitdiff
path: root/src/environment.cpp
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2015-06-20 00:30:38 +0200
committerest31 <MTest31@outlook.com>2015-06-20 02:59:53 +0200
commit40226e52747156cbdc5128a416480b226e498fff (patch)
treee0863a9c88f78bc578e7c8d60222c5f52dac81c5 /src/environment.cpp
parent3b65a6a36c3e910359c69cd3e3e3fd89e50ba23e (diff)
downloadminetest-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.cpp9
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;