Commit Graph

218 Commits

Author SHA1 Message Date
SmallJoker 98fb381910
Break include chains and tidy (part 2) 2025-11-06 19:31:13 +01:00
Lars Müller 7331156650
Fix interpolating to identity bone overrides (#16609)
The previous code immediately dropped identity overrides, even if there still was an interpolation to be done.
Also a little bit of cleanup, and setting an appropriate identity default for the scale property when interpolating.

For modders: As a workaround, you can add a tiny offset so that overrides aren't identity overrides.
2025-10-29 10:25:50 +01:00
SmallJoker 56bc7814de
Lua API: Unify server env checks and fix missing ones (#16457)
A few functions tried to dereference a ServerEnvironment nullptr by
calling 'getEnv()'. This change makes use of a macro where possible.

This also cleans up incorrect macro uses, with no functional difference.
2025-09-04 19:00:23 +02:00
sfan5 36b5374715 Simplify HUD handling in Player class 2025-08-19 17:34:22 +02:00
Lars Müller 23bf50a07c
Document & extend testing for rotation conventions (#16200)
* Document Luanti rotation conventions
* Add test for setPitchYawRollRad (entity) rotation conventions
* Test and document that `vector.rotate` uses (extrinsic) Z-X-Y rotation order
2025-07-13 17:11:12 +02:00
sfence 4f42b4308c
Add persistent unique identifiers for objects (#14135) 2025-07-09 10:40:26 +02:00
SmallJoker fdc149f316
Formspec: Show a player inventory using core.show_formspec (#15963)
'core.show_formspec' now shows and updates the inventory formspec as if
it was opened using the hotkey on client-side.
2025-06-22 22:06:47 +02:00
Lars Mueller 747857bffa Implement helpful `__tostring` for all userdata-based classes 2025-05-04 16:32:17 +02:00
sfan5 ba62808fe8
Basic camera control API (#15796) 2025-02-19 18:45:45 +01:00
sfence d849d51c2d
Replace licensing text in headers (LGPLv2.1) (#15321) 2024-10-28 15:57:39 +01:00
sfan5 3778ed7466 Keep PlayerMetaRef via name not pointer 2024-10-12 22:37:17 +02:00
sfan5 c8dc9c2b8d Increase safety checks around ObjectRefs 2024-10-12 22:37:17 +02:00
Lars Mueller 06907aa99b Support floating-point animation frame numbers 2024-10-10 21:39:57 +02:00
grorp 6ac4447134
Make bloom parameters server-controlled (#15231) 2024-10-09 15:08:03 +02:00
sfence a19d0033bc
Add forgotten lua_pop 2024-10-04 10:42:37 +02:00
grorp 22ef4c8be1
Expose analog joystick input to the Lua API (#14348) 2024-10-01 17:21:42 +02:00
grorp 526a2f7b8c
Dehardcode the death formspec (#15155)
Co-authored-by: Paul Ouellette <oue.paul18@gmail.com>
2024-09-24 22:37:44 +02:00
GefullteTaubenbrust2 d8f1daac25
Visual Effects Vol. 1 (#14610)
This PR adds a variety of effects to enhance the visual experience.

    "soft" clouds look
    Tinted shadows
    Crude water reflections (sky and sun) and waves
    Translucent foliage
    Node specular highlights
    Adjusted fog color (more saturated where the fog is lighter)
    Minor changes to volumetric lighting (crudely simulates the effect of depth)

Co-authored-by: sfan5 <sfan5@live.de>
2024-09-24 11:14:27 -07:00
Lars Müller 21ed680b10
Make getting bone overrides return the "same" euler angles (#15007) 2024-08-26 21:22:38 +02:00
sfence f2c66b9ceb
Add possibility to easier override HP and breath engine logic by Lua (#14179)
Co-authored-by: Lars Mueller <appgurulars@gmx.de>
2024-08-21 20:24:43 +02:00
Lars Mueller d3ca269c79 Add `minetest.is_valid_player_name` utility 2024-08-16 22:13:16 +02:00
Lars Mueller 6874c358ea Allow managing object observers
-----

Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
2024-08-16 22:13:16 +02:00
Lars Mueller cc8e7a569e Switch player names to `std::string` 2024-08-16 22:13:16 +02:00
1F616EMO~nya 98e51a0159
Clamp hotbar selection to slots that exist (#14869) 2024-08-12 15:35:13 +02:00
sfan5 85e717fcd1
Rework object attachment handling to fix bugs (#14825) 2024-08-12 15:32:18 +02:00
Lars Müller 8ed55b3aff
Help modders deal with object invalidation (#14769)
* Skip invalid objects in raycasts
* Add `ObjectRef:is_valid` method
* Add object inside radius / area iterators which skip invalid objects
* Update docs to clarify object invalidation and how to deal with it

---------

Co-authored-by: sfan5 <sfan5@live.de>
2024-07-01 20:50:38 +02:00
Lars Mueller 70bddcf318 Fix wrong name for bone override interpolation field 2024-05-04 02:09:35 +02:00
grorp 2bdd0a6bdb
Add physics overrides for walk speed and Fast Mode (#14475)
Co-authored-by: Wuzzy <Wuzzy@disroot.org>
2024-04-30 13:50:01 +02:00
sfence 72cb4e9bea
Allow `nil` puncher in `object:punch` (#14319) 2024-04-28 17:55:04 +02:00
sfan5 c524c52baa Fix some common SAO methods to not generate useless update packets 2024-03-06 18:03:57 +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
sfan5 9e3a11534f
Allow fog color to be overriden properly (#14296) 2024-01-23 22:33:33 +01:00
cx384 92c55c27cf
Add function to get all HUD elements (#14042) 2024-01-14 17:46:29 +01:00
sfence d0753dddb1
Method add_pos for object/player (#14126) 2024-01-01 22:48:56 +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
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
Wuzzy 8ebaf753d3
New physics overrides (#11465) 2023-09-15 20:10:08 +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
Desour e700182f44 Replace Optional with std::optional 2023-06-15 10:38:44 +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
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
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
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
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
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