From 66479394037baa941cb06d75d3afc79ff4c717a2 Mon Sep 17 00:00:00 2001 From: Rogier Date: Tue, 10 Jan 2017 04:39:45 +0900 Subject: 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 --- src/clientobject.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/clientobject.h') diff --git a/src/clientobject.h b/src/clientobject.h index f0bde0adc..1db5bcf24 100644 --- a/src/clientobject.h +++ b/src/clientobject.h @@ -47,8 +47,8 @@ public: virtual void updateLightNoCheck(u8 light_at_pos){} virtual v3s16 getLightPosition(){return v3s16(0,0,0);} virtual aabb3f *getSelectionBox() { return NULL; } - virtual bool getCollisionBox(aabb3f *toset){return false;} - virtual bool collideWithObjects(){return false;} + virtual bool getCollisionBox(aabb3f *toset) const { return false; } + virtual bool collideWithObjects() const { return false; } virtual v3f getPosition(){return v3f(0,0,0);} virtual float getYaw() const {return 0;} virtual scene::ISceneNode *getSceneNode(){return NULL;} -- cgit v1.2.3