+ virtual u8 getSendType() const
+ { return getType(); }
+
+ // Called after id has been set and has been inserted in environment
+ virtual void addedToEnvironment(u32 dtime_s){};
+ // Called before removing from environment
+ virtual void removingFromEnvironment(){};
+ // Returns true if object's deletion is the job of the
+ // environment
+ virtual bool environmentDeletes() const
+ { return true; }
+
+ virtual bool unlimitedTransferDistance() const
+ { return false; }
+
+ // Create a certain type of ServerActiveObject
+ static ServerActiveObject* create(u8 type,
+ ServerEnvironment *env, u16 id, v3f pos,
+ const std::string &data);
+
+ /*
+ Some simple getters/setters
+ */
+ v3f getBasePosition(){ return m_base_position; }
+ void setBasePosition(v3f pos){ m_base_position = pos; }
+ ServerEnvironment* getEnv(){ return m_env; }
+
+ /*
+ Some more dynamic interface
+ */
+
+ virtual void setPos(v3f pos)
+ { setBasePosition(pos); }
+ // continuous: if true, object does not stop immediately at pos
+ virtual void moveTo(v3f pos, bool continuous)
+ { setBasePosition(pos); }
+ // If object has moved less than this and data has not changed,
+ // saving to disk may be omitted
+ virtual float getMinimumSavedMovement();
+
+ virtual bool isPeaceful(){return true;}
+
+ virtual std::string getDescription(){return "SAO";}