mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-06 17:41:04 +00:00
ActiveObjectMgr fixes (#13560)
This commit is contained in:
parent
929a13a9a0
commit
11ec75c2ad
17 changed files with 204 additions and 153 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue