Commit Graph

164 Commits

Author SHA1 Message Date
SmallJoker 3d66622772
Send only changed node metadata to clients instead of whole mapblock (#5268)
Includes newer style changes and fixes by est31

Improve the block position de-serialization
Add type NodeMetadataMap
2018-12-04 20:37:48 +01:00
Vanessa Dannenberg 1b0fd195c6 Raise hotbar limit to 32 slots, add associated keybinding options (#7916)
add associated keybinding options
update docs and settingtypes
2018-12-02 23:34:29 +01:00
Paramat ff12630bc9
Draw stars behind the moon (#7928)
This time correctly, by resetting the 'material' to '1' after moon draw.
2018-12-02 07:25:43 +00:00
Paramat 5dd542401a
Slightly alter star appearence time and full brightness time (#7921)
At sunset:
Stars first appear slightly later, at the time the sun disappears over the horizon,
this fixes seeing dark stars in front of the sun horizon glow texture.
Stars reach full brightness slightly earlier at time 20000, not so excessively long
after sunset.

The above behaviour is also applied at sunrise, but of course, time-inverted.
2018-12-02 04:17:05 +00:00
Gaël C 327bad2eaf Added pitch fly mode (#7817)
In pitch fly mode, you fly to the exact direction you are pointing at, using the forward key. Other move directions are also pitched accordingly.
It allows smoother and more complex movements.
Can be enabled/disabled by L key by default (set keymap_pitchfly in minetest.conf)
2018-12-01 10:01:32 +01:00
Paramat dcf58a3ad0
Fix sky bugs when using sun or moon textures (#7918)
Reverts the render order change of commit
ce2d33eb97
2018-12-01 05:04:13 +00:00
Quentin Bazin 5f1cd555cd Move client-specific files to 'src/client' (#7902)
Update Android.mk
Remove 'src/client' from include_directories
2018-11-28 20:01:49 +01:00
stujones11 3b11288989 Android: Improve UI scaling on smaller high-density displays (#7834)
* Android: Improve UI scaling on smaller high-density displays
2018-11-18 11:31:19 +01:00
number Zero 4f9c33de64 Disable HW stereo for IrrLicht 1.9 (not supported anymore) 2018-11-11 18:08:15 +01:00
Paramat b982e45456
F5 debug info: Use full words for NSEW directions for readability (#7461) 2018-10-06 00:53:50 +01:00
Vitaliy 18a8fbf465 Software inventorycube (#7651)
Fixes missing/upside-down images on Android.
2018-09-29 19:40:17 +01:00
Paramat 766fb7b46e
Particles: Make collision with objects optional (#7682)
Also set it to false for node dig particles, as they are often created
and high in number.

Improve particle documentation.
2018-09-08 00:38:35 +01:00
lhofhansl 3a95d760e9 Some minor Fastface optimizations. (#7628) 2018-08-08 15:53:06 +02:00
thoughtjigs 3d516079eb Provide Xorg/net wm process ID (#7445)
Adding support for _NET_WM_PID as defined in Extended Window Manager Hints
Move verbose messaging to setupXorgTopLevelWindow method as Xorg messages should only occur when running in Xorg env.
Irrlicht returns the XDisplay as a void* and XWindow as an unsigned long so reinterpret those as the appropriate type. Also fixed a spaces for tab formating issue
2018-06-17 10:41:07 +02:00
otdav33 3f0720e721 Add crossview support (#7361) 2018-05-29 18:38:58 +02:00
Loic Blot 75aa41c6de
Fix GameUI flag value regression introduced by a78659ed05
Added more strong unittests on that part to prevent future regression
2018-05-29 08:34:09 +02:00
Loïc Blot a78659ed05 Fix more GCC 8.1 warnings   1   master
Fix 3 warnings reported by GCC 8.1 of the following type

```src/client/gameui.cpp:191:43: warning: « void* memset(void*, int, size_t) » effacement d'un objet du type non trivial « struct GameUI::Flags »; use assignment or value-initialization instead [-Wclass-memaccess]
  memset(&m_flags, 0, sizeof(GameUI::Flags));
```
2018-05-28 15:39:04 +02:00
Loic Blot 05fe3b06c8
Fix last clang-tidy reported problems for performance-type-promotion-in-math-fn
Based on https://travis-ci.org/minetest/minetest/jobs/361810382 output

Also fix 2 missing copyright notices
2018-04-03 23:05:22 +02:00
Loïc Blot ce873108aa
Client eventmanager refactor (#7179)
* Drop EventManager from GameDef & do some client cleanups

* EventManager is only used by Client. Don't expose it on Server & GameDef for nothing
* Drop Client::event() in favor of direct calls to getEventManager
* Cleanup some event put from new + put to put(new)
* MtEvent: add Type(u8) enum
* This will enhance event performance & ensure stricter type
* Drop MtEvent::checkIs (unused)

* clang-tidy reported fixes

* Code style

* Move event_manager.h to the client directory as it's only used by client

Add EventManager unittests + switch to unordered_map as order is not important here

Drop a unused function
2018-03-30 18:32:52 +02:00
nOOb3167 376ed5cd3c Sound: fix static initialization order dependency by not having one (#7168)
Ensure singleton is reset
2018-03-29 21:43:57 +02:00
nOOb3167 43f98eb47c Make sounds stop playing when entering game or mainmenu 2018-03-24 16:05:26 +01:00
Loïc Blot 4fd9715876
Cleanup sound manager class (#7158)
* Cleanup sound manager client

* Use some const refs
* Use auto on iterators
* Drop unused parameters
* Move sound_openal.* to client folder
* Move sound.cpp + OnDemandSoundFetcher to client/ folder + reorganize includes properly
2018-03-24 15:45:25 +01:00
Loic Blot eab652fd52
Fix some gcc 7.3 reported warnings
```
src/client/joystick_controller.h:85:2: warning: duplicate 'virtual' declaration specifier [-Wduplicate-decl-specifier]
        virtual bool isTriggered(const irr::SEvent::SJoystickEvent &ev) const;
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.3.1/../../../../include/c++/7.3.1/ext/new_allocator.h:140:22: warning: destructor called on non-final 'JoystickAxisCmb' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
                destroy(_Up* __p) { __p->~_Up(); }
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.3.1/../../../../include/c++/7.3.1/ext/new_allocator.h:140:22: warning: destructor called on non-final 'JoystickButtonCmb' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
        destroy(_Up* __p) { __p->~_Up(); }
```
2018-03-23 22:12:48 +01:00
nOOb3167 9293d8e271 Global initialization of sound using SoundManagerGlobal (#7063)
* Global initialization of sound using SoundManagerGlobal
2018-03-23 15:31:43 +01:00
Vitaliy 9fcc0c1217 Update mesh collector and move it to a separate file (#6904)
* Update MeshCollector

* Simplify MeshCollector
2018-03-22 20:59:49 +01:00
stujones11 22a891a925
Android build fixes for c++11 2018-03-11 16:56:27 +01:00
Vitaliy cf8d579abc Drop texture file list cache (#6660) 2018-03-10 19:33:37 +01:00
Vitaliy 11928b7af1 Render copyright notice: Fix name spelling (#7042) 2018-02-15 21:19:34 +01:00
Dániel Juhász 3face01a20 Node definition manager refactor (#7016)
* Rename IWritableNodeDefManager to NodeDefManager
* Make INodeDefManager functions const
* Use "const *NodeDefManager" instead of "*INodeDefManager"
* Remove unused INodeDefManager class
* Merge NodeDefManager and CNodeDefManager
* Document NodeDefManager
2018-02-10 21:04:16 +01:00
ThomasMonroe314 501f936b37 Switch F3 to use 'enable_fog' setting 2018-02-08 15:40:16 +01:00
stujones11 e87b410a33 Include alpha channel reference in MaterialTypeParam 2018-02-08 15:38:49 +01:00
red-001 4f688d5616 Fix issues with earlier CSM HUD commit (#6940)
The CSM HUD PR caused some strange behavior including aborts due to parts of it using some slightly hacky code, the event refactor changing how events are processed and a minor oversight.
2018-01-26 16:05:47 +01:00
Loic Blot 99c9e7a986 Game refactor [4/X]: keycache is now owned by InputHandler
* Make InputHandler own the key cache
* Add a helper function InputHandler::cancelPressed to avoid multiple similar calls in game.cpp
* Move RandomInputHandler::step definition into cpp file
2018-01-20 16:38:38 +01:00
Loic Blot f5a006dce7 Game refactor [3/X]: Move keycache to inputhandler 2018-01-20 16:38:38 +01:00
Loic Blot 362323cdc2 Game/Input refactor [1/X]: make RealInputHandler handle joystick inputs with standard input
Joystick input is a RealInputHandler only usage, make it intelligent and handle the joystick with keyboard direct.
This permits to remove many getters in game which should be owned by RealInputHandler
2018-01-20 16:38:38 +01:00
red-001 9649e47214 [CSM] Add basic HUD manipulation. (#6067)
* [CSM] Add basic HUD manipulation.

Workaround for on_connect not working right now.
2018-01-20 14:09:58 +01:00
Muhammad Rifqi Priyo Susanto 792752997c Add confirmation on new player registration (#6849)
* Attempt to add registration confirmation

Using SRP auth mechanism, if server sent AUTH_MECHANISM_FIRST_SRP that means the player isn't exist.
Also tell player about the server and chosen username.
Local game has localhost as IP address of the server.
Add RenderingEngine::draw_menu_scene() to draw GUI and clouds background.
aborted -> connection_aborted

* Rewrite information message text

Client::promptConfirmRegister() -> Client::promptConfirmRegistration()
2018-01-13 12:07:16 +01:00
Loic Blot 9146c6a50f Don't recalculate statustext initial color everytime & review fixes 2018-01-05 20:59:30 +01:00
Loic Blot f40f4143df GameUI refactor (part 7/7): Finish to include profiler things to GameUI
Other changes:
* Add GameUI clarification comment
* Move force_fog_off & disable_camera_update flags from GameUI to Game, it's not UI related
* Properly init GameUI::Flags
* Move toggleChat toggleHud & toggleProfiler to GameUI
* Add gameui.cpp to LINT whitelist
2018-01-05 20:59:30 +01:00
Loic Blot 02f82eca0b GameUI refactor (part 6/X): Move Game::guitext_profiler & showStatusTextSimple to GameUI class
Other enhancements:
* Move showStatusTextSimple to GameUI class & rename to showTranslatedStatusText
2018-01-05 20:59:30 +01:00
Loic Blot 326b0faa5e GameUI refactor (part 5/X): Move Game::guitext_chat to GameUI class
Other enhancements:
* Move update_profiler_gui to Game class
* Move updateChat to Game class
2018-01-05 20:59:30 +01:00
Loic Blot fe510d90c1 GameUI refactor (part 4/X): Move Game::guitext_status, Game::m_statustext, GameRunData::statustext_time to GameUI class
Other enhancements:
* Simplify setStatusText to showStatusText, as it shows the label too (preventing almost every setStatusText to call setStatusTextTime(0)
* Add unittests
2018-01-05 20:59:30 +01:00
Loic Blot aab3b18e4b GameUI refactor (part 3/X): Move Game::guitext2, Game::guitext_info, Game::infotext to GameUI class
Other enhancements:
* Drop unused GameRunData::time_of_day
* Little GameUI::update code path optimizations
2018-01-05 20:59:30 +01:00
Loic Blot 3a772e7ed6 GameUI refactor (part 2/X): Move Game::guitext to GameUI + enhancements on StaticText
Other enhancements:
* C++ friendlyness for addStaticText() -> move to static StaticText::add()
2018-01-05 20:59:30 +01:00
Loic Blot 0ebaed430a GameUI refactor (part 1/X): GameUI object creation + GameUIFlags move to GameUI
Game class is too huge and has too specialization on various subjects, like UI, formspecs, client, renderer. Start to move UI related things to GameUI object and cleanup them

Other improvements:
* updateChat: more performance on error messages by remove string copies
* Initialize all game class members in definition instead of constructor (with nullptr instead of NULL)
* Drop unused Client::show{GameChat,GameHud,Profiler,GameFog}
* Add GameUI unittests
2018-01-05 20:59:30 +01:00
number Zero 05d93c7fa1 Load files from subfolders in texturepacks
Updated and rebased version of a PR by red-001
2017-11-17 19:23:08 +00:00
Vitaliy 20a85d76d9 Move files to subdirectories (#6599)
* Move files around
2017-11-08 23:56:20 +01:00
paramat 179476d833 LINT: Add files to whitelist, fix detected indent errors 2017-11-06 12:54:08 +00:00
Lars Hofhansl 6be6fb78a4 Do not scale texture unless necessary.
This avoids scaling textures to 'texture_min_size' unless it is actually
required (because either auto-scaling or bi/trilinear filtering is enabled)
2017-11-04 18:05:55 -07:00
Vitaliy 28841961ba Rewrite rendering engine (#6253)
* Clean draw_*() arguments

* Split rendering core

* Add anaglyph 3D

* Interlaced 3D

* Drop obsolete methods
2017-10-31 19:27:10 +01:00