mirror of
https://github.com/luanti-org/luanti.git
synced 2025-11-06 10:15:19 +01:00
Break include chains and tidy (#16640)
Co-authored-by: cx384 <cx384@proton.me>
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include "network/connection.h"
|
||||
#include "network/networkpacket.h"
|
||||
#include "network/serveropcodes.h"
|
||||
#include "porting.h" // porting::getTimeS
|
||||
#include "remoteplayer.h"
|
||||
#include "serialization.h" // SER_FMT_VER_INVALID
|
||||
#include "settings.h"
|
||||
@@ -62,7 +63,8 @@ RemoteClient::RemoteClient() :
|
||||
m_block_optimize_distance(g_settings->getS16("block_send_optimize_distance")),
|
||||
m_block_cull_optimize_distance(g_settings->getS16("block_cull_optimize_distance")),
|
||||
m_max_gen_distance(g_settings->getS16("max_block_generate_distance")),
|
||||
m_occ_cull(g_settings->getBool("server_side_occlusion_culling"))
|
||||
m_occ_cull(g_settings->getBool("server_side_occlusion_culling")),
|
||||
m_connection_time(porting::getTimeS())
|
||||
{
|
||||
}
|
||||
|
||||
@@ -619,6 +621,11 @@ void RemoteClient::setEncryptedPassword(const std::string& pwd)
|
||||
allowed_auth_mechs = AUTH_MECHANISM_SRP;
|
||||
}
|
||||
|
||||
u64 RemoteClient::uptime() const
|
||||
{
|
||||
return porting::getTimeS() - m_connection_time;
|
||||
}
|
||||
|
||||
void RemoteClient::setVersionInfo(u8 major, u8 minor, u8 patch, const std::string &full)
|
||||
{
|
||||
m_version_major = major;
|
||||
|
||||
@@ -8,11 +8,10 @@
|
||||
|
||||
#include "network/address.h"
|
||||
#include "network/networkprotocol.h" // session_t
|
||||
#include "porting.h"
|
||||
#include "threading/mutex_auto_lock.h"
|
||||
#include "clientdynamicinfo.h"
|
||||
#include "constants.h" // PEER_ID_INEXISTENT
|
||||
|
||||
#include <list>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <set>
|
||||
@@ -310,7 +309,7 @@ public:
|
||||
{ serialization_version = m_pending_serialization_version; }
|
||||
|
||||
/* get uptime */
|
||||
u64 uptime() const { return porting::getTimeS() - m_connection_time; }
|
||||
u64 uptime() const;
|
||||
|
||||
/* set version information */
|
||||
void setVersionInfo(u8 major, u8 minor, u8 patch, const std::string &full);
|
||||
@@ -423,7 +422,7 @@ private:
|
||||
/*
|
||||
time this client was created
|
||||
*/
|
||||
const u64 m_connection_time = porting::getTimeS();
|
||||
const u64 m_connection_time;
|
||||
};
|
||||
|
||||
typedef std::unordered_map<u16, RemoteClient*> RemoteClientMap;
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "constants.h"
|
||||
#include "inventorymanager.h" // InventoryLocation
|
||||
#include "metadata.h"
|
||||
#include "network/networkprotocol.h"
|
||||
#include "unit_sao.h"
|
||||
|
||||
Reference in New Issue
Block a user