aboutsummaryrefslogtreecommitdiff
path: root/src/client.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.h')
-rw-r--r--src/client.h25
1 files changed, 20 insertions, 5 deletions
diff --git a/src/client.h b/src/client.h
index a1ee3f762..a3d43997c 100644
--- a/src/client.h
+++ b/src/client.h
@@ -185,12 +185,9 @@ public:
// Pops out a packet from the packet queue
IncomingPacket getPacket();
- /*void removeNode(v3s16 nodepos);
- void addNodeFromInventory(v3s16 nodepos, u16 i);*/
- void pressGround(u8 button, v3s16 nodepos_undersurface,
+ void groundAction(u8 action, v3s16 nodepos_undersurface,
v3s16 nodepos_oversurface, u16 item);
void clickObject(u8 button, v3s16 blockpos, s16 id, u16 item);
- void stopDigging();
void sendSignText(v3s16 blockpos, s16 id, std::string text);
@@ -199,9 +196,12 @@ public:
// Returns InvalidPositionException if not found
MapNode getNode(v3s16 p);
// Returns InvalidPositionException if not found
+ //void setNode(v3s16 p, MapNode n);
+
+ // Returns InvalidPositionException if not found
//f32 getGroundHeight(v2s16 p);
// Returns InvalidPositionException if not found
- bool isNodeUnderground(v3s16 p);
+ //bool isNodeUnderground(v3s16 p);
// Note: The players should not be exposed outside
// Return value is valid until client is destroyed
@@ -236,6 +236,21 @@ public:
//void updateSomeExpiredMeshes();
+ void setTempMod(v3s16 p, NodeMod mod)
+ {
+ JMutexAutoLock envlock(m_env_mutex);
+ assert(m_env.getMap().mapType() == MAPTYPE_CLIENT);
+ v3s16 blockpos = ((ClientMap&)m_env.getMap()).setTempMod(p, mod);
+ m_env.getMap().updateMeshes(blockpos, m_env.getDayNightRatio());
+ }
+ void clearTempMod(v3s16 p)
+ {
+ JMutexAutoLock envlock(m_env_mutex);
+ assert(m_env.getMap().mapType() == MAPTYPE_CLIENT);
+ v3s16 blockpos = ((ClientMap&)m_env.getMap()).clearTempMod(p);
+ m_env.getMap().updateMeshes(blockpos, m_env.getDayNightRatio());
+ }
+
private:
// Virtual methods from con::PeerHandler