Commit Graph

583 Commits

Author SHA1 Message Date
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
rubenwardy
0bcc2f33eb Add check to pause game on lost window focus 2017-12-26 21:53:45 +00:00
paramat
f1d2bc0965 Zoom: Add 'disabled by game or mod' message 2017-12-14 20:59:54 +00:00
paramat
8a99c8c94a Minimap messages: Improve 'disabled by server' message 2017-12-14 20:59:54 +00:00
Loïc Blot
308bb69eef
CSM fixes: load mods after flavours & add flavour to block mod loading (#6738)
* CSM fixes: load mods after flavours & add flavour to block mod loading

* Don't permit to load mods twice

* Prepare builtin integrity global algorithm

* Add missing doc & use a nicer byteflag for LOAD_CLIENT_MODS flavour

* flag typo fix

* Invert CSM_FL_LOOKUP_NODES & CSM_FL_LOAD_CLIENT_MODS ids
2017-12-11 17:33:44 +01:00
ThomasMonroe314
419799b831 F5 debug info: Add colons, use lowercase except for FPS and RTT 2017-12-10 14:24:28 +00:00
paramat
ea1ae07beb F5 Debug info: More compact, return to 2 lines
All data fits on width 960, most useful data still visible on width 800.
2017-11-27 01:28:47 +00:00
Vitaliy
20a85d76d9 Move files to subdirectories (#6599)
* Move files around
2017-11-08 23:56:20 +01: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
raymoo
a637107a4e Allow overriding tool capabilities through itemstack metadata
This makes it possible to modify the tool capabilities of individual
itemstacks by calling a method on itemstack metadata references.
2017-10-29 11:57:38 +00:00
Esteban I. RM
792e013eaf
don't pass g_settings around, and use it directly 2017-10-17 19:22:09 +02:00
Esteban I. RM
0e8ee84d74
Implement #6096 2017-10-17 19:21:32 +02:00
Vincent Glize
4e19791cde [CSM] Add callback on open inventory (#5793) 2017-10-02 22:09:49 +02:00
Loïc Blot
9fa78b7387 game.cpp: remove dead code for proto v25 compat (#6481)
Protocol v25 is not supported anymore
2017-09-30 16:41:18 +02:00
Loïc Blot
2afe62952c Server: affect bind_addr on constructor instead of start() (#6474)
bind_addr is already ready when using constructor as we read is.IPv6 from it, instead pass the whole address
2017-09-28 13:47:30 +02:00
DTA7
9eb163ab4f Add mute setting (toggled by the mute key and in the volume menu) (#6415)
* Add mute setting (toggled by the mute key and in the volume menu)
2017-09-26 08:17:50 +02:00
Auke Kok
5b3fbf9cf7 Implement client node dig prediction
Dig prediction allows clients to remove dug nodes without
waiting for server acknowledgement.
This patch allows mods to override dig prediction,
it can either be turned off or a different "prediction node"
can be selected.
2017-09-11 20:54:20 +02:00
rubenwardy
829bbafb27 Fix incorrect buffer size calculation on creation of HUD status messages
Fixes #6400
2017-09-10 02:53:23 +01:00
SmallJoker
1105a14bcc Particles: Do not add digging particles for airlike nodes (#6392) 2017-09-08 18:39:24 +02:00
Wuzzy
f231112cc4 Make HUD status messages translatable (#5795)
* Make HUD status messages translatable

* Make strings in showStatusTextSimple translatable
2017-09-05 21:57:29 +02:00
Loïc Blot
bd6b90359c Remove DSTACK support (#6346)
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-30 08:09:41 +02:00
Loïc Blot
1b3e4e1736 Formspec: Add options to set background color and opacity (fullscreen mode + default mode) (#5493)
* Formspec: Add options to set background color and opacity (fullscreen mode)

* Enhance previous comment: Set formspec background when regenerate UI.

* This permit to do the calcul only at regen and override it with bgcolor tag
* Add a setting for default background color into formspec, separated from fullscreen
* Add a little performance gain on formspecs using a const ref instead of copying formspec string
2017-08-29 19:25:16 +02:00
Loïc Blot
5f38fe33f8 Clientevent refactor (#6320)
* Refactor clientevent structure

* Move structure outside of client header

* Create client events on heap not stack, this remove the ClientEvent object copy

* Use clientEventHandler to route events
2017-08-28 20:02:23 +02:00
rubenwardy
ad9677a14f Check item_drop amount clientside (#6242) 2017-08-26 08:11:59 +02:00
Ekdohibs
b24e6433df Add clientside translations. 2017-08-24 17:54:10 +02:00
Dániel Juhász
01c319d778 Fix Android node selection distance (#6187) 2017-08-24 08:31:33 +02:00
Ben Deutsch
397a701f98 Safe digging and placing (#6127)
* Setting: Safe digging and placing

* New setting 'safe_dig_and_place' under Controls
* If set, digging and placing will not auto-repeat
* Releasing buttons unblocks the respective action again
* Useful for inexperienced users in creative mode where default
  repeat times may be too short

* Safe placing (right click repetition) does not need a guarding flag

* Added new setting to minetest.conf.example
2017-08-24 08:30:46 +02:00
paramat
7657fe7a50 Minimap: Add new HUD flag for minimap radar mode
Flag default is true to not change default behaviour.
The existing minimap HUD flag remains the master control for minimap.
2017-08-20 23:58:15 +01:00
Loïc Blot
1c1c97cbd1 Modernize source code: last part (#6285)
* Modernize source code: last par

* Use empty when needed
* Use emplace_back instead of push_back when needed
* For range-based loops
* Initializers fixes
* constructors, destructors default
* c++ C stl includes
2017-08-20 13:30:50 +02:00
Loïc Blot
50669cd282 Fix shader.h inclusion place in game.cpp 2017-08-19 22:24:30 +02:00
Loïc Blot
fd3afbced5 Optimize headers (part 2) (#6272)
* Optimize headers (part 2)

* less debug.h in headers
* less remoteplayer.h for everybody

* Cleanup (part 2)

* camera.h: mesh.h
* mapgen.h: mapnode.h
* serverenvironment.h: mapblock.h
* nodedef.h: shader.h
2017-08-18 19:25:07 +02:00
Loic Blot
b204bc4da9
clientmap, clientmedia: code modernization
* 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-08-17 08:26:52 +02:00
Loïc Blot
85511a642f Cleanup various headers to reduce compilation times (#6255)
* Cleanup various headers to reduce compilation times
2017-08-16 22:11:45 +02:00
SmallJoker
4381fe0a0a Trigger on_rightclick regardless on the formspec meta field
Document behaviour for older clients.
2017-08-13 21:37:30 +01:00
Fixer
e44f13aecb Full viewing range key message clarified
To make it sound less confusing to players
2017-08-12 19:37:53 +01:00
Wuzzy
640ba77276 Make direct item selection keys freely bindable 2017-07-30 18:24:45 +01:00
Lars Hofhansl
5045bdc6d8 In-cloud fog: Strengthen effect when small view range is used
Ensure in-cloud fog is always stronger than outside-of-cloud-fog even when
using a small view range.
Also limit in-cloud fog range to a maximum of 32 nodes to keep it fairly
strong when using a large view range.
2017-07-18 22:16:41 +01:00
Paramat
d3d3638f48 Chat: Move chat text down to not overlap 3rd line of debug text (#6145) 2017-07-17 13:53:14 +02:00
Paramat
d4cc49e9a7 F5 debug display: Reformat and remove some information (#6125)
For consistency return to 'FPS =', add comma before FPS.
Remove 'R' from 'range_all' as may be re-keymapped.
Remove inconsistent brackets from 'range_all'.
Change 'v_range' to 'view_range'.
Add 'pos = ' before co-ordinates.
Add spaces around '=' in yaw display.
Remove brackets from around 'yaw' and 'seed'.
Move 'pointing_at' to 3rd line.
Remove 'param1' (0 for all solid nodes and unreadable for light sources due to
light bank encoding).
Remove file name of pointed node top tile (this also removes the need to get
ContentFeatures for the node, slightly improving performance).
Replace quotes around node data with brackets, looks better and more consistent.

Add 'guitext3' for third line.
Use 'setVisible' for all 3 lines to control the setting of each text rectangle.
Improve logic of 3rd line to only run code it needs to depending on whether
pointing data is avaialble and whether node is not 'ignore' and not 'unknown'.
2017-07-16 12:33:09 +02:00
Loïc Blot
7ddf67aa14 Chat protocol rewrite (#5117)
* New TOCLIENT_CHAT_MESSAGE packet

* Rename old packet to TOCLIENT_CHAT_MESSAGE_OLD for compat
* Handle TOCLIENT_CHAT_MESSAGE new structure client side
* Client chat queue should use a specific object
* SendChatMessage: use the right packet depending on protocol version (not complete yet)
* Add chatmessage(type) objects and handle them client side (partially)
* Use ChatMessage instead of std::wstring server side

* Update with timestamp support
2017-07-16 10:47:31 +02:00
Dániel Juhász
3caad3f3c9 Expose getPointedThing to Lua
This commit introduces Raycast, a Lua user object, which can be
used to perform a raycast on the map. The ray is continuable, so one can
also get hidden nodes (for example to see trough glass).
2017-07-07 22:28:23 +01:00
Ben Deutsch
6bedb6de40 Fog effect when camera is inside cloud
Fixes issue #3576

* Clouds now take camera position as 3D, not 2D

* Cloud grid filling extracted to gridFilled method

* Clouds detect whether camera is inside cloud

* Camera in cloud changes fog by overriding sky colors
  with cloud color

* Sun, moon and stars can be temporarily disabled
  with setBodiesVisible

* Disabling fog also disables all "inside cloud" behaviors
2017-07-05 15:39:49 +02:00