Commit Graph

5026 Commits

Author SHA1 Message Date
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
Paramat 549cfd9db8 Biomes: Add vertical biome blend (#6853)
Add 'vertical blend' parameter to biome registration that defines how
many nodes above the biome's 'y max' limit the blend will extend.
2018-01-05 00:10:55 +01:00
you e7b44c3295 Fix Wstringop-overflow warning from util/srp.cpp (#6855)
* Fix Wstringop-overflow warning from util/srp.cpp
2018-01-04 14:25:20 +01:00
red-001 30821ad8de [CSM] Don't load the IO library. (#6087)
* [CSM] Don't load the IO library.

* Rename the function to match the Lua API function name and add a missing `const`

* Add a comment to explain some strange code and fix the other issues pointed out by shadowninja.
2018-01-04 08:21:12 +01:00
rubenwardy 2af47e6f5f Fix crash on can_bypass_userlimit returning non-boolean 2018-01-03 14:18:13 +00:00
paramat 2aad3be2cb Mgv7 floatlands: Add exponent parameter
Allows more control over shape of floatland mountain terrain.
Terrain shape is unchanged.
2018-01-03 04:05:55 +00:00
Thomas--S f3b9d87076 Connected Nodeboxes: Add `disconnected` boxes
The `disconnected_*` boxes are the opposites of the `connect_*` ones,
i.e. when a node has no suitable neighbours on the respective side, the
according disconnected box is drawn.

* disconnected_top
* disconnected_bottom
* disconnected_front
* disconnected_left
* disconnected_back
* disconnected_right
* disconnected (when there is *no* neighbour)
* disconnected_sides (when there are *no* neighbours to the sides)
2018-01-03 04:05:21 +00:00
Hybrid Dog 345e1041a2 Tool.cpp/.h, lua_api/l_util.cpp: Tidy up code and remove dead code 2018-01-03 04:01:15 +00:00
Hybrid Dog d7c1f6c92e Tool getDigParams: Fix selecting the best fitting time
Previously, time was compared with result_time before dividing it by
the level difference.
2018-01-03 03:58:11 +00:00
Loïc Blot 0d6b58a772
Add unittests on ActiveObject and BanManager class (#6866)
* Add unittests on ActiveObject and BanManager class

This also permit to fix a bug in ban manager setting bans modified when no modification occurs
2018-01-01 18:48:52 +01:00
rubenwardy 026ad912af Fix rounding error in g/set_node caused by truncation to float 2017-12-26 21:55:08 +00:00
rubenwardy 0bcc2f33eb Add check to pause game on lost window focus 2017-12-26 21:53:45 +00:00
Dániel Juhász 2153965cf9 Line_of_sight: Improve using VoxelLineIterator
This commit rewrites line_of_sight with VoxelLineIterator.
Stepsize is no longer needed, the results will be always accurate.
2017-12-26 21:51:32 +00:00
number Zero 189daf87a0 Fix dancing text 2017-12-25 15:00:50 +01:00
Rob Blanckaert 787cd15c14 - Clear colors when reading property info.
- Set vertex colors on upright_sprites.
2017-12-25 15:00:25 +01:00
nOOb3167 7354d0f3d8 Fix undefined behaviour on getting pointer to data in empty vector
`&vector[0]` is undefined if vector.empty(), causing build failure on MSVC
2017-12-22 10:39:25 +00:00
Vitaliy 257626ceed Fix wrong scrolling (#6809) 2017-12-21 20:58:06 +01:00
Jordan Irwin 18b921015a Allow 'default' parameter in 'settings:get_bool' function
Default value is used when the setting key is not found in the config
file. If default value is not set, 'nil' is returned.

#6188
2017-12-17 15:27:37 +00:00
Ezhh 26c7e98e3d Adjust default console height
#6797
2017-12-17 04:38:54 +00:00
Vitaliy 770eb09adc Fix items turning black (#6780) 2017-12-16 17:01:37 +01: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
SmallJoker 6e5109fd46
Chat: Remove prompt history duplicates (#6762) 2017-12-14 19:47:29 +01:00
adrido 551c12391a directiontables: Fix MSVC compiler error (#6785) 2017-12-14 19:46:42 +01:00
Vitaliy 2d9f0d344e Update light decoding table size (#6696)
Fix old undiminish_light bug
2017-12-12 19:29:55 +01: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
SmallJoker 03caa1e319 Damage: Remove damage ignore timer 2017-12-10 14:23:45 +00:00
adrido d677f292cc Use std::vector instead of dynamic C-Array (#6744) 2017-12-10 09:07:24 +01:00
Lars Hofhansl 9c669016d1 Add an active object step time budget #6721
This can be set via the active_object_interval option.
2017-12-06 12:21:54 -08:00
you e049405fdc Add coloured logs (#4549)
The setting log_colour can be used to en-/disable or autodetect it.
2017-12-06 18:50:39 +01:00
Luis Cáceres 2b5341c518 Ensure no item stack is being held before crafting (#4779) 2017-12-06 17:32:05 +01:00
Lars Hofhansl fd9f195fcc Use Irrlicht's mesh cache for animated meshes.
Fixes #6676.
Allow animated meshes to be cached in Irrlicht's builtin mesh cache.
Use Material.EmmissiveColor instead of manipulating the mesh' vertex colors.
2017-12-04 22:29:11 -08:00
paramat f470cb7270 Zoom: Set zoom FOV per-player using a player object property
Remove player object property 'can zoom'.
Add player object property 'zoom fov'.
Remove clientside setting for 'zoom fov'.
Object property default is 15 degrees in creative mode, zoom disabled
in survival mode.

Needed due to zoom now loading and/or generating distant world
according to zoom FOV.

Update object properties serialisation version to 3.
2017-12-04 02:25:10 +00:00
Lars Hofhansl 5a03b1f5f9 Optionally extend the active object in a players camera direction.
See #6667

By setting active_object_send_range_blocks > active_block_range a server admin
can allow clients to retrieve active objects futher out from the player at
relatively low cost to the server
(only objects in the players' view cone are considered).
2017-12-03 17:52:05 -08:00
raymoo 83b12ed481 Shut down mapgen threads before other shutdown tasks (#6689)
Solves some issues with ModStorage functionality in mapgen threads
that occurred when mapgen threads continued to run after the main
server thread had stopped. Also shuts down mapgen threads before
shutdown callbacks are called.
2017-12-03 10:28:35 +01:00
SmallJoker 089f594582 CAO/SAO: Nicer velocity-controlled, interpolated rotation property:
'automatic_face_movement_max_rotation_per_sec'.
Rotate towards the smaller angle.
2017-12-01 05:36:49 +00:00
Lars Hofhansl f4fedfed07 Turn off verbose info message introduced accidentally with ae9b1aa 2017-11-29 22:55:37 -08: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
sfan5 813d819d15 Hint at problematic code when logging deprecated calls 2017-11-27 01:28:39 +00:00
paramat 03c11a73d8 Light curve: Add and tune mid boost gaussian
Create a closer match to the light curve of 0.4.16 stable.
Results in darker shadows while maintaining the 'brightness' and light
spread.
2017-11-27 01:28:29 +00:00
SmallJoker 990d0b0264 Inventory: Restrict access from too far away 2017-11-24 05:39:47 +00:00
paramat 912ba1e47f Clearobjects: Send progress messages to terminal using actionstream
Change default mode to 'quick' as 'full' can lock up a server for a
long time.
2017-11-24 05:38:53 +00:00
paramat 4b553ece09 Stratum ore: Add option for a constant thickness stratum
Add a 'stratum thickness' integer parameter, as an alternative
to providing a 2nd noise parameter for thickness variation.
2017-11-19 00:25:39 +00:00
shivajiva101 3f8e2e8c38 Fix mousewheel behaviour in textarea (#6641)
Allowing scrolling with the mousewheel when the vertical scrollbar is
hidden, unnecessarily exposes oversized containers and newlines at the
end of the text. For example try scrolling over the textareas in the
pause menu. This PR addresses the issue by requiring the scrollbar to be
visible before allowing the scrolling with the mousewheel.
2017-11-18 14:58:08 +01:00
Vitaliy 0780ee51c5 Fix dark liquids (#6621)
* Update light storage format
2017-11-18 10:57:22 +01:00
paramat ec93893c7f Biome dust node: Only place on 'walkable' cubic non-liquid drawtypes
No longer decide placement on 'buildable_to' parameter.
Dust nodes only look acceptable placed on cubic nodes.
Modders may not want to make their plantlike decorations 'buildable_to'.
2017-11-17 19:27:06 +00: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
Lars Hofhansl ae9b1aa177 Allow zoom to actually show more data.
This allows the client to retrieve blocks at a greater distance
from the server, thus allowing for a real zoom.
2017-11-15 22:03:58 -08:00
Vitaliy ee6bb5a315 Fix item and wield meshes (#6596) 2017-11-14 19:23:34 +01:00