63 Commits

Author SHA1 Message Date
MoNTE48
e98d421aff Merge remote-tracking branch 'upstream/stable-0.4' into sync 2019-04-01 20:18:54 +02:00
Loic Blot
8474e543a0 More C++03 fixes 2018-06-03 17:32:00 +02:00
Dániel Juhász
4e3ee7efb0 Fix render order of overlays (#6008)
* Fix render order of overlays

* Use C++11 loops

* Fix time_t
2018-06-03 17:31:59 +02:00
Maksim Gamarnik
35770f4abb Merge Minetest 0.4.16 2017-06-06 23:03:34 +03:00
Dániel Juhász
b12ed27315 Soft node overlay (#5186)
This commit adds node overlays, which are tiles that are drawn on top of
other tiles.
2017-04-21 23:34:59 +10:00
Lars Hofhansl
38224d47bf Allow server side occlusion culling. 2017-03-11 18:11:19 -08:00
Lars Hofhansl
8bdc65ebf9 Perform mesh animation only once per frame. 2017-02-09 00:10:41 +00:00
Maksim Gamarnik
e05f7db82f Updated to Minetest ver. 0.4.15 2017-01-30 00:44:07 +02:00
red-001
4fa41de084 Remove mathconstants.h and use the correct way to get M_PI in MSVC. (#5072) 2017-01-20 23:19:41 +01:00
lhofhansl
a322ebcd9b Only set material flag on rendered meshes (#5023) 2017-01-14 22:30:14 +01:00
Ner'zhul
14a094c1a2 Environment & IGameDef code refactoring (#4985)
* 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-09 20:39:22 +01:00
Dániel Juhász
46aff27445 Improve getPointedThing() (#4346)
* 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-04 19:18:40 +01:00
Lars Hofhansl
3af2a959cf Pull occlusion check out of loop, and minor code cleanups. 2017-01-03 08:14:58 +01:00
Rogier
18bdc18f75 Move PP() and PP2() macros to basic_macros.h
Instead of redefining them everywhere.
2016-12-24 00:32:50 +00:00
lhofhansl
0d793a3fe9 Fix occlusion culling, again (#4930) 2016-12-19 06:43:04 +01:00
lhofhansl
5f3354d634 Fix occlusing counting (#4922) 2016-12-18 22:25:42 +10:00
paramat
81b265b726 Occlusion culling: Add comments, minor code improvements
Remove unnecessary code.
Use '/ 2.0f' because endoff is a float.
2016-11-09 00:09:35 +00:00
Lars Hofhansl
30913ce923 Occlusion culling: Fix 'end offset' distance, half this for centre point
'endoff', the maximum diagonal of a mapblock, was incorrectly calculated.
Half this value for the centre point of the mapblock.
2016-11-08 15:12:08 +00:00
sfan5
d525673848 iOS changed files (#41) 2016-11-06 00:14:16 +02:00
lhofhansl
9447a9b575 Add debug priv, and allow player to display the scene as wire-frame. (#4709) 2016-11-04 03:14:32 +01:00
Maksim Gamarnik
df40c58333 Fix merge prev commits and fix bugs
Android: mpir, x86 flags, range view, fix favorite server icon, other
2016-05-03 04:21:56 +03:00
Maksim Gamarnik
be288f1c52 Merge 2016-02-23 00:40:02 +02:00
RealBadAngel
e9ccb7fe8e Camera: remove auto tune FPS, single view range setting 2016-02-21 18:18:13 +01:00
paramat
e2f3483b63 Clientmap: Define p_nodes_min/max as v3s32 instead of v3s16
'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-19 14:51:41 +00:00
Maksim Gamarnik
d7c0fad71f Merge Minetest commits 2016-02-11 22:35:23 +02:00
nerzhul
c4bf66116d v2d & aabbox3d<f32> & sky cleanups
* Sky: rename Box => m_box and inline getBoundingBox
* Uniformize aabbox3d<f32> to aabb3f
2016-02-11 16:55:15 +01:00
Kahrl
30dd28fc18 Remove ClientMap::m_camera_mutex
All places that lock this mutex are only called by the main thread:
ClientMap::updateCamera(), ClientMap::updateDrawList(), ClientMap::renderMap(), ClientMap::renderPostFx().
2016-02-09 07:16:00 +00:00
Maksim Gamarnik
919be490f9 Update
Sync all Minetest commits
2015-11-10 13:49:24 +02:00
ShadowNinja
85dbe50ec1 Rename macros with two leading underscores
These names are reserved for the compiler/library implementations.
2015-10-14 02:39:37 -04:00
David Jones
9d1284b324 Change i++ to ++i 2015-08-25 18:33:52 -04:00
ShadowNinja
098d28aa5e Clean up threading
* 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-08-23 22:04:06 -04:00
Maksim Gamarnik
9247f32e0e LGPL 2.1 to 3.0 on all files 2015-08-14 01:26:28 +03:00
RealBadAngel
a111a5fbcf Improved parallax mapping. Generate heightmaps on the fly. 2015-06-14 21:13:36 +02:00
Craig Robbins
0731f9ed2a Move globals from main.cpp to more sane locations
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-04-01 23:04:25 +10:00
Craig Robbins
27791ee1aa For usages of assert() that are meant to persist in Release builds (when NDEBUG is defined), replace those usages with persistent alternatives 2015-03-07 22:41:47 +10:00
Loic Blot
5e4c5bfb4f Fix issue #2441: crash on respawn, since a conversion std::list to 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-05 15:36:20 +01:00
Miguel Almeida
c43eb29895 Fix occlusion 2015-03-02 12:09:02 +01:00
Loic Blot
aa1d7043a5 Replace std::list by std::vector into ClientMap::updateDrawList, Map::timerUpdate and ServerMap::save().
This will speedup the loop reading into those functions
2015-02-17 15:28:49 +01:00
kwolekr
87330183bf Fix all warnings and remove -Wno-unused-but-set cflag 2015-01-18 23:29:19 -05:00
Craig Robbins
55e54ce5ba Add display_gamma option for client 2014-12-31 02:44:31 +10:00
Craig Robbins
0be778ad52 Performance of main client loop up to 2x faster In places, up to 3 times faster
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-12-07 00:51:01 +10:00
sapier
8feeb4faec Avoid doing a full material compare if not even first texture does match 2014-06-23 00:13:41 +02:00
sapier
1d6a1f727d Add support for interlaced polarized 3d screens
Add (experimental) support for topbottom as well as sidebyside 3d mode
2014-05-18 01:08:13 +02:00
BlockMen
a5db2961b2 Add player:set_eye_offset() by @MirceaKitsune and clean up 2014-04-12 17:44:20 +02:00
BlockMen
8909fe913c Add third person view 2014-04-12 17:44:15 +02:00
Novatux
a662fe9fc4 Fix rendering glitches when far from the center of the map 2014-03-04 20:12:10 +01:00
sapier
396602432c Cleanup jthread and fix win32 build 2013-12-01 16:25:46 +01:00
Perttu Ahola
18d7e214df Fix and improve view range tuner 2013-08-03 18:46:18 +03:00
Ilya Zhuravlev
a12df55f29 Migrate to STL containers/algorithms. 2013-03-11 19:08:39 -04:00
Sfan5
3fab3825aa Update Copyright Years 2013-02-24 20:15:24 +01:00