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
|
@ -199,7 +199,7 @@ public:
|
|||
return ACTIVEOBJECT_TYPE_TEST;
|
||||
}
|
||||
|
||||
static ClientActiveObject* create(Client *client, ClientEnvironment *env);
|
||||
static std::unique_ptr<ClientActiveObject> create(Client *client, ClientEnvironment *env);
|
||||
|
||||
void addToScene(ITextureSource *tsrc, scene::ISceneManager *smgr);
|
||||
void removeFromScene(bool permanent);
|
||||
|
@ -227,9 +227,9 @@ TestCAO::TestCAO(Client *client, ClientEnvironment *env):
|
|||
ClientActiveObject::registerType(getType(), create);
|
||||
}
|
||||
|
||||
ClientActiveObject* TestCAO::create(Client *client, ClientEnvironment *env)
|
||||
std::unique_ptr<ClientActiveObject> TestCAO::create(Client *client, ClientEnvironment *env)
|
||||
{
|
||||
return new TestCAO(client, env);
|
||||
return std::make_unique<TestCAO>(client, env);
|
||||
}
|
||||
|
||||
void TestCAO::addToScene(ITextureSource *tsrc, scene::ISceneManager *smgr)
|
||||
|
@ -326,7 +326,7 @@ void TestCAO::processMessage(const std::string &data)
|
|||
GenericCAO::GenericCAO(Client *client, ClientEnvironment *env):
|
||||
ClientActiveObject(0, client, env)
|
||||
{
|
||||
if (client == NULL) {
|
||||
if (!client) {
|
||||
ClientActiveObject::registerType(getType(), create);
|
||||
} else {
|
||||
m_client = client;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue