@@ -39,54 +39,53 @@ class ClientActiveObject : public ActiveObject
39
39
ClientActiveObject (u16 id, Client *client, ClientEnvironment *env);
40
40
virtual ~ClientActiveObject ();
41
41
42
- virtual void addToScene (ITextureSource *tsrc) {};
42
+ virtual void addToScene (ITextureSource *tsrc) {}
43
43
virtual void removeFromScene (bool permanent) {}
44
44
// 0 <= light_at_pos <= LIGHT_SUN
45
- virtual void updateLight (u8 light_at_pos){}
46
- virtual void updateLightNoCheck (u8 light_at_pos){}
47
- virtual v3s16 getLightPosition (){ return v3s16 (0 ,0 , 0 );}
45
+ virtual void updateLight (u8 light_at_pos) {}
46
+ virtual void updateLightNoCheck (u8 light_at_pos) {}
47
+ virtual v3s16 getLightPosition () { return v3s16 (0 , 0 , 0 ); }
48
48
virtual bool getCollisionBox (aabb3f *toset) const { return false ; }
49
49
virtual bool getSelectionBox (aabb3f *toset) const { return false ; }
50
50
virtual bool collideWithObjects () const { return false ; }
51
51
virtual const v3f getPosition () const { return v3f (0 .0f ); }
52
52
virtual scene::ISceneNode *getSceneNode () { return NULL ; }
53
53
virtual scene::IAnimatedMeshSceneNode *getAnimatedMeshSceneNode () { return NULL ; }
54
- virtual bool isLocalPlayer () const {return false ;}
54
+ virtual bool isLocalPlayer () const { return false ; }
55
55
56
56
virtual ClientActiveObject *getParent () const { return nullptr ; };
57
57
virtual const std::unordered_set<int > &getAttachmentChildIds () const
58
58
{ static std::unordered_set<int > rv; return rv; }
59
59
virtual void updateAttachments () {};
60
60
61
- virtual bool doShowSelectionBox (){ return true ;}
61
+ virtual bool doShowSelectionBox () { return true ; }
62
62
63
63
// Step object in time
64
- virtual void step (float dtime, ClientEnvironment *env){}
64
+ virtual void step (float dtime, ClientEnvironment *env) {}
65
65
66
66
// Process a message sent by the server side object
67
- virtual void processMessage (const std::string &data){}
67
+ virtual void processMessage (const std::string &data) {}
68
68
69
- virtual std::string infoText () {return " " ;}
70
- virtual std::string debugInfoText () {return " " ;}
69
+ virtual std::string infoText () { return " " ; }
70
+ virtual std::string debugInfoText () { return " " ; }
71
71
72
72
/*
73
73
This takes the return value of
74
74
ServerActiveObject::getClientInitializationData
75
75
*/
76
- virtual void initialize (const std::string &data){}
76
+ virtual void initialize (const std::string &data) {}
77
77
78
78
// Create a certain type of ClientActiveObject
79
- static ClientActiveObject* create (ActiveObjectType type, Client *client,
80
- ClientEnvironment *env);
79
+ static ClientActiveObject * create (ActiveObjectType type, Client *client,
80
+ ClientEnvironment *env);
81
81
82
82
// If returns true, punch will not be sent to the server
83
- virtual bool directReportPunch (v3f dir, const ItemStack *punchitem=NULL ,
84
- float time_from_last_punch=1000000 )
85
- { return false ; }
83
+ virtual bool directReportPunch (v3f dir, const ItemStack *punchitem = nullptr ,
84
+ float time_from_last_punch = 1000000 ) { return false ; }
86
85
87
86
protected:
88
87
// Used for creating objects based on type
89
- typedef ClientActiveObject* (*Factory)(Client *client, ClientEnvironment *env);
88
+ typedef ClientActiveObject * (*Factory)(Client *client, ClientEnvironment *env);
90
89
static void registerType (u16 type, Factory f);
91
90
Client *m_client;
92
91
ClientEnvironment *m_env;
0 commit comments