Commit Graph

4632 Commits

Author SHA1 Message Date
Loïc Blot
c6d5441105 Properly remove SAO when worldedges are overtaken (#5889)
* LuaEntitySAO: Remove beyond outermost mapchunk edges

Based on a commit by, and with help from, nerzhul.
Add 2 functions to class Mapgen:
A function to calculate actual mapgen edges, called from the Mapgen constructor.
A function called indirectly from content_sao.cpp per entity step to check SAO
position is within mapgen edges.

* Calculate borders from params not mapgen, which is not available everytime
2017-06-03 19:57:02 +02:00
SmallJoker
7a2b9df970 Tooltips: Unify the tooltip[] and list[] description tooltip display functions (#5848)
* Tooltips: Unify the tooltip[] and list[] description tooltip display functions
2017-06-03 08:55:26 +02:00
Dániel Juhász
001de6ffba Do not shade inventory items with textures (#5869)
This commit restores the old behavior: if an inventory item has an own
inventory texture, it will not be shaded.
2017-06-01 23:18:55 +02:00
Loïc Blot
1c69476d9f Show singlenode mapgen to menu (#5868)
Fix #5867
2017-06-01 23:18:24 +02:00
red-001
a7787bb9d2 Fix dropdown menu selection (#5847)
This fixes a bug that occurred when the selection list of a drop down menu was changed but the name was still the same.
2017-06-01 08:00:26 +02:00
red-001
6444963fb1 Nametag: remove colour codes before calculating alignment. (#5862) 2017-05-31 20:07:33 +02:00
stujones11
1681a009bc Don't add damage flash while punch texture modifier is active (#5767) 2017-05-29 23:26:25 +02:00
Loïc Blot
ef152428ef guiVolumeChange: prevent wrong value position by using 1 label instead of 2 (#5839)
* Use only one label instead of two for the soundText, this permit to ensure both label & values are aligned
* Add '%' character too, to reflect it's a percentage volume
* Remove rect on regenerateGui (upper part) which shadows outer part and which is not needed outside of the DesiredRect affectation

Fix issue #5837
2017-05-28 15:23:30 +02:00
paramat
210a339dce Mapgen files: Update and correct copyright credits 2017-05-26 20:46:03 +01:00
SmallJoker
d99b6fed55 Time: Change old u32 timestamps to 64-bit (#5818)
MacOSX build fix + cleanups
2017-05-26 14:03:36 +02:00
Loïc Blot
4d5ce8478c Enhance ABM performance a little bit by removing two std::set copy (#5815)
* Enhance ABM performance a little bit by removing two std::set copy

* ActiveBlockModifier::getTriggerContents now returns a const ref
* ActiveBlockModifier::getRequiredNeighbors now returns a const ref
* ActiveBlockModifier::getRequiredNeighbors is now purely virtual

* Little code style fix
2017-05-25 16:43:55 +02:00
Paramat
5b338638e0 Mgv6 mudflow: Remove decoration if 'dirt with grass' below flows away (#5798)
Mudflow of a neighbouring mapchunk extends into a mapchunk's edge, and could
remove 'dirt with grass' from under a decoration, creating unsupported
decorations.

Remove any decoration above if a 'dirt with grass' node is removed by mudflow.
2017-05-25 12:46:34 +02:00
red-001
2f291e6685 Close formspec on client shutdown. (#5811)
This ensures the shutting down progress bar is correctly rendered. This fixes #3050.
2017-05-25 12:46:24 +02:00
Loïc Blot
099624a513 Revert 1469424 and fix wrong char position when doing mouse selection on intlGUIEditBox (#5806)
* Revert 1469424075 and fix wrong char position when doing mouse selection on intlGUIEditBox

position should look at current line not the whole text and shift 1 character on the last line (due to \0 string delimiter)

* Finish the fix and prevent values under zero for getCursorPos which crash the program if found

* Forget to remove old comment

* fix zero to NULL

* Fix typo
2017-05-24 08:56:40 +02:00
Loic Blot
c445a3d958
Fix wrong return value in get_sky Lua call since ad9fcf859e
Fix #5803
2017-05-23 19:59:47 +02:00
Paramat
9ff5302c8b Client crashfix: load meta after digging (#5801)
Fixes a crash caused in MTGame by breaking and right-clicking a chest.

If loading meta, digging, node can disappear and we looked at meta, which is wrong because meta became NULL.

Pointer is invalidated and we read wrong memory area
2017-05-23 19:54:37 +02:00
Loic Blot
05309229b8
LINT fix & check all files with clang-format
Seems the diff mode doesn't work well, PR are detected as working whereas in master it's shown it's problematic (and really problematic). Use same check everywhere
2017-05-22 07:28:35 +02:00
Pierre-Adrien Langrognet
39f4a2f607 [CSM] Add send_chat_message and run_server_chatcommand API functions (#5747)
* [CSM] Add send_chat_message and run_server_chatcommand API functions

* Add client-side chat message rate limiting

* Limit out chat queue size

* [CSM] Add minetest.clear_out_chat_queue API function and .clear_chat_queue chatcommand

* Last fixes/cleanups before merge
2017-05-21 23:06:51 +02:00
Loic Blot
de840fe271
Fix LINT broken by dfa0c15ce0 2017-05-21 17:30:00 +02:00
bigfoot547
dfa0c15ce0 [CSM] Add function to get the definition of items (#5732)
Add node def and item def documentation.

Please be ready for merge!
2017-05-21 14:40:55 +02:00
red-001
ae483f1bd0 Prevent fall damage from overflowing when falling from a large height. (#5791) 2017-05-21 11:18:38 +02:00
Loïc Blot
90808a4f34 Real control fix (#5787)
* Allow enabling and disabling mods.

* Re-fix 605599b6f1

This breaks some chars like € in chat.

Instead verify is char is a non control char -> iswcntrl
2017-05-20 22:29:15 +02:00
you
358074b296 Fix instant digging (#5785)
Use runData.dig_time_complete instead of params.time to find out whether it's instant digging.
runData.dig_time_complete is set to something very big if the node can't be dug, whereas param.time is 0 when digging is impossible or it's instant digging. So not using param.time fixes #5728.
2017-05-20 20:43:13 +02:00
Loic Blot
a2bb776ea8
Fix wchar_t type on 605599b6f1
event.KeyInput.Char is a wchar_t, iswprint should be used
2017-05-20 20:13:29 +02:00
Paramat
60baf8120c Particle spawner: Do not spawn particles distant from player (#5766)
Previously, every particle was rendered by (even if not actually visible to)
the client regardless of distance. This significantly reduced client FPS.

Acts clientside, particle spawners are always sent to clients, but each
particle is checked for distance from the player.
As with 'add particle' the distance limit is set to 'max block send distance'
as this determines how far a client can see.
2017-05-20 16:46:35 +02:00
SmallJoker
af2f02552f [CSM] Correct the log destination of print() (#5784) 2017-05-20 16:46:12 +02:00
red-001
772944daf6 Fix CSM crash (#5779)
Caused by dc5bc6c and them made worse by 5ebf8f9
2017-05-20 16:45:49 +02:00
Loïc Blot
8797a0aa4b chat.cpp fix wchar_t isspace -> iswspace & wrong isspace on an index (#5783) 2017-05-20 12:56:02 +02:00
numberZero
7779bac3a5 Cleanup in content_mapblock (#5746)
NDT_LIQUID is being drawn by MapBlockMesh since a long time ago...
2017-05-20 12:29:54 +02:00
red-001
1ff5ee0b69 Improve password change menu (#5757)
- Fix the GUI getting messed up when resizing
- Save the input when resizing
2017-05-20 12:29:44 +02:00
Craig Davison
605599b6f1 Fix shift key producing space in console (#5777)
* Fix shift key producing space in console
2017-05-20 12:29:31 +02:00
red-001
00972d42d7 this might fix #5661, needs testing (#5775) 2017-05-20 10:48:44 +02:00
Loic Blot
1469424075
Fix input regression introduced by a4a377ecad
Fix #5776
2017-05-20 10:12:54 +02:00
Zeno-
d176dabeb4 Fix mem leak in mesh cache (#5781) 2017-05-20 08:16:16 +02:00
Loïc Blot
ce9802266e Various code cleanup & little performance improvement on HTTP download (#5772)
* Disable or remove unused enum members/functions
* Tiny code style fixes
* Make some functions const
* Replace ClientMediaDownloader std::unordered_map with std::map
2017-05-20 08:15:56 +02:00
you
35267406aa Do not create dummy normalmaps (#4180)
fixes #1811
2017-05-19 08:08:12 +02:00
you
a4a377ecad Fix textarea bug: clicking right of the end of a line caused the cursor to be in one of the next lines (#3474) 2017-05-19 07:57:21 +02:00
Dániel Juhász
75c393c915 Fix alpha for liquid nodes (#5494) 2017-05-19 07:46:10 +02:00
SmallJoker
674400523e Mainmenu: Fix issues while trying to enable all mods (#5770) 2017-05-19 07:45:47 +02:00
Loïc Blot
e25a38e3fb When minimap is disabled in configuration, really disable it (#5771)
* When minimap is disabled in configuration, really disable it
2017-05-19 07:25:27 +02:00
Loic Blot
1c6d2f596d
Fix a warning pointed by GCC 7.1
lua_tonumber overflow in snprintf (12 bytes and only 10 can be written)
2017-05-18 20:55:27 +02:00
Paramat
0443620c5e Particles: Do not send single particles to distant clients (#5760)
Previously, every individual particle on a server is sent to, and rendered by
(even if not actually visible), every client regardless of distance. This
significantly reduces client FPS and creates unnecessary network traffic.
Maximum distance is set by 'max block send distance' as this determines how far
a client is able to see.
2017-05-17 10:37:28 +02:00
paramat
fd32005b0f Caverns: Remove unnecessary liquid excavation
Also disable CavesRandomWalk at a safer distance from caverns.

Excavating liquids in cavern code is unnecessary as in practice we are already
successfully disabling the generation of liquid caves that could intersect
with caverns and cause excessive amounts of spreading liquids in caverns.

However to be safer this commit now disables liquid caves at a larger distance
from caverns, to compensate for liquid caves being able to generate up to a
mapblock beyond a mapchunk border.

Not excavating liquids in cavern code also allows a feature i am working on in
experimental new core mapgens, but also allows for more flexibility in future.
2017-05-16 21:56:51 +01:00
Loic Blot
582ee15d8e
Fix a memleak pointed by @Zeno- in MeshUpdateQueue
This leak was introduced when added cache to MeshUpdateQueue and only occurs when leaving world.
2017-05-16 08:27:18 +02:00
Zeno-
1bf9b25fb4 Fix uninitalised variable in event.cpp (#5764) 2017-05-15 20:10:29 +10:00
ezhh
018217f6b2 Add option to use neither node highlighting nor outlining 2017-05-15 19:51:40 +10:00
SmallJoker
febd07fc0d No cursor lock when window inactive (#5754) 2017-05-13 17:42:42 +02:00
Loïc Blot
6673aff685 Limit properly the sound setting at updateSound runtime step (#5753)
* Limit properly the sound setting at updateSound runtime step

Fix #5026

* Add a comment
2017-05-13 12:03:11 +02:00
Loïc Blot
9b8ca3a746 Move KeyList & InputHandler from game.h to client/inputhandler.h (#5752)
* Move KeyList & InputHandler from game.h to client/inputhandler.h

We have a header for inputs, move inputhandler class & related keylist object to it

Also introduce a cpp file for MyEventReceiver::OnEvent function in inputhandler.h because a so huge function doesn't needs to be inlined

* Pass clang-format on inputhandler.{cpp,h} (compatible)
2017-05-13 11:05:16 +02:00
Loic Blot
5cb7f6a9b7
Android build fix 2017-05-13 09:10:43 +02:00