aboutsummaryrefslogtreecommitdiff
path: root/src/client/clientobject.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/clientobject.h')
-rw-r--r--src/client/clientobject.h30
1 files changed, 12 insertions, 18 deletions
diff --git a/src/client/clientobject.h b/src/client/clientobject.h
index 7b451eb36..4a1743d72 100644
--- a/src/client/clientobject.h
+++ b/src/client/clientobject.h
@@ -23,11 +23,13 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "activeobject.h"
#include <ISceneNode.h>
#include <IMeshSceneNode.h>
+#include <IAnimatedMeshSceneNode.h>
+#include <IDummyTransformationSceneNode.h>
+#include <IBillboardSceneNode.h>
#include <unordered_map>
#include <unordered_set>
-
class ClientEnvironment;
class ITextureSource;
class Client;
@@ -51,20 +53,16 @@ public:
virtual bool getSelectionBox(aabb3f *toset) const { return false; }
virtual bool collideWithObjects() const { return false; }
virtual const v3f getPosition() const { return v3f(0.0f); }
- virtual scene::ISceneNode *getSceneNode() const { return NULL; }
+ virtual scene::ISceneNode *getSceneNode() const
+ { return NULL; }
virtual scene::IAnimatedMeshSceneNode *getAnimatedMeshSceneNode() const
- {
- return NULL;
- }
+ { return NULL; }
virtual bool isLocalPlayer() const { return false; }
virtual ClientActiveObject *getParent() const { return nullptr; };
virtual const std::unordered_set<int> &getAttachmentChildIds() const
- {
- static std::unordered_set<int> rv;
- return rv;
- }
- virtual void updateAttachments(){};
+ { static std::unordered_set<int> rv; return rv; }
+ virtual void updateAttachments() {};
virtual bool doShowSelectionBox() { return true; }
@@ -84,15 +82,12 @@ public:
virtual void initialize(const std::string &data) {}
// Create a certain type of ClientActiveObject
- static ClientActiveObject *create(
- ActiveObjectType type, Client *client, ClientEnvironment *env);
+ static ClientActiveObject *create(ActiveObjectType type, Client *client,
+ ClientEnvironment *env);
// If returns true, punch will not be sent to the server
virtual bool directReportPunch(v3f dir, const ItemStack *punchitem = nullptr,
- float time_from_last_punch = 1000000)
- {
- return false;
- }
+ float time_from_last_punch = 1000000) { return false; }
protected:
// Used for creating objects based on type
@@ -100,7 +95,6 @@ protected:
static void registerType(u16 type, Factory f);
Client *m_client;
ClientEnvironment *m_env;
-
private:
// Used for creating objects based on type
static std::unordered_map<u16, Factory> m_types;
@@ -117,7 +111,7 @@ public:
d = a_d;
}
- bool operator<(const DistanceSortedActiveObject &other) const
+ bool operator < (const DistanceSortedActiveObject &other) const
{
return d < other.d;
}