From 807a0d313ba667356ee8af8ef5ae82b6c4881d15 Mon Sep 17 00:00:00 2001 From: Kahrl Date: Tue, 13 Mar 2012 18:56:12 +0100 Subject: MapBlockMesh, mesh animation system, urgent mesh updates, athmospheric light, removed footprints --- src/client.h | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) (limited to 'src/client.h') diff --git a/src/client.h b/src/client.h index 4b16b717c..ea3776895 100644 --- a/src/client.h +++ b/src/client.h @@ -27,6 +27,8 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "common_irrlicht.h" #include "jmutex.h" #include +#include +#include #include "clientobject.h" #include "utility.h" // For IntervalLimiter #include "gamedef.h" @@ -34,6 +36,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "filesys.h" struct MeshMakeData; +class MapBlockMesh; class IGameDef; class IWritableTextureSource; class IWritableItemDefManager; @@ -71,7 +74,8 @@ public: /* peer_id=0 adds with nobody to send to */ - void addBlock(v3s16 p, MeshMakeData *data, bool ack_block_to_server); + void addBlock(v3s16 p, MeshMakeData *data, + bool ack_block_to_server, bool urgent); // Returned pointer must be deleted // Returns NULL if queue is empty @@ -84,14 +88,15 @@ public: } private: - core::list m_queue; + std::vector m_queue; + std::set m_urgents; JMutex m_mutex; }; struct MeshUpdateResult { v3s16 p; - scene::SMesh *mesh; + MapBlockMesh *mesh; bool ack_block_to_server; MeshUpdateResult(): @@ -260,13 +265,15 @@ public: core::list getConnectedPlayerNames(); + float getAnimationTime(); + + int getCrackLevel(); + void setCrack(int level, v3s16 pos); + u32 getDayNightRatio(); u16 getHP(); - void setTempMod(v3s16 p, NodeMod mod); - void clearTempMod(v3s16 p); - float getAvgRtt() { try{ @@ -281,9 +288,10 @@ public: u64 getMapSeed(){ return m_map_seed; } - void addUpdateMeshTask(v3s16 blockpos, bool ack_to_server=false); + void addUpdateMeshTask(v3s16 blockpos, bool ack_to_server=false, bool urgent=false); // Including blocks at appropriate edges - void addUpdateMeshTaskWithEdge(v3s16 blockpos, bool ack_to_server=false); + void addUpdateMeshTaskWithEdge(v3s16 blockpos, bool ack_to_server=false, bool urgent=false); + void addUpdateMeshTaskForNode(v3s16 nodepos, bool ack_to_server=false, bool urgent=false); // Get event from queue. CE_NONE is returned if queue is empty. ClientEvent getClientEvent(); @@ -352,6 +360,10 @@ private: float m_inventory_from_server_age; core::map m_active_blocks; PacketCounter m_packetcounter; + // Block mesh animation parameters + float m_animation_time; + int m_crack_level; + v3s16 m_crack_pos; // Received from the server. 0-23999 u32 m_time_of_day; // 0 <= m_daynight_i < DAYNIGHT_CACHE_COUNT -- cgit v1.2.3