1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Some globals (un-)init fixes

This commit is contained in:
sfan5 2024-04-11 13:54:09 +02:00
parent 2af5191070
commit d8190e1c5f
16 changed files with 58 additions and 62 deletions

View file

@ -33,6 +33,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "camera.h" // CameraModes
#include "collision.h"
#include "content_cso.h"
#include "clientobject.h"
#include "environment.h"
#include "itemdef.h"
#include "localplayer.h"
@ -218,14 +219,15 @@ private:
};
// Prototype
TestCAO proto_TestCAO(NULL, NULL);
static TestCAO proto_TestCAO(nullptr, nullptr);
TestCAO::TestCAO(Client *client, ClientEnvironment *env):
ClientActiveObject(0, client, env),
m_node(NULL),
m_position(v3f(0,10*BS,0))
{
ClientActiveObject::registerType(getType(), create);
if (!client)
ClientActiveObject::registerType(getType(), create);
}
std::unique_ptr<ClientActiveObject> TestCAO::create(Client *client, ClientEnvironment *env)
@ -322,8 +324,6 @@ void TestCAO::processMessage(const std::string &data)
GenericCAO
*/
#include "clientobject.h"
GenericCAO::GenericCAO(Client *client, ClientEnvironment *env):
ClientActiveObject(0, client, env)
{
@ -2082,4 +2082,4 @@ void GenericCAO::updateMeshCulling()
}
// Prototype
GenericCAO proto_GenericCAO(NULL, NULL);
static GenericCAO proto_GenericCAO(nullptr, nullptr);