mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
Performance fix + SAO factorization
Original credits goes to @Rogier-5 * Merge common attributes between LuaEntitySAO & PlayerSAO to UnitSAO * Make some functions const * Improve some lists performance by returning const ref Signed-off-by: Loic Blot <loic.blot@unix-experience.fr>
This commit is contained in:
@@ -64,7 +64,7 @@ public:
|
||||
m_id(id)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
u16 getId()
|
||||
{
|
||||
return m_id;
|
||||
@@ -76,8 +76,8 @@ public:
|
||||
}
|
||||
|
||||
virtual ActiveObjectType getType() const = 0;
|
||||
virtual bool getCollisionBox(aabb3f *toset) = 0;
|
||||
virtual bool collideWithObjects() = 0;
|
||||
virtual bool getCollisionBox(aabb3f *toset) const = 0;
|
||||
virtual bool collideWithObjects() const = 0;
|
||||
protected:
|
||||
u16 m_id; // 0 is invalid, "no id"
|
||||
};
|
||||
|
Reference in New Issue
Block a user