1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00: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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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
};