aboutsummaryrefslogtreecommitdiff
path: root/src/log.cpp
Commit message (Collapse)AuthorAge
* Update Copyright YearsSfan52013-02-24
|
* Change Minetest-c55 to MinetestPilzAdam2013-02-24
|
* Switch the license to be LGPLv2/later, with small parts still remaining as ↵Perttu Ahola2012-06-05
| | | | GPLv2/later, by agreement of major contributors
* Add better trace peudo-loglevel supportPerttu Ahola2012-05-20
|
* Add a third log output interface methodPerttu Ahola2011-11-29
|
* Add log_remove_output and log_deregister_threadPerttu Ahola2011-11-29
|
* Initially add small and tight logging facilityPerttu Ahola2011-10-16
class="hl ppc"> #include "debug.h" #include "porting.h" /* ClientActiveObject */ ClientActiveObject::ClientActiveObject(u16 id, Client *client, ClientEnvironment *env): ActiveObject(id), m_client(client), m_env(env) { } ClientActiveObject::~ClientActiveObject() { removeFromScene(true); } ClientActiveObject* ClientActiveObject::create(ActiveObjectType type, Client *client, ClientEnvironment *env) { // Find factory function auto n = m_types.find(type); if (n == m_types.end()) { // If factory is not found, just return. warningstream << "ClientActiveObject: No factory for type=" << (int)type << std::endl; return NULL; } Factory f = n->second; ClientActiveObject *object = (*f)(client, env); return object; } void ClientActiveObject::registerType(u16 type, Factory f) { auto n = m_types.find(type); if (n != m_types.end()) return; m_types[type] = f; }