Send Position packet on event, don't check it at each AsyncRunStep.
[oweals/minetest.git] / src / serverobject.h
index 6525270f624eec1436577d8030e7122bb0e4f1c8..878c37773e0fff64a7d025b8dee3a5af13a55898 100644 (file)
@@ -58,7 +58,7 @@ public:
        ServerActiveObject(ServerEnvironment *env, v3f pos);
        virtual ~ServerActiveObject();
 
-       virtual u8 getSendType() const
+       virtual ActiveObjectType getSendType() const
        { return getType(); }
 
        // Called after id has been set and has been inserted in environment
@@ -69,12 +69,9 @@ public:
        // environment
        virtual bool environmentDeletes() const
        { return true; }
-
-       virtual bool unlimitedTransferDistance() const
-       { return false; }
        
        // Create a certain type of ServerActiveObject
-       static ServerActiveObject* create(u8 type,
+       static ServerActiveObject* create(ActiveObjectType type,
                        ServerEnvironment *env, u16 id, v3f pos,
                        const std::string &data);
        
@@ -97,8 +94,6 @@ public:
        // 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";}
        
@@ -152,6 +147,8 @@ public:
 
        virtual void setArmorGroups(const ItemGroupList &armor_groups)
        {}
+       virtual void setPhysicsOverride(float physics_override_speed, float physics_override_jump, float physics_override_gravity)
+       {}
        virtual void setAnimation(v2f frames, float frame_speed, float frame_blend)
        {}
        virtual void setBonePosition(std::string bone, v3f position, v3f rotation)
@@ -235,7 +232,7 @@ protected:
 
 private:
        // Used for creating objects based on type
-       static core::map<u16, Factory> m_types;
+       static std::map<u16, Factory> m_types;
 };
 
 #endif