mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Remove dead code (#10845)
This commit is contained in:
parent
67aa75d444
commit
4c76239818
31 changed files with 8 additions and 331 deletions
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue