summaryrefslogtreecommitdiff
path: root/src/content_sao.h
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-11-12 17:37:14 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-11-29 19:13:40 +0200
commit1320d07068f25ff23ea27e120983c006f75bec24 (patch)
tree3357de80e98ecdb045c31213a551eb93fe5250b9 /src/content_sao.h
parent0b97ad838466ed44296a2c663b2dc034feb51f67 (diff)
downloadminetest-1320d07068f25ff23ea27e120983c006f75bec24.tar.gz
minetest-1320d07068f25ff23ea27e120983c006f75bec24.tar.bz2
minetest-1320d07068f25ff23ea27e120983c006f75bec24.zip
Scripting WIP: dynamic object stuff
Diffstat (limited to 'src/content_sao.h')
-rw-r--r--src/content_sao.h19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/content_sao.h b/src/content_sao.h
index 1d7239232..51911fe05 100644
--- a/src/content_sao.h
+++ b/src/content_sao.h
@@ -50,9 +50,8 @@ public:
std::string getClientInitializationData();
std::string getStaticData();
InventoryItem* createInventoryItem();
- InventoryItem* createPickedUpItem(){return createInventoryItem();}
- void rightClick(Player *player);
-
+ void punch(ServerActiveObject *puncher);
+ void rightClick(ServerActiveObject *clicker);
float getMinimumSavedMovement(){ return 0.1*BS; }
private:
std::string m_inventorystring;
@@ -72,7 +71,7 @@ public:
void step(float dtime, bool send_recommended);
std::string getClientInitializationData();
std::string getStaticData();
- InventoryItem* createPickedUpItem();
+ void punch(ServerActiveObject *puncher);
private:
bool m_is_active;
IntervalLimiter m_inactive_interval;
@@ -98,8 +97,7 @@ public:
std::string getClientInitializationData();
std::string getStaticData();
InventoryItem* createPickedUpItem(){return NULL;}
- u16 punch(const std::string &toolname, v3f dir,
- const std::string &playername);
+ void punch(ServerActiveObject *puncher);
bool isPeaceful(){return false;}
private:
void doDamage(u16 d);
@@ -159,8 +157,7 @@ public:
std::string getClientInitializationData();
void step(float dtime, bool send_recommended);
InventoryItem* createPickedUpItem(){return NULL;}
- u16 punch(const std::string &toolname, v3f dir,
- const std::string &playername);
+ void punch(ServerActiveObject *puncher);
bool isPeaceful();
private:
void sendPosition();
@@ -214,10 +211,8 @@ public:
std::string getClientInitializationData();
std::string getStaticData();
InventoryItem* createPickedUpItem();
- u16 punch(const std::string &toolname, v3f dir,
- const std::string &playername);
- void rightClick(Player *player);
-
+ void punch(ServerActiveObject *puncher);
+ void rightClick(ServerActiveObject *clicker);
void setPos(v3f pos);
void moveTo(v3f pos, bool continuous);
float getMinimumSavedMovement();