1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-14 09:05:19 +02:00

ActiveObjectMgr fixes (#13560)

This commit is contained in:
DS
2023-10-09 17:13:04 +02:00
committed by GitHub
parent 929a13a9a0
commit 11ec75c2ad
17 changed files with 204 additions and 153 deletions

View File

@@ -38,7 +38,7 @@ ClientActiveObject::~ClientActiveObject()
removeFromScene(true);
}
ClientActiveObject* ClientActiveObject::create(ActiveObjectType type,
std::unique_ptr<ClientActiveObject> ClientActiveObject::create(ActiveObjectType type,
Client *client, ClientEnvironment *env)
{
// Find factory function
@@ -47,11 +47,11 @@ ClientActiveObject* ClientActiveObject::create(ActiveObjectType type,
// If factory is not found, just return.
warningstream << "ClientActiveObject: No factory for type="
<< (int)type << std::endl;
return NULL;
return nullptr;
}
Factory f = n->second;
ClientActiveObject *object = (*f)(client, env);
std::unique_ptr<ClientActiveObject> object = (*f)(client, env);
return object;
}