X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fserver.h;h=e9477ba53395a8ca9728d3a55a5015849375282f;hb=ffb1128951638fb462fe1e24aa2963aab6246b07;hp=cd6f78c628cb704678fb2f4e1fd675df5b390a55;hpb=a26c92d7dda327f2b1483fe7250cb27580a0a039;p=dragonfireclient.git diff --git a/src/server.h b/src/server.h index cd6f78c62..e9477ba53 100644 --- a/src/server.h +++ b/src/server.h @@ -30,7 +30,18 @@ with this program; if not, write to the Free Software Foundation, Inc., #include #include "utility.h" #include "porting.h" +#include "map.h" +#include "inventory.h" +/* + Some random functions +*/ +v3f findSpawnPos(ServerMap &map); + +/* + A structure containing the data needed for queueing the fetching + of blocks. +*/ struct QueuedBlockEmerge { v3s16 pos; @@ -231,20 +242,16 @@ class RemoteClient u8 pending_serialization_version; RemoteClient(): - m_time_from_building(9999) + m_time_from_building(9999), + m_excess_gotblocks(0) { peer_id = 0; serialization_version = SER_FMT_VER_INVALID; pending_serialization_version = SER_FMT_VER_INVALID; m_nearest_unsent_d = 0; m_nearest_unsent_reset_timer = 0.0; - - m_blocks_sent_mutex.Init(); - m_blocks_sending_mutex.Init(); - - /*m_dig_mutex.Init(); - m_dig_time_remaining = 0; - m_dig_tool_item = -1;*/ + m_nothing_to_send_counter = 0; + m_nothing_to_send_pause_timer = 0; } ~RemoteClient() { @@ -278,7 +285,6 @@ class RemoteClient s32 SendingCount() { - JMutexAutoLock lock(m_blocks_sending_mutex); return m_blocks_sending.size(); } @@ -289,40 +295,31 @@ class RemoteClient void PrintInfo(std::ostream &o) { - JMutexAutoLock l2(m_blocks_sent_mutex); - JMutexAutoLock l3(m_blocks_sending_mutex); o<<"RemoteClient "<