Commit Graph

5149 Commits

Author SHA1 Message Date
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 64fe79b53b Game refactor [2/X]: Various moves (profilergraph, nodePlacementPrediction, create_formspec_menu)
* Move profilergraph to dedicated files
* Move nodePlacementPrediction to Game class
* Rename create_formspec_menu to GUIFormSpecMenu::create
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
paramat d45e5da8ca Biomes: Add 'get heat', 'get humidity', 'get biome data' APIs
'get biome data' returns biome id, heat and humidity.
Clean up nearby lines in lua_api.txt.
2018-01-16 08:47:07 +00:00
red-001 4c0d4e4105 Load a texturepack from the 'textures' subfolder of a game 2018-01-16 08:45:17 +00:00
paramat 142474196a Mapgen folder: Update and improve copyright information of files 2018-01-15 04:42:08 +00:00
Muhammad Rifqi Priyo Susanto 670f8afd18 Registration confirmation dialog: Fix grammar
Fixes commit 792752997c.
2018-01-13 19:30:34 +00: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
Lars Hofhansl fad263dec9 Revert "Add an active object step time budget #6721"
This reverts commit 9c669016d1.
See #6907
2018-01-12 23:47:39 -08:00
Loic Blot 6f2fe8a554
Forget to fix non freetype build in StaticText 2018-01-12 08:36:38 +01:00
number Zero b4df0d67dd Fix ambient occlusion and dark lines at mapblock borders 2018-01-12 05:44:11 +00:00
Pedro Gimeno f77f19a941 Fix off-by-one in log output line length (#6896) 2018-01-09 19:07:14 +01:00
Pedro Gimeno 63f4ee21b0 Fix buffer parameter not working in LuaPerlinNoiseMap::l_getMapSlice() 2018-01-08 20:32:15 +00:00
rubenwardy 0a83c42dfd
Fix naming conventions of noise userdata 2018-01-07 01:06:18 +00: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
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
paramat a0c8c05242 PlayerSAO damage: Update to cope with variable player heights
Nearby codestyle cleanup.
2017-11-14 00:38:36 +00:00
Vitaliy 20a85d76d9 Move files to subdirectories (#6599)
* Move files around
2017-11-08 23:56:20 +01:00
sfan5 b692454f70 Add minetest.safe_write_file() to script API 2017-11-08 16:14:05 +01:00
Muhammad Rifqi Priyo Susanto 9526c68699 Fix issue Minetest crash when custom font path is not exist
We try to use default fallback for both mono and main font when custom font path is not exist. This way, if Minetest is not corrupted, we could avoid crash.
2017-11-08 16:14:00 +01:00
paramat 179476d833 LINT: Add files to whitelist, fix detected indent errors 2017-11-06 12:54:08 +00:00
paramat 4c40e0775c Player eye height: Make this a settable player object property 2017-11-06 12:54:00 +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
sfan5 21f3237fe9 httpfetch: Enable gzip support 2017-11-04 22:19:27 +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
Rob Blanckaert 65c5539035 Add sha1 to lua utils. (#6563) 2017-10-30 08:18:18 +01:00
miqlas a95e0d1876 Initial Haiku support (#6568)
* Iitial Haiku support
2017-10-30 08:17:43 +01:00
rubenwardy cd1140f69c Fix day_night_ratio_do_override not being initialised server-side
Causes get_day_night_ratio() to return unpredictable results.
2017-10-29 18:31:53 +00:00
lisacvuk c252ed506e CSM: Add a way to get current locale from CSM 2017-10-29 12:05:16 +00:00
paramat 241fe649f7 Biome API: Add decoration flags for underground decorations
Add "all_floors" and "all_ceilings" flags for simple and schematic
decorations. Decorations are placed on all floor and/or ceiling surfaces.
Decorations are placed before dungeon generation so placement in dungeons
is not possible.

Add 'getSurfaces()' function to mapgen.cpp that returns 2 arrays of y
coordinates for all floor and ceiling surfaces in a specified node column.

Move 'getHeight()' checks into DecoSimple and DecoSchematic. Delete
'getHeight()' functions.
2017-10-29 12:02:55 +00: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
lhofhansl 610ea6f216 Avoid filtering low-res textures for animated meshes (incl. players) (#6562) 2017-10-28 10:33:47 +02:00
Esteban I. Ruiz Moreno 2efccb3536 Add missing? include 2017-10-26 20:35:32 +02:00
Lars Hofhansl 0732bf73a4 Reduce server FOV with forward speed
This causes blocks in front of the player to be rendered sooner and
blocks in the periphal view (that would soon be out of view) a bit later.
Overall this leads to smoother rendering as the player is moving around.
2017-10-25 23:13:06 -07:00
Muhammad Rifqi Priyo Susanto a1e1a19ac3 Improvements/fixes for noise parameter input in advanced settings
Formspec input for each individual noise parameter and flag.
Allow noise flags to be set in advanced settings, previously only settable
in minetest.conf.

Standardise 'group format' for noise parameters set in minetest.conf, as
only these support noise flags. However the older 'single line' format is
still accepted to support existing minetest.conf files.
Therefore auto-generate minetest.conf.example with noise parameters in
'group format'.

Setting 'type' in settingtypes.txt is now either 'noise_params_2D' or
'noise_params_3D', the dimension number is displayed in the advanced
settings edit page.
2017-10-23 01:28:13 +01:00
Lars Hofhansl cdedaac5e2 Set range of blocks to retrieve per roundtrip to 2.
This is a small, partial revert of #6483, which had set this to 1.
2017-10-19 09:47:58 -07:00
Loic Blot f36e323175
directiontables.cpp: fix a warning reported by VS2017 2017-10-17 22:29:15 +02:00
asl97 38b0e26679 Fix inventory drag drop flag (#6416) 2017-10-17 21:50:58 +02:00
Esteban I. RM 5e24ca05fd
Add updated settings_translation_file 2017-10-17 19:22:10 +02: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 93d185ee5d
Regenerate minetest.conf.example and translation file 2017-10-17 19:21:35 +02:00
Esteban I. RM 0e8ee84d74
Implement #6096 2017-10-17 19:21:32 +02:00
SmallJoker 46f7fe91a2 Fix strict_protocol_version_checking functionality after ee9a442 2017-10-16 20:12:48 +02:00
Esteban I. RM 90e7d42375 Don't try to craft a non-existent item 2017-10-16 10:13:45 +02:00
Vitaliy 75320e7e88 Real global textures (#6105)
* Real global textures

* Add world-aligned textures
* Update minimal to support world-aligned tiles
* Update minimal
2017-10-15 09:34:14 +02:00
lhofhansl 6bab695479 Cache server config settings. (#6530)
* Cache server config settings.
2017-10-15 09:32:17 +02:00
Lars Hofhansl b97b9a550f Retrieve a small cone of blocks in the direction of the players velocity.
This helps retrieving the right set of blocks when the player is falling,
traveling on cart, or in general traveling in a direction different from
the view direction.
2017-10-13 20:43:58 -07:00
SmallJoker 6b23cabe51 Formspec: Fallback to 'label' in readonly textarea[]
Guarantees backwards compatibility for this formspec element change
2017-10-13 23:14:39 +02:00
paramat 9a41a3d0f1 Simple decorations: Make 'place_offset_y' usable with simple decorations
Necessary for placing the base cube of 'plantlike_rooted' drawtype in the
seabed instead of on it.
Useful for placing decorations sunk into, or buried in, the ground.
2017-10-10 19:57:28 +01:00
DTA7 2cf9014160 Smooth lighting: Fix light leaking through edge-connected corners
For solid nodes, the lighting at a corner becomes face-dependent, which
means that only the four nodes in face-direction contribute to the
lighting (getSmoothLightSolid).
For special nodes, which use the lighting values at the eight corners of
a node, the lighting is not face-dependent, but certain nodes of the
eight surrounding nodes of a corner (here indices 4, 5, 6 and 7) can be
obstructed.

Ambient occlusion now also occurs for solid nodes, if two, three or four
of the four nodes in face-direction are solid.
2017-10-10 19:53:13 +01:00
Loic Blot 1ff5c20442
Fix warnings introduced by 9b8fa99fe3 2017-10-10 19:30:18 +02:00
Loïc Blot 32ae492657 Thread: fix a crash on Windows due to data race condition on Thread::m_start_finished_mutex (#6515) 2017-10-10 12:27:08 +02:00
Loic Blot 9d295906ef
NetworkPacket::putRawPacket: resize m_data to datasize + memcpy
In some cases NetworkPacket was created using default constructor and m_data is not properly sized.
This fixed out of bounds memory copy
Also use memcpy instead of std::vector affectation to enhance packet creation
2017-10-10 00:47:46 +02:00
paramat 0c9ca27ffc Simple decorations: Add 'param2_max' parameter for random param2
If 'param2_max' is not used, parameter 'param2' works as before for
compatibility.
If 'param2_max' is used, 'param2' and 'param2_max' become the lower
and upper bounds of a per-decoration random param2.
2017-10-09 18:27:17 +01:00
Loïc Blot 17016090e3 Travis: Update clang from 4.0 to 5.0 (#6467)
* Update clang from 4.0 to 5.0
2017-10-09 11:32:06 +02:00
adrido e6e5fa3bf8
Formspec: textarea with scrollbar improvements
Increase scrollrate depending on fontsize

Scroll on mousewheel

Allow scrolling and marking text on non writable textareas

Update lua api about readonly mode

Show scrollbar if text overflows
2017-10-09 08:11:03 +02:00
adelcoding1 9b8fa99fe3
FormSpec : Add an auto vertical scrollbar to the textarea 2017-10-09 08:11:00 +02:00
adrido c830347a57 Replace deprecated WINAPI GetVersionInfoEx (#6496)
* Replace deprecated WINAPI GetVersionInfoEx
2017-10-07 15:13:13 +02:00
Rob Blanckaert 3c93a56e16 Add setting for near plane distance. (#6395)
* Allow setting the near plane

* - Add near_plane limit of 0.5 to prevent x-ray.
- Add more details to near_plane setting.
2017-10-07 15:11:48 +02:00
SmallJoker f547452685 Unkown nodes: Provide position on interact (#6505)
* Unkown nodes: Provide position on interact
2017-10-07 15:11:07 +02:00
Vincent Glize 4e19791cde [CSM] Add callback on open inventory (#5793) 2017-10-02 22:09:49 +02:00
SmallJoker b9fb3cea33 ParticleSpawner::step cleanup and rotation fix (#6486)
* Particles: Move spawner code to a separate fucntion
2017-10-02 20:40:59 +02:00
paramat ee0bfbede1 CAO footstep sounds: Reduce gain to balance volume 2017-10-02 17:54:08 +01:00
paramat e2afcf85ce Stratum ore: Allow use with no noise for simple horizontal strata
If either of the 2 noise parameters are omitted the ore will occur from y_min
to y_max in a simple horizontal stratum. As this does not compute noise
performance improves, and is ideal for placing many layers.

Clean up some nearby ore documentation.
2017-10-01 22:31:44 +01: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
raymoo 8c16f18fdb Fix attached particle spawners far from spawn (#6479)
* Fix attached particle spawners far from spawn

When far from spawn, attached particle spawners
did not spawn particles.
2017-09-30 15:23:51 +02:00
Loïc Blot be10c0893e Make Player::peer_id server-side only and add getters and setters (#6478)
* Make Player::peer_id server-side only and add getters and setters

Player::peer_id has no sense client side, move it to server, make it private and add setter and getter
Also add some PEER_ID_INEXISTENT instead of harcoded 0
2017-09-30 12:00:05 +02:00
SmallJoker f729b5d2bd Localplayer: Fix disable_jump effect and getStandingNodePos()
Leave the old move code untouched.
2017-09-28 20:36:53 +01:00
orwell96 08846cd05c Add static_save property to luaentites to not save them statically. (#5112)
* Add no_static_save property to luaentites to not save them statically.
This allows for temporary objects that would get deleted anyway as soon as they are loaded again without the static saving overhead.

* Use positive meaning for static_save object property

* Invert meaning also for the LUA parameter
Note: getboolfield() does not change &result when field does not exist, so it defaults to the default value in the header file, which is 'true'.

* Extend push_object_properties()
2017-09-28 17:11:51 +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
Loic Blot 27eeb3581f
Fix some forgotten u16 -> session_t in ad7daf7b52 2017-09-27 23:48:12 +02:00
Paramat 0df3671a34 Fix recent commit: std::max -> std::fmax for floats (#6469)
Fixes commit a455297d29
<cmath> header was already present in commit.
2017-09-27 23:03:41 +02:00
Loic Blot 43951cf646
Lint fix 2017-09-27 22:41:50 +02:00
Loïc Blot ad7daf7b52 Add session_t typedef + remove unused functions (#6470)
* Add session_t typedef + remove unused functions

u16 peer_id is used everywhere, to be more consistent and permit some evolutions on this type in the future (i'm working on a PoC), uniformize u16 peer_id to SessionId peer_id
2017-09-27 19:47:36 +02:00
SmallJoker 50b2185ced Update version correctly again (#6462)
* Update version correctly again
Partial revert of PR 6331

* It doesn't update automatically
2017-09-26 20:30:42 +02:00
Loïc Blot 50423d8c72 Update JsonCPP to 1.8.3 (#6466)
* Update JsonCPP to 1.8.3

* Fix deprecated functions

Json::FastWriter, Json::StyledWriter and Json::Reader are marked deprecated since 1.1 and are deprecated in 0.8 but not shown at compilation time.

Use new methods to serialize/deserialize
2017-09-26 20:30:14 +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
Loïc Blot 6f1c907204 Implement mod communication channels (#6351)
Implement network communication for channels

* Implement ModChannel manager server side to route incoming messages from clients to other clients
* Add signal handler switch on client & ModChannelMgr on client to handle channels
* Add Lua API bindings + client packet sending + unittests
* Implement server message sending
* Add callback from received message handler to Lua API using registration method
2017-09-26 00:11:20 +02:00
paramat a455297d29 Positional sound: Limit volume when closer than 1 node
Change OpenAL distance model from AL_INVERSE_DISTANCE to
AL_INVERSE_DISTANCE_CLAMPED to avoid excessive volume when very close
to the sound location, for example MTG doors, and MTG fire sounds which
are combined at an average position and often located in air nodes.

Because AL_REFERENCE_DISTANCE has been reduced to 1 node (the distance
under which gain is clamped), multiply volume by the same factor to keep
sound gains the same as before, since the gain is calculated as:

gain = (AL_REFERENCE_DISTANCE / distance)
2017-09-25 19:09:21 +01:00
sfan5 d5a97e00ea Fix blocks written by vmanip not being marked as modified
This bug can be triggered by e.g. calling minetest.place_schematic()
and stopping the server immediately afterwards.
2017-09-23 17:09:11 +02:00
DTA7 5a3b8e34b3 Set placer to nil instead of a non-functional one in item_OnPlace (#6449)
* Set placer to nil instead of a non-functional one

This requires nil checks in core.rotate_node and core.rotate_and_place.
2017-09-21 21:52:52 +02:00
SmallJoker 67f97f8d32 on_death: Fix callback number of pushed arguments (Fixes #6451) 2017-09-21 19:56:24 +02:00
Loic Blot 080899b0f1
keycode.cpp: use std::unordered_map for keypress cache 2017-09-21 18:47:42 +02:00
jcalve 69f3c424c1 Fix compile error in openbsd (#6430)
Include the header that defines AF_INET and AF_INET6
2017-09-20 23:29:47 +02:00
paramat d8f20d029a Leveled nodebox: Change levels from 1/63rds to 1/64ths
Add missing documentation of leveled nodebox to lua_api.txt, plus
a little cleaning up nearby.
2017-09-18 11:05:39 +01:00
paramat 27144b4716 Biome API: Revert biomes, decos, ores being relative to water level
Feature is unnecessary and would greatly complicate future development,
it would also make 'get biome at pos' extremely complex.
Mgv7: Revert option to repeat surface biomes in floatlands, which
depended on the above.
2017-09-17 05:31:48 +01:00
paramat 76817fdf98 Biome generation: Fix layers of 'filler' nodes at biome y limits
Error was exposed by commit a1389c3865
'nplaced' was not set to U16_MAX when biome 'stone' was placed, so when
biome was recalculated in a column of stone, the 'nplaced' value
caused a few remaining filler nodes to be placed.
Occurs when the lower biome has a deeper depth of 'top' plus 'filler'
than the upper biome.
2017-09-17 03:20:20 +01:00
DTA7 45e9f80811 Correct tooltip_append_itemstring terminology (#6421) 2017-09-16 18:42:17 +02:00
Greg 45a7dd1ec4 Fix addModsFormConfig typo (#6420) 2017-09-16 18:40:19 +02:00
paramat a1389c3865 Generate biomes: Recalculate biome at biome lower limit
Prevents biome nodes passing below the defined y_min of that biome.
2017-09-16 05:14:04 +01:00
DTA7 808ada11db Add setting to display the itemstring after the tooltip in the inventory. (#6413)
* Add setting to display the itemstring after the tooltip in the inventory.
2017-09-15 14:31:32 +02:00
sfan5 04839f233f ServerEnv: Clean up object lifecycle handling (#6414)
* ServerEnv: Clean up object lifecycle handling
2017-09-15 12:19:01 +02:00
SmallJoker edbc533414 Customizeable max breath for players (#6411)
* Customizeable maximal breath for players
2017-09-15 12:18:47 +02:00