aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* Drop --videomodes, fullscreen_bpp and high_precision_fpu settingssfan52021-06-16
| | | | These have been pointless for a while.
* Shadow mapping render pass (#11244)Liso2021-06-06
| | | Co-authored-by: x2048 <codeforsmile@gmail.com>
* Add metatables to lua vectors (#11039)DS2021-06-04
| | | Add backwards-compatible metatable functions for vectors.
* fontengine: Fix crash loading PNG/XML fonts from paths without dotsfan52021-06-01
| | | | fixes #11096
* Add core.compare_block_status function (#11247)SmallJoker2021-05-30
| | | Makes it possible to check the status of the mapblock in a future-extensible way.
* Fix base64 validation and add unittests (#10515)Lars Müller2021-05-30
| | | Implement proper padding character checks
* Fix procession ordering issue in content_caosfan52021-05-30
|
* Fix background color of formspec text fieldssfan52021-05-30
|
* script: Replace calls to depreated luaL_openlibsfan52021-05-30
|
* Provide exact error message if postgres connection string missingsfan52021-05-30
|
* UnitSAO: Prevent circular attachmentsSmallJoker2021-05-29
|
* Fix cloud fog being broken for high cloudsWuzzy2021-05-29
|
* Fix client crash on when con::PeerNotFoundException is thrown (#11286)savilli2021-05-24
|
* GUIEditBox: Allow selecting and copying read-only textsSmallJoker2021-05-22
|
* Fix curl_timeout being ignored for Lua HTTP fetchessfan52021-05-17
|
* Use --image-base instead of -Ttext-segment for lld linker on FreeBSD (#9367) ↵Dmitry Marakasov2021-05-15
| | | | (#11263)
* Fix overlays for 2D-drawn itemssfan52021-05-08
| | | | fixes #11248
* Fix build for newer versions of GCC (#11246)lhofhansl2021-05-06
|
* fix: extractZipFile is not part of Client but more generic.Loic Blot2021-05-06
| | | | This solve a crash from mainmenu while extracting the zip
* Use Irrlicht functions to query npot texture supportsfan52021-05-05
|
* fix: some code tidy about includes & irr namespacesLoic Blot2021-05-03
|
* refacto: remove get_gui_env & draw_load_screen from RenderingEngine singletonLoic Blot2021-05-03
|
* fix: don't use RenderingEngine singleton when it's possibleLoic Blot2021-05-03
|
* refacto: RenderingEngine::get_scene_manager() is now not callable from singletonLoic Blot2021-05-03
| | | | | | This permits to make evidence that we have some bad object passing on various code parts. I fixed majority of them to reduce the scope of passed objects Unfortunately, for some edge cases i should have to expose ISceneManager from client, this should be fixed in the future when our POO will be cleaner client side (we have a mix of rendering and processing in majority of the client objects, it works but it's not clean)
* refacto: Hud: make driver, client, player, inventory, tsrc private & drop ↵Loic Blot2021-05-03
| | | | | | unused guienv also fix c_content.h, on client it includes the src/client/hud.h instead of src/hud.h, which leads to wrong file dependency on the lua stack
* refacto: drop unused Hud::smgrLoic Blot2021-05-03
|
* refacto: don't use RenderingEngine singleton on CAOLoic Blot2021-05-03
| | | | | | * we don't need on CAO side more than SceneManager, and temporary. Pass only required SceneManager as a parameter to build CAO and add them to the current scene * Use temporary the RenderingEngine singleton from ClientEnvironment, waitfor for better solution * Make ClientActiveObject::addToScene virtual function mandatory to be defined by children to ensure we don't forget to properly define it
* refacto: protect some RenderingEngine::get_scene_managerLoic Blot2021-05-03
| | | | | * protect it from Camera, Sky, ClientMap object calls * rename Game::sky to Game::m_sky
* refacto: RenderingEngine is now better hiddenLoic Blot2021-05-03
| | | | | | | | | | * No more access to the singleton instance from everywhere (RenderingEngine::get_instance dropped) * RenderingEngine::get_timer_time is now non static * RenderingEngine::draw_menu_scene is now non static * RenderingEngine::draw_scene is now non static * RenderingEngine::{initialize,finalize} are now non static * RenderingEngine::run is now non static * RenderingEngine::getWindowSize now have a static helper. It was mandatory to hide the global get_instance access
* refacto: hide mesh_cache inside the rendering engineLoic Blot2021-05-03
| | | | This permit cleaner access to meshCache and ensure we don't access to it from all the code
* refacto: add RenderingEngine::cleanupMeshCacheLoic Blot2021-05-03
| | | | This permits to prevent client to own the mesh cache cleanup logic. It's better in RenderingEngine
* refacto: rendering engine singleton removal step 1 (filesystem)Loic Blot2021-05-03
| | | | | | | | Make the RenderingEngine filesystem member non accessible from everywhere This permits also to determine that some lua code has directly a logic to extract zip file. Move this logic inside client, it's not the lua stack role to perform a such complex operation Found also another irrlicht <1.8 compat code to remove
* fix: drop old irrlicht <1.8 compat on Client::loadMediaLoic Blot2021-05-03
|
* Add `minetest.colorspec_to_colorstring` (#10425)Vincent Robinson2021-04-23
|
* Fix two CMake build issuessfan52021-04-21
| | | | | * PostgreSQL fallback code missed the includes (closes #11219) * build failed when Freetype enabled but not found
* Look for PostgreSQL library properly and fix CIsfan52021-04-20
|
* Enable cleanTransparent filter for mipmapping and improve its' algorithm ↵sfan52021-04-20
| | | | (#11145)
* Put torch/signlike node on floor if no paramtype2 (#11074)Wuzzy2021-04-20
|
* Add a key to toggle map block bounds (#11172)Seth Traverse2021-04-20
| | | | It's often useful to know where the map block boundaries are for doing server admin work and the like. Adds three modes: single mapblock, range of 5, and disabled.
* GLES fixes (#11205)sfan52021-04-18
| | | | | * Consistently set float precision for GLES * Enable DPI scaling on Windows+GLES
* Isolate library tables between sandbox and insecure envsfan52021-04-18
|
* Fix ignored OpenGLES2 include path and cmake warningsfan52021-04-16
|
* Attachments: Avoid data loss caused by set_attach() in callbacks (#11181)SmallJoker2021-04-13
|
* Buildbot changes to allow out-of-tree builds (#11180)sfan52021-04-11
| | | | | | | * Do proper out-of-tree builds with buildbot * Don't write to bin/ for cross builds * This allows safely building multiple builds from the same source dir, e.g. with the buildbot. * Disable Gettext (by default) and Freetype (entirely) for server builds
* Modifying fall damage via armor group (#11080)Wuzzy2021-04-11
| | | Adds a new fall_damage_add_percent armor group which influences the fall damage in addition to the existing node group.
* Fix server favorites not saving when client/serverlist/ doesn't exist ↵sfan52021-04-09
| | | | already (#11152)
* Don't reseed stars when changing star countWuzzy2021-04-09
|
* Make edit boxes respond to string input (IME) (#11156)yw052021-04-05
| | | Make edit boxes respond to string input events (introduced in minetest/irrlicht#23) that are usually triggered by entering text with an IME.
* Don't apply connection timeout limit to locally hosted serverssfan52021-04-05
| | | | fixes #11085
* Game: Scale damage flash to max HPSmallJoker2021-04-05
| | | | The flash intensity is calculated proportionally to the maximal HP.
MAP_LOCK_REQUIRED; LuaAreaStore *o = checkobject(L, 1); AreaStore *ast = o->as; v3s16 minedge = check_v3s16(L, 2); v3s16 maxedge = check_v3s16(L, 3); bool include_borders = true; bool include_data = false; bool accept_overlap = false; if (lua_isboolean(L, 4)) { accept_overlap = lua_toboolean(L, 4); get_data_and_border_flags(L, 5, &include_borders, &include_data); } std::vector<Area *> res; ast->getAreasInArea(&res, minedge, maxedge, accept_overlap); push_areas(L, res, include_borders, include_data); return 1; } // insert_area(edge1, edge2, data, id) int LuaAreaStore::l_insert_area(lua_State *L) { NO_MAP_LOCK_REQUIRED; LuaAreaStore *o = checkobject(L, 1); AreaStore *ast = o->as; Area a(check_v3s16(L, 2), check_v3s16(L, 3)); size_t d_len; const char *data = luaL_checklstring(L, 4, &d_len); a.data = std::string(data, d_len); if (lua_isnumber(L, 5)) a.id = lua_tonumber(L, 5); if (!ast->insertArea(&a)) return 0; lua_pushnumber(L, a.id); return 1; } // reserve(count) int LuaAreaStore::l_reserve(lua_State *L) { NO_MAP_LOCK_REQUIRED; LuaAreaStore *o = checkobject(L, 1); AreaStore *ast = o->as; size_t count = luaL_checknumber(L, 2); ast->reserve(count); return 0; } // remove_area(id) int LuaAreaStore::l_remove_area(lua_State *L) { NO_MAP_LOCK_REQUIRED; LuaAreaStore *o = checkobject(L, 1); AreaStore *ast = o->as; u32 id = luaL_checknumber(L, 2); bool success = ast->removeArea(id); lua_pushboolean(L, success); return 1; } // set_cache_params(params) int LuaAreaStore::l_set_cache_params(lua_State *L) { NO_MAP_LOCK_REQUIRED; LuaAreaStore *o = checkobject(L, 1); AreaStore *ast = o->as; luaL_checktype(L, 2, LUA_TTABLE); bool enabled = getboolfield_default(L, 2, "enabled", true); u8 block_radius = getintfield_default(L, 2, "block_radius", 64); size_t limit = getintfield_default(L, 2, "block_radius", 1000); ast->setCacheParams(enabled, block_radius, limit); return 0; } // to_string() int LuaAreaStore::l_to_string(lua_State *L) { NO_MAP_LOCK_REQUIRED; LuaAreaStore *o = checkobject(L, 1); std::ostringstream os(std::ios_base::binary); o->as->serialize(os); std::string str = os.str(); lua_pushlstring(L, str.c_str(), str.length()); return 1; } // to_file(filename) int LuaAreaStore::l_to_file(lua_State *L) { NO_MAP_LOCK_REQUIRED; LuaAreaStore *o = checkobject(L, 1); AreaStore *ast = o->as; const char *filename = luaL_checkstring(L, 2); CHECK_SECURE_PATH(L, filename, true); std::ostringstream os(std::ios_base::binary); ast->serialize(os); lua_pushboolean(L, fs::safeWriteToFile(filename, os.str())); return 1; } // from_string(str) int LuaAreaStore::l_from_string(lua_State *L) { NO_MAP_LOCK_REQUIRED; LuaAreaStore *o = checkobject(L, 1); size_t len; const char *str = luaL_checklstring(L, 2, &len); std::istringstream is(std::string(str, len), std::ios::binary); return deserialization_helper(L, o->as, is); } // from_file(filename) int LuaAreaStore::l_from_file(lua_State *L) { NO_MAP_LOCK_REQUIRED; LuaAreaStore *o = checkobject(L, 1); const char *filename = luaL_checkstring(L, 2); CHECK_SECURE_PATH(L, filename, false); std::ifstream is(filename, std::ios::binary); return deserialization_helper(L, o->as, is); } LuaAreaStore::LuaAreaStore() : as(AreaStore::getOptimalImplementation()) { } LuaAreaStore::LuaAreaStore(const std::string &type) { #if USE_SPATIAL if (type == "LibSpatial") { as = new SpatialAreaStore(); } else #endif { as = new VectorAreaStore(); } } LuaAreaStore::~LuaAreaStore() { delete as; } // LuaAreaStore() // Creates an LuaAreaStore and leaves it on top of stack int LuaAreaStore::create_object(lua_State *L) { NO_MAP_LOCK_REQUIRED; LuaAreaStore *o = (lua_isstring(L, 1)) ? new LuaAreaStore(lua_tostring(L, 1)) : new LuaAreaStore(); *(void **)(lua_newuserdata(L, sizeof(void *))) = o; luaL_getmetatable(L, className); lua_setmetatable(L, -2); return 1; } LuaAreaStore *LuaAreaStore::checkobject(lua_State *L, int narg) { NO_MAP_LOCK_REQUIRED; luaL_checktype(L, narg, LUA_TUSERDATA); void *ud = luaL_checkudata(L, narg, className); if (!ud) luaL_typerror(L, narg, className); return *(LuaAreaStore **)ud; // unbox pointer } void LuaAreaStore::Register(lua_State *L) { lua_newtable(L); int methodtable = lua_gettop(L); luaL_newmetatable(L, className); int metatable = lua_gettop(L); lua_pushliteral(L, "__metatable"); lua_pushvalue(L, methodtable); lua_settable(L, metatable); // hide metatable from Lua getmetatable() lua_pushliteral(L, "__index"); lua_pushvalue(L, methodtable); lua_settable(L, metatable); lua_pushliteral(L, "__gc"); lua_pushcfunction(L, gc_object); lua_settable(L, metatable); lua_pop(L, 1); // drop metatable luaL_openlib(L, 0, methods, 0); // fill methodtable lua_pop(L, 1); // drop methodtable // Can be created from Lua (AreaStore()) lua_register(L, className, create_object); } const char LuaAreaStore::className[] = "AreaStore"; const luaL_Reg LuaAreaStore::methods[] = { luamethod(LuaAreaStore, get_area), luamethod(LuaAreaStore, get_areas_for_pos), luamethod(LuaAreaStore, get_areas_in_area), luamethod(LuaAreaStore, insert_area), luamethod(LuaAreaStore, reserve), luamethod(LuaAreaStore, remove_area), luamethod(LuaAreaStore, set_cache_params), luamethod(LuaAreaStore, to_string), luamethod(LuaAreaStore, to_file), luamethod(LuaAreaStore, from_string), luamethod(LuaAreaStore, from_file), {0,0} };