aboutsummaryrefslogtreecommitdiff
path: root/src/clientmap.cpp
AgeCommit message (Collapse)Author
2018-11-28Move client-specific files to 'src/client' (#7902)Quentin Bazin
Update Android.mk Remove 'src/client' from include_directories
2018-02-10Node definition manager refactor (#7016)Dániel Juhász
* Rename IWritableNodeDefManager to NodeDefManager * Make INodeDefManager functions const * Use "const *NodeDefManager" instead of "*INodeDefManager" * Remove unused INodeDefManager class * Merge NodeDefManager and CNodeDefManager * Document NodeDefManager
2017-08-30Remove DSTACK support (#6346)Loïc Blot
Debugstacks is not useful, we don't really use it, the DebugStack is not pertinent, gdb and lldb are better if we really want to debug.
2017-08-20Modernize code: very last fixes (#6290)Loïc Blot
Last modernization fixes
2017-08-19ServerMap saving: cleanups (#6274)Loïc Blot
* remove sector meta loading/saving from files which targets dead code (differs_from_disk is always empty) * this remove empty ServerMapSector and ClientMapSector, remove MapSector childs
2017-08-17clientmap, clientmedia: code modernizationLoic Blot
* use range-based for loops * simplify some tests * various code style fixes * remove debugprint in ClientMap::getBackgroundBrightness, debug code was not intended to be there * remove unused fields in MapDrawControl * use emplace_back instead of push_back when necessary
2017-07-30Darkness detection: Reduce chance of false positives darkening the skyboxLars Hofhansl
The getBackgroundBrightness() function detects darkness in the view direction to decide when to make the skybox dark. The volume checked was too narrow and missed the left and right edges of the view, too easily causing a dark skybox. Widen the checked volume to match a FOV of 72 degrees and a 16:9 aspect ratio game window.
2017-06-26Isolate irrlicht references and use a singleton (#6041)Loïc Blot
* Add Device3D class which will contain IrrlichtDevice interface move getSupportedVideoDrivers to Device3D Add Device3D singleton & use it in various places Rename Device3D to Rendering engine & add helper functions to various device pointers More singleton work RenderingEngine owns draw_load_screen move draw functions to RenderingEngine Reduce IrrlichtDevice exposure and guienvironment RenderingEngine: Expose get_timer_time() to remove device from guiEngine Make irrlichtdevice & scene manager less exposed * Code style fixes * Move porting::getVideoDriverName, getVideoDriverFriendlyName, getDisplayDensity, getDisplaySize to RenderingEngine Fix XORG_USED macro -> RenderingEngine + create_engine_device from RenderingEngine constructor directly * enum paralax => enum parallax
2017-06-21Fix render order of overlays (#6008)Dániel Juhász
* Fix render order of overlays * Use C++11 loops * Fix time_t
2017-06-17Cpp11 initializers 2 (#5999)Loïc Blot
* C++11 patchset 10: continue cleanup on constructors * Drop obsolete bool MainMenuData::enable_public (setting is called with cURL in server loop) * More classes cleanup * More classes cleanup + change NULL tests to boolean tests
2017-06-16C++11 patchset 9: move hardcoded init parameters to class definitions (part ↵Loïc Blot
1) (#5984) * C++11 patchset 9: move hardcoded init parameters to class definitions C++11 introduced the possibility to define the default values directly in class definitions, do it on current code Also remove some unused attributes * CollisionInfo::bouncy * collisionMoveResult::collides_xy * collisionMoveResult::standing_on_unloaded * Clouds::speed * More constructor cleanups + some variables removal * remove only write guiFormSpecMenu::m_old_tooltip * move header included inside defintions in genericobject.h * remove some unused since years exception classes * remove unused & empty debug_stacks_init * remove unused & empty content_nodemeta_serialize_legacy * remove forgotten useless bool (bouncy) in collision.cpp code
2017-04-21Soft node overlay (#5186)Dániel Juhász
This commit adds node overlays, which are tiles that are drawn on top of other tiles.
2017-03-11Allow server side occlusion culling.Lars Hofhansl
2017-02-09Perform mesh animation only once per frame.Lars Hofhansl
2017-01-20Remove `mathconstants.h` and use the correct way to get `M_PI` in MSVC. (#5072)red-001
2017-01-14Only set material flag on rendered meshes (#5023)lhofhansl
2017-01-09Environment & IGameDef code refactoring (#4985)Ner'zhul
* Environment code refactoring * Cleanup includes & class declarations in client & server environment to improve build speed * ServerEnvironment::m_gamedef is now a pointer to Server instead of IGameDef, permitting to cleanup many casts. * Cleanup IGameDef * Move ITextureSource* IGameDef::getTextureSource() to Client only. * Also move ITextureSource *IGameDef::tsrc() helper * drop getShaderSource, getSceneManager, getSoundManager & getCamera abstract call * drop unused emerge() call * cleanup server unused functions (mentionned before) * Drop one unused parameter from ContentFeatures::updateTextures * move checkLocalPrivilege to Client * Remove some unnecessary casts * create_formspec_menu: remove IWritableTextureSource pointer, as client already knows it * Fix some comments * Change required IGameDef to Server/Client pointers * Previous change that game.cpp sometimes calls functions with Client + InventoryManager + IGameDef in same functions but it's the same objects * Remove duplicate Client pointer in GUIFormSpecMenu::GUIFormSpecMenu * drop ClientMap::sectorWasDrawn which is unused
2017-01-04Improve getPointedThing() (#4346)Dániel Juhász
* Improved getPointedThing() The new algorithm checks every node exactly once. Now the point and normal vector of the collision is also returned in the PointedThing (currently they are not used outside of the function). Now the CNodeDefManager keeps the union of all possible nodeboxes, so the raycast won't miss any nodes. Also if there are only small nodeboxes, getPointedThing() is exceptionally fast. Also adds unit test for VoxelLineIterator. * Cleanup, code move This commit moves getPointedThing() and Client::getSelectedActiveObject() to ClientEnvironment. The map nodes now can decide which neighbors they are connecting to (MapNode::getNeighbors()).
2017-01-03Pull occlusion check out of loop, and minor code cleanups.Lars Hofhansl
2016-12-24Move PP() and PP2() macros to basic_macros.hRogier
Instead of redefining them everywhere.
2016-12-19Fix occlusion culling, again (#4930)lhofhansl
2016-12-18Fix occlusing counting (#4922)lhofhansl
2016-11-09Occlusion culling: Add comments, minor code improvementsparamat
Remove unnecessary code. Use '/ 2.0f' because endoff is a float.
2016-11-08Occlusion culling: Fix 'end offset' distance, half this for centre pointLars Hofhansl
'endoff', the maximum diagonal of a mapblock, was incorrectly calculated. Half this value for the centre point of the mapblock.
2016-11-04Add debug priv, and allow player to display the scene as wire-frame. (#4709)lhofhansl
2016-02-21Camera: remove auto tune FPS, single view range settingRealBadAngel
2016-02-19Clientmap: Define p_nodes_min/max as v3s32 instead of v3s16paramat
'cam_pos_nodes -/+ box_nodes_d' can exceed the range of v3s16 when a player is near the world edge using a large view range This previously caused world to disappear Create new function getBlocksInViewRange() called from updateDrawList() and renderMap() Correct code style throughout updateDrawList() and renderMap()
2016-02-11v2d & aabbox3d<f32> & sky cleanupsnerzhul
* Sky: rename Box => m_box and inline getBoundingBox * Uniformize aabbox3d<f32> to aabb3f
2016-02-09Remove ClientMap::m_camera_mutexKahrl
All places that lock this mutex are only called by the main thread: ClientMap::updateCamera(), ClientMap::updateDrawList(), ClientMap::renderMap(), ClientMap::renderPostFx().
2015-10-14Rename macros with two leading underscoresShadowNinja
These names are reserved for the compiler/library implementations.
2015-08-25Change i++ to ++iDavid Jones
2015-08-23Clean up threadingShadowNinja
* Rename everything. * Strip J prefix. * Change UpperCamelCase functions to lowerCamelCase. * Remove global (!) semaphore count mutex on OSX. * Remove semaphore count getter (unused, unsafe, depended on internal API functions on Windows, and used a hack on OSX). * Add `Atomic<type>`. * Make `Thread` handle thread names. * Add support for C++11 multi-threading. * Combine pthread and win32 sources. * Remove `ThreadStarted` (unused, unneeded). * Move some includes from the headers to the sources. * Move all of `Event` into its header (allows inlining with no new includes). * Make `Event` use `Semaphore` (except on Windows). * Move some porting functions into `Thread`. * Integrate logging with `Thread`. * Add threading test.
2015-06-14Improved parallax mapping. Generate heightmaps on the fly.RealBadAngel
2015-04-01Move globals from main.cpp to more sane locationsCraig Robbins
Move debug streams to log.cpp|h Move GUI-related globals to clientlauncher Move g_settings and g_settings_path to settings.cpp|h Move g_menuclouds to clouds.cpp|h Move g_profiler to profiler.cpp|h
2015-03-07For usages of assert() that are meant to persist in Release builds (when ↵Craig Robbins
NDEBUG is defined), replace those usages with persistent alternatives
2015-03-05Fix issue #2441: crash on respawn, since a conversion std::list to ↵Loic Blot
std::vector on Environment.cpp * Also change some std::list to std::vector for ClientMap::renderMap * Remove disabled code in ClientMap::renderMap, disabled since a long time
2015-03-02Fix occlusionMiguel Almeida
2015-02-17Replace std::list by std::vector into ClientMap::updateDrawList, ↵Loic Blot
Map::timerUpdate and ServerMap::save(). This will speedup the loop reading into those functions
2015-01-18Fix all warnings and remove -Wno-unused-but-set cflagkwolekr
2014-12-31Add display_gamma option for clientCraig Robbins
2014-12-07Performance of main client loop up to 2x faster In places, up to 3 times fasterCraig Robbins
NOTE 1: This does not mean a 2x increase in framerate. Increase in fps may be up to 1-2fps NOTE 2: This local 'caching' of settings is not optimal and an alternative solution will be worked on after 0.4.11 is released
2014-06-23Avoid doing a full material compare if not even first texture does matchsapier
2014-05-18Add support for interlaced polarized 3d screenssapier
Add (experimental) support for topbottom as well as sidebyside 3d mode
2014-04-12Add player:set_eye_offset() by @MirceaKitsune and clean upBlockMen
2014-04-12Add third person viewBlockMen
2014-03-04Fix rendering glitches when far from the center of the mapNovatux
2013-12-01Cleanup jthread and fix win32 buildsapier
2013-08-03Fix and improve view range tunerPerttu Ahola
2013-03-11Migrate to STL containers/algorithms.Ilya Zhuravlev
2013-02-24Update Copyright YearsSfan5