mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-15 18:57:08 +00: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:
parent
ec30d49e02
commit
6647939403
8 changed files with 88 additions and 117 deletions
|
@ -159,7 +159,7 @@ public:
|
|||
|
||||
void processMessage(const std::string &data);
|
||||
|
||||
bool getCollisionBox(aabb3f *toset) { return false; }
|
||||
bool getCollisionBox(aabb3f *toset) const { return false; }
|
||||
private:
|
||||
scene::IMeshSceneNode *m_node;
|
||||
v3f m_position;
|
||||
|
@ -316,7 +316,7 @@ public:
|
|||
std::string infoText()
|
||||
{return m_infotext;}
|
||||
|
||||
bool getCollisionBox(aabb3f *toset) { return false; }
|
||||
bool getCollisionBox(aabb3f *toset) const { return false; }
|
||||
private:
|
||||
aabb3f m_selection_box;
|
||||
scene::IMeshSceneNode *m_node;
|
||||
|
@ -587,7 +587,7 @@ GenericCAO::GenericCAO(Client *client, ClientEnvironment *env):
|
|||
}
|
||||
}
|
||||
|
||||
bool GenericCAO::getCollisionBox(aabb3f *toset)
|
||||
bool GenericCAO::getCollisionBox(aabb3f *toset) const
|
||||
{
|
||||
if (m_prop.physical)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue