Add infotext containing entity type (e.g. mobs:cow) to unknown entities (#4431)

If a mod is disabled, or upgraded without sufficient backward compatibility,
then entities it has put into the world become unknown, and continue moving
around, but are completely unrecognisable.

This change allows the player to see their type, and therefore which mod is
or was responsible.
This commit is contained in:
Rogier-5 2016-08-11 00:22:32 +02:00 committed by Ner'zhul
parent 48b3bb980d
commit 35f47e5461

@ -175,6 +175,8 @@ void LuaEntitySAO::addedToEnvironment(u32 dtime_s)
// Activate entity, supplying serialized state
m_env->getScriptIface()->
luaentity_Activate(m_id, m_init_state.c_str(), dtime_s);
} else {
m_prop.infotext = m_init_name;
}
}