1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-11-09 19:45:21 +01:00

Add spatial index for objects (#14631)

This commit is contained in:
Lars Müller
2025-04-08 08:44:53 +02:00
committed by GitHub
parent bed36139db
commit a3648b0b16
17 changed files with 982 additions and 116 deletions

View File

@@ -63,7 +63,7 @@ public:
Some simple getters/setters
*/
v3f getBasePosition() const { return m_base_position; }
void setBasePosition(v3f pos){ m_base_position = pos; }
void setBasePosition(v3f pos);
ServerEnvironment* getEnv(){ return m_env; }
/*
@@ -245,7 +245,6 @@ protected:
virtual void onMarkedForRemoval() {}
ServerEnvironment *m_env;
v3f m_base_position;
std::unordered_set<u32> m_attached_particle_spawners;
/*
@@ -273,4 +272,7 @@ protected:
Queue of messages to be sent to the client
*/
std::queue<ActiveObjectMessage> m_messages_out;
private:
v3f m_base_position; // setBasePosition updates index and MUST be called
};