Commit Graph

1216 Commits

Author SHA1 Message Date
David Heidelberg
eb52a149a0
Enable IPO/LTO by default except for debug builds (#14198)
Test case:

```
$ cmake . -DRUN_IN_PLACE=TRUE -DCMAKE_BUILD_TYPE=Release -DBUILD_SERVER=TRUE -DENABLE_TOUCH=FALSE

         minetest minetestserver
W/o LTO:      13M           7.3M
W/  LTO:      11M           5.9M
difference:   15%            19%
```

Also fixes various compiler warnings resulting from compilation using LTO.

---------

Signed-off-by: David Heidelberg <david@ixit.cz>
2024-02-09 00:01:12 +01:00
cx384
adaa4cc2f3
Move hard coded minimap to builtin (#14071) 2024-02-07 20:13:23 +01:00
grorp
f2b99332d9
Add Lua API function to resolve node/collision/selection boxes (#13964) 2024-02-06 20:45:16 +01:00
SmallJoker
e7dbd325d2
RemotePlayer: make peer ID always reflect the validity of PlayerSAO (#14317)
Upon disconnect, RemotePlayer still had a peer ID assigned even though
the PlayerSAO object was maked as gone (for removal). This commit makes
that the following always holds true:

	(!sao || sao->isGone()) === (peer_id == PEER_ID_INEXISTENT)
2024-02-02 22:13:24 +01:00
techno-sam
176e674a51
Add wear bar color API (#13328)
---------

Co-authored-by: Muhammad Rifqi Priyo Susanto <muhammadrifqipriyosusanto@gmail.com>
Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
Co-authored-by: grorp <gregor.parzefall@posteo.de>
2024-02-02 21:21:00 +01:00
sfan5
5dbc1d4c08 Move some files to src/server/ 2024-01-27 10:33:32 +01:00
sfan5
9e3a11534f
Allow fog color to be overriden properly (#14296) 2024-01-23 22:33:33 +01:00
cx384
5958714309
Tool specific pointing and blocking pointable type (#13992) 2024-01-22 18:27:08 +01:00
Lars Mueller
fb461d21a5 Fix waypoint precision wraparound, add bounds check 2024-01-21 21:00:09 +01:00
grorp
404a063fdf
Touchscreen: Allow mods to swap the meaning of short and long taps (punch with single tap) (#14087)
This works through a new field "touch_interaction" in item definitions.
The two most important use cases are:
 - Punching players/entities with short tap instead of long tap (enabled by default)
 - Making items usable that require holding the place button (e.g. bows and shields in MC-like games)
2024-01-21 17:44:08 +01:00
cx384
2ea8d9ca11
Fix out of range enum casts in deSerialize functions (#14090) 2024-01-17 20:05:46 +01:00
Wuzzy
08ee6d8d4b
Add rotation support for wallmounted nodes in 'ceiling' or 'floor' mode (#11073) 2024-01-17 17:47:06 +01:00
sfence
ceaa7e2fb0
Add API for restoring PseudoRandom and PcgRandom state (#14123) 2024-01-16 23:20:52 +01:00
cx384
92c55c27cf
Add function to get all HUD elements (#14042) 2024-01-14 17:46:29 +01:00
sfan5
1ba26d67bd Remove excessive includes from porting.h 2024-01-14 13:17:53 +01:00
sfan5
e824e9023f Simplify LuaPseudoRandom::l_next and fix docs
Also extends the allowed range on the C++ side. This has no side-effects.
2024-01-14 13:17:53 +01:00
sfan5
d20f1182f2 Fix Lua PseudoRandom seeds being mangled
closes #14237
2024-01-14 13:17:53 +01:00
sfence
d0753dddb1
Method add_pos for object/player (#14126) 2024-01-01 22:48:56 +01:00
cx384
467d3a8c62
Rename hud_elem_type to type (#14065) 2023-12-29 21:51:02 +01:00
sfan5
5405a558fd Fix minor issue with log_deprecated() 2023-12-25 19:47:34 +01:00
sfan5
961652c2e9 Address some clang-tidy warnings 2023-12-25 10:07:28 +01:00
Lars
e0d4a9d575 Make volumetric light effect strength server controllable
- Make volumetric light effect strength server controllable
- Separate volumetric and bloom shader pipeline
- Require bloom to be enable, scale godrays with bloom
2023-12-21 16:21:01 -08:00
Lars Müller
cad8e895f2
Fix set_bone_position regression (error on passing none) 2023-12-21 18:55:12 +01:00
Lars Müller
0d61598d8a
Extend bone override capabilities (#12388) 2023-12-20 21:21:53 +01:00
grorp
91ba02449b
Add touch_controls boolean to get_player_window_information() (#14092) 2023-12-17 20:47:07 +01:00
Gary Miguel
da832a295e
Delete clang-format files and comments (#14079) 2023-12-15 10:23:44 +01:00
Desour
585e6aa80b Clamp values in read_ARGB8 2023-11-19 20:45:18 +01:00
rubenwardy
4ee32c5441
Add package update detection on Content tab (#13807) 2023-10-28 17:33:44 +01:00
SmallJoker
2fbf5f4250
CSM: Fix duplicate player names (#13910) 2023-10-22 15:31:29 +02:00
DS
11ec75c2ad
ActiveObjectMgr fixes (#13560) 2023-10-09 17:13:04 +02:00
Gregor Parzefall
33cc29bbda
Allow setting custom third person front view camera offset (#13686)
Co-authored-by: Muhammad Rifqi Priyo Susanto <muhammadrifqipriyosusanto@gmail.com>
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
2023-10-02 13:44:03 +02:00
sfan5
c3114132d3
Improve readability and infos in verbose log (#13828) 2023-09-22 18:41:10 +02:00
Wuzzy
8ebaf753d3
New physics overrides (#11465) 2023-09-15 20:10:08 +02:00
sfan5
033128d8dc Show better description to users when std::bad_alloc happens 2023-09-13 13:58:59 +02:00
SmallJoker
4ef93fe25f
Allow place_param2 = 0 node placement predictions (#13787)
The placement prediction value 0 was accidentally ignored
and made the clients fall back to automatic rotation based
on the node paramtype2 value.

This now changes the internal representation to properly
indicate the disabled state (e.g. 'nil' in Lua).
2023-09-13 13:57:57 +02:00
Desour
2ad4c9e0ce Fix -Wunused-but-set-variable warnings 2023-09-09 18:48:56 +02:00
Gregor Parzefall
aea9242a96
Allow nodes to have their post_effect_color affected by lighting (#13637)
Co-authored-by: DS <ds.desour@proton.me>
2023-08-24 20:16:36 +02:00
sfan5
2c987b66c1 Move implementations of some LuaVoxelManip functions to l_mapgen 2023-08-14 18:16:36 +02:00
sfan5
f9c881eb5a Add two missing classes to async environment 2023-08-14 18:16:36 +02:00
rubenwardy
c6a0ead72d
Add warning for initial properties directly inside definition (#9650) 2023-08-13 00:19:03 +01:00
OgelGames
3f2a10bb4b
Fix decode_base64 returning nothing instead of nil (#13697) 2023-07-30 14:53:47 +01:00
DS
f41e9e3e0f
Add Irrlicht device info to the mainmenu About tab (#13636) 2023-07-17 20:44:54 +02:00
Gregor Parzefall
0218963f1b
Fix max_formspec_size not taking gui_scaling into account (#13493) 2023-07-07 21:42:43 +02:00
lhofhansl
0ade097e99
Allow the server to control fog_distance and fog_start via the sky-api (#13448) 2023-06-30 19:11:17 -07:00
numzero
3b74cc4a41 Replace PP with direct printing 2023-06-26 22:51:32 +02:00
sfan5
659828b142 Rename ModApiEnvMod and ModApiItemMod
The 'mod' could have meant module in the past but no other classes do this.
2023-06-23 09:05:26 +02:00
sfan5
610578e3e2 Use swapNode for set_node_level and add_node_level
While this is a behaviour change I don't think the old one made any sense.
It's possible that someone hit this before and wrote a workaround for it,
they won't be affected by this change.
It only makes things work that didn't before.
2023-06-23 09:05:26 +02:00
sfan5
62629939ff Genericize find_node_near and find_node_in implementations in C++ 2023-06-23 09:05:26 +02:00
sfan5
32ff832108 Save Lua globals after mod loading
These are used for the async env currently and will be needed elsewhere soon.
2023-06-23 09:05:26 +02:00
sfan5
524d446757 Minor script api fixes/cleanups 2023-06-23 09:05:26 +02:00
DS
edcbfa31c9
Sound refactor and improvements (#12764) 2023-06-16 20:15:21 +02:00
Desour
5e6d144567 Enable -Wimplicit-fallthrough and use [[fallthrough]] attribute 2023-06-15 10:38:44 +02:00
Desour
e700182f44 Replace Optional with std::optional 2023-06-15 10:38:44 +02:00
Pascal Abresch
ba80d1ce1f Implement check_offset for decorations 2023-06-15 10:36:46 +02:00
Gregor Parzefall
a857c46e6e
Make the settings GUI more usable on Android (#13543) 2023-06-05 12:01:54 +02:00
Desour
d9f478cbfb Remove a misleading MutexAutoLock in l_to_table
The temporary is immediately destructed, so the mutex isn't locked
after the line.
Removed the lock, because the Settings member-functions used by
push_settings_table lock the mutex and are thread-safe, but would
cause a dead-lock.
2023-06-05 12:01:08 +02:00
Thresher
00c647e4cc
Convert spaces to tabs (#13506)
* Convert spaces to tabs

* Desour reviews 1-3 fix

* Desour fixes

* Undo alignment changes
2023-05-26 15:13:57 +02:00
Zughy
d6eb6ff973
Reset player lighting when passing no arguments (#13525)
Co-authored-by: Zughy <4279489-marco_a@users.noreply.gitlab.com>
2023-05-26 13:47:16 +02:00
Zughy
b60d38b7f9
Reset day/night ratio even when passing no arguments (#13524)
* reset day_night_ratio when passing zero fields

* Update lua_api.md

---------

Co-authored-by: Zughy <4279489-marco_a@users.noreply.gitlab.com>
2023-05-26 13:45:42 +02:00
Thresher
180ec92ef9
Remove trailing whitespace (#13505) 2023-05-18 20:34:18 +02:00
Gregor Parzefall
f393214fef
Settings menu improvements regarding default values (#13489)
The reset button now removes the setting from minetest.conf instead of setting it to its default value.
The reset button is now shown whenever a value is present in minetest.conf
Float settings now get a .0 suffix if they have no decimal places.
2023-05-18 20:32:26 +02:00
Buckaroo Banzai
65692ad1b5
Add min/max protocol version to minetest.get_version() (#13482) 2023-05-06 16:16:21 +01:00
Desour
8b73743baa Reduce number of recursively included headers
This should improve compilation speed.

Things changed:
* Prefer forward-declarations in headers.
* Move header-includes out of headers if possible.
* Move some functions definitions out of headers.
* Put some member variables into unique_ptrs (see Client).
2023-04-27 18:50:33 +02:00
rubenwardy
b1786e88ac Use .md extension for markdown files
Linking to line numbers is brittle, linking to sections/headings is better.

If you still want to link to a line number, you can append ?plain=1 to GitHub's URL
2023-04-16 20:23:53 +01:00
Desour
b201c03625 Use smart-ptrs in GUIEngine 2023-04-11 20:06:15 +02:00
Riley Adams
73391013f7
Add node pos to node damage HP change reason (#13196) 2023-04-10 23:04:52 +01:00
sfan5
c26e122485 Move video_driver default selection to runtime 2023-04-08 20:19:35 +02:00
Desour
67068cfaf4 Get rid of wgettext 2023-04-08 20:17:50 +02:00
SmallJoker
9c9309cdbb
Lua API: Catch serialization error for chat messages (#13337)
Prevents server errors caused by too long chat messages from the Lua API.
2023-04-07 12:49:35 +02:00
sfan5
819e9fc615 Do not rely on ZSTD_CLEVEL_DEFAULT define 2023-04-01 22:06:03 +02:00
DS
2180dc14ef
Fix safeLoadFile() skipping 2 chars too much from the shebang (#13310) 2023-03-27 20:01:05 +02:00
x2048
f3b198e490
Return shadow_sky_body_orbit_tilt setting
Used as a default value when the game does not change the value via API (e.g. legacy server)
2023-03-24 12:34:21 +01:00
rubenwardy
39f4d26177
Add minetest.get_player_window_information() (#12367) 2023-02-27 22:58:41 +00:00
sofar
2083252c05
Sky: transmit body_orbit_tilt to client. (#13193)
This obsoletes the current client-side setting entirely. The server can
transmit the tilt to the client directly and will send 0.0f as default
value.

Co-authored-by: x2048 <codeforsmile@gmail.com>
Co-authored-by: sfan5 <sfan5@live.de>
2023-02-26 01:08:33 +01:00
Jude Melton-Houghton
3992a13f24
Improve MetaDataRef:{get,set}_float precision (#13130) 2023-01-12 15:40:34 -05:00
x2048
6d45c243f8
Add dynamic exposure correction (#12959)
* Add uniform for frame delta time
* Adjust exposure in logarithmic (EV) space
* Add network support and LUA API
* Add testing mod
2023-01-06 22:33:25 +01:00
SmallJoker
03e710160f
Lua API: Document shader dependencies of set_lighting() (#13079) 2022-12-26 21:59:55 +01:00
lhofhansl
1e7804aaf6
Allow saturation to be controlled by the server. (#13075) 2022-12-25 16:15:32 -08:00
Jude Melton-Houghton
d13b12b791
Store MapEditEvent blocks in a vector (#13071) 2022-12-24 12:21:59 -05:00
Jude Melton-Houghton
5c248c2d7d Add callback on_mapblocks_changed 2022-12-24 08:24:59 -05:00
Jude Melton-Houghton
7701e70dc9 Make MapEditEvent more complete
SetBlocksNotSent is no longer used.
2022-12-24 08:24:59 -05:00
Jude Melton-Houghton
0fc97a1483
Use a Lua error handler that calls tostring (#11913) 2022-12-15 07:37:49 -05:00
Jude Melton-Houghton
1f3b5e553b
Fix plantlike_rooted world-aligned node base textures (#12994)
Co-authored-by: Wuzzy <Wuzzy@disroot.org>
2022-12-12 08:45:09 -05:00
sfan5
37386b9c3c
Expose dtime_s to LBM handler 2022-12-04 12:35:14 +01:00
Jude Melton-Houghton
b3ffc4b327
Add minetest.get_mapgen_edges (#12999) 2022-12-03 10:40:46 -05:00
Jude Melton-Houghton
d0a118f5b1
Add minetest.get_game_info and allow reading game.conf (#12989)
Co-authored-by: sfan5 <sfan5@live.de>
2022-11-28 07:21:43 -05:00
Jude Melton-Houghton
7c21347a40 Rename "mod metadata" to "mod storage" everywhere 2022-11-24 17:58:25 -05:00
Jude Melton-Houghton
386bfcda2b
Fix reading schematics after their resolution (#12985) 2022-11-23 11:53:21 -05:00
Riceball LEE
6bf662cb9e
set_nametag_attributes: don't reset nametags if text param is not touched
fixes #12901
2022-11-15 16:46:26 +01:00
Jude Melton-Houghton
cd8a7fe472
Add MetaDataRef:get_keys (#12841) 2022-11-15 16:45:12 +01:00
Gregor Parzefall
88b04eadc9
Fix get_tool_wear_after_use for one use (insta-break) (#12945) 2022-11-09 11:58:53 -05:00
Abdou-31
d1b80b462e
Fix typos and en_US/en_GB inconsistency in various files (#12902) 2022-11-09 11:57:19 -05:00
Lars Müller
077627181e
Allow rotating entity selectionboxes (#12379) 2022-10-30 16:53:14 +01:00
Jude Melton-Houghton
dafdb3edb4
Check for falling float nodes in liquid transform (#12862) 2022-10-18 18:03:05 -04:00
Jude Melton-Houghton
b38ffdec27
Implement vector and node conversion in Lua (#12609)
Co-authored-by: sfan5 <sfan5@live.de>
2022-10-18 18:01:44 -04:00
sfan5
87051fca26
Take geographic distance into account for server list ordering (#12790) 2022-10-17 07:56:28 -04:00
Jude Melton-Houghton
cb725a4555 Speed up find_nodes_in_area (#12845) 2022-10-13 09:35:19 -04:00
Jude Melton-Houghton
f7ae70c3d9 Use enum to define custom registry indices 2022-10-13 08:46:16 -04:00
Jude Melton-Houghton
9676364c1f
Optimize lighting calculation (#12797) 2022-10-09 10:50:26 -04:00
fluxionary
440d966b93
add an 'equals' method to ItemStack and compatibility w/ lua '==' (#12771)
Co-authored-by: rubenwardy <rw@rubenwardy.com>
Co-authored-by: sfan5 <sfan5@live.de>
2022-10-09 08:06:09 -04:00