aboutsummaryrefslogtreecommitdiff
path: root/src/content_cao.cpp
diff options
context:
space:
mode:
authorRogier <rogier777@gmail.com>2017-01-10 04:39:45 +0900
committerNer'zhul <nerzhul@users.noreply.github.com>2017-01-11 15:53:56 +0100
commit66479394037baa941cb06d75d3afc79ff4c717a2 (patch)
treeade7d34a6c37987ebbd227df422c5643473194e8 /src/content_cao.cpp
parentec30d49e026af2d0cb8329eb66aec48d12e79839 (diff)
downloadminetest-66479394037baa941cb06d75d3afc79ff4c717a2.tar.gz
minetest-66479394037baa941cb06d75d3afc79ff4c717a2.tar.bz2
minetest-66479394037baa941cb06d75d3afc79ff4c717a2.zip
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>
Diffstat (limited to 'src/content_cao.cpp')
-rw-r--r--src/content_cao.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/content_cao.cpp b/src/content_cao.cpp
index a4c0bf14d..5ddbd27c9 100644
--- a/src/content_cao.cpp
+++ b/src/content_cao.cpp
@@ -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)
{