summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2021-01-22 15:09:26 +0000
committerGitHub <noreply@github.com>2021-01-22 15:09:26 +0000
commit4c76239818f5159314f30883f98b977d30aaa26c (patch)
tree42d2fc37b1e5ed2ad1c450a5547fce2ddec75b65 /src/client
parent67aa75d444d0e5cfff2728dbbcffd6f95b2fe88b (diff)
downloadminetest-4c76239818f5159314f30883f98b977d30aaa26c.tar.gz
minetest-4c76239818f5159314f30883f98b977d30aaa26c.tar.bz2
minetest-4c76239818f5159314f30883f98b977d30aaa26c.zip
Remove dead code (#10845)
Diffstat (limited to 'src/client')
-rw-r--r--src/client/client.cpp20
-rw-r--r--src/client/client.h7
-rw-r--r--src/client/clientenvironment.cpp7
-rw-r--r--src/client/hud.cpp2
-rw-r--r--src/client/mapblock_mesh.cpp7
-rw-r--r--src/client/mapblock_mesh.h2
-rw-r--r--src/client/mesh_generator_thread.h1
-rw-r--r--src/client/minimap.h1
-rw-r--r--src/client/tile.cpp2
9 files changed, 0 insertions, 49 deletions
diff --git a/src/client/client.cpp b/src/client/client.cpp
index af69d0ec9..6577c287d 100644
--- a/src/client/client.cpp
+++ b/src/client/client.cpp
@@ -159,20 +159,6 @@ void Client::loadMods()
scanModIntoMemory(BUILTIN_MOD_NAME, getBuiltinLuaPath());
m_script->loadModFromMemory(BUILTIN_MOD_NAME);
- // TODO Uncomment when server-sent CSM and verifying of builtin are complete
- /*
- // Don't load client-provided mods if disabled by server
- if (checkCSMRestrictionFlag(CSMRestrictionFlags::CSM_RF_LOAD_CLIENT_MODS)) {
- warningstream << "Client-provided mod loading is disabled by server." <<
- std::endl;
- // If builtin integrity is wrong, disconnect user
- if (!checkBuiltinIntegrity()) {
- // TODO disconnect user
- }
- return;
- }
- */
-
ClientModConfiguration modconf(getClientModsLuaPath());
m_mods = modconf.getMods();
// complain about mods with unsatisfied dependencies
@@ -216,12 +202,6 @@ void Client::loadMods()
m_script->on_minimap_ready(m_minimap);
}
-bool Client::checkBuiltinIntegrity()
-{
- // TODO
- return true;
-}
-
void Client::scanModSubfolder(const std::string &mod_name, const std::string &mod_path,
std::string mod_subpath)
{
diff --git a/src/client/client.h b/src/client/client.h
index bffdc7ec6..25a1b97ba 100644
--- a/src/client/client.h
+++ b/src/client/client.h
@@ -415,11 +415,6 @@ public:
return m_csm_restriction_flags & flag;
}
- u32 getCSMNodeRangeLimit() const
- {
- return m_csm_restriction_noderange;
- }
-
inline std::unordered_map<u32, u32> &getHUDTranslationMap()
{
return m_hud_server_to_client;
@@ -437,7 +432,6 @@ public:
}
private:
void loadMods();
- bool checkBuiltinIntegrity();
// Virtual methods from con::PeerHandler
void peerAdded(con::Peer *peer) override;
@@ -587,7 +581,6 @@ private:
// Client modding
ClientScripting *m_script = nullptr;
- bool m_modding_enabled;
std::unordered_map<std::string, ModMetadata *> m_mod_storages;
float m_mod_storage_save_timer = 10.0f;
std::vector<ModSpec> m_mods;
diff --git a/src/client/clientenvironment.cpp b/src/client/clientenvironment.cpp
index da1e6e9c7..fc7cbe254 100644
--- a/src/client/clientenvironment.cpp
+++ b/src/client/clientenvironment.cpp
@@ -334,13 +334,6 @@ GenericCAO* ClientEnvironment::getGenericCAO(u16 id)
return NULL;
}
-bool isFreeClientActiveObjectId(const u16 id,
- ClientActiveObjectMap &objects)
-{
- return id != 0 && objects.find(id) == objects.end();
-
-}
-
u16 ClientEnvironment::addActiveObject(ClientActiveObject *object)
{
// Register object. If failed return zero id
diff --git a/src/client/hud.cpp b/src/client/hud.cpp
index e956c2738..46736b325 100644
--- a/src/client/hud.cpp
+++ b/src/client/hud.cpp
@@ -571,8 +571,6 @@ void Hud::drawCompassTranslate(HudElement *e, video::ITexture *texture,
void Hud::drawCompassRotate(HudElement *e, video::ITexture *texture,
const core::rect<s32> &rect, int angle)
{
- core::dimension2di imgsize(texture->getOriginalSize());
-
core::rect<s32> oldViewPort = driver->getViewPort();
core::matrix4 oldProjMat = driver->getTransform(video::ETS_PROJECTION);
core::matrix4 oldViewMat = driver->getTransform(video::ETS_VIEW);
diff --git a/src/client/mapblock_mesh.cpp b/src/client/mapblock_mesh.cpp
index 4c43fcb61..d78a86b2d 100644
--- a/src/client/mapblock_mesh.cpp
+++ b/src/client/mapblock_mesh.cpp
@@ -1176,13 +1176,6 @@ MapBlockMesh::MapBlockMesh(MeshMakeData *data, v3s16 camera_offset):
}
if (m_mesh[layer]) {
-#if 0
- // Usually 1-700 faces and 1-7 materials
- std::cout << "Updated MapBlock has " << fastfaces_new.size()
- << " faces and uses " << m_mesh[layer]->getMeshBufferCount()
- << " materials (meshbuffers)" << std::endl;
-#endif
-
// Use VBO for mesh (this just would set this for ever buffer)
if (m_enable_vbo)
m_mesh[layer]->setHardwareMappingHint(scene::EHM_STATIC);
diff --git a/src/client/mapblock_mesh.h b/src/client/mapblock_mesh.h
index 0308b8161..3b17c4af9 100644
--- a/src/client/mapblock_mesh.h
+++ b/src/client/mapblock_mesh.h
@@ -125,8 +125,6 @@ public:
m_animation_force_timer--;
}
- void updateCameraOffset(v3s16 camera_offset);
-
private:
scene::IMesh *m_mesh[MAX_TILE_LAYERS];
MinimapMapblock *m_minimap_mapblock;
diff --git a/src/client/mesh_generator_thread.h b/src/client/mesh_generator_thread.h
index f3c5e7da8..4371b8390 100644
--- a/src/client/mesh_generator_thread.h
+++ b/src/client/mesh_generator_thread.h
@@ -40,7 +40,6 @@ struct QueuedMeshUpdate
{
v3s16 p = v3s16(-1337, -1337, -1337);
bool ack_block_to_server = false;
- bool urgent = false;
int crack_level = -1;
v3s16 crack_pos;
MeshMakeData *data = nullptr; // This is generated in MeshUpdateQueue::pop()
diff --git a/src/client/minimap.h b/src/client/minimap.h
index 4a2c462f8..87c9668ee 100644
--- a/src/client/minimap.h
+++ b/src/client/minimap.h
@@ -138,7 +138,6 @@ public:
size_t getMaxModeIndex() const { return m_modes.size() - 1; };
void nextMode();
- void setModesFromString(std::string modes_string);
MinimapModeDef getModeDef() const { return data->mode; }
video::ITexture *getMinimapTexture();
diff --git a/src/client/tile.cpp b/src/client/tile.cpp
index 37836d0df..aad956ada 100644
--- a/src/client/tile.cpp
+++ b/src/client/tile.cpp
@@ -429,7 +429,6 @@ private:
// Cached settings needed for making textures from meshes
bool m_setting_trilinear_filter;
bool m_setting_bilinear_filter;
- bool m_setting_anisotropic_filter;
};
IWritableTextureSource *createTextureSource()
@@ -450,7 +449,6 @@ TextureSource::TextureSource()
// for these settings to take effect
m_setting_trilinear_filter = g_settings->getBool("trilinear_filter");
m_setting_bilinear_filter = g_settings->getBool("bilinear_filter");
- m_setting_anisotropic_filter = g_settings->getBool("anisotropic_filter");
}
TextureSource::~TextureSource()