Commit Graph

188 Commits

Author SHA1 Message Date
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
Abdou-31 d1b80b462e
Fix typos and en_US/en_GB inconsistency in various files (#12902) 2022-11-09 11:57:19 -05:00
Jude Melton-Houghton 7632af3c73
Consolidate API object code (#12728)
Co-authored-by: sfan5 <sfan5@live.de>
2022-10-04 08:31:36 -04:00
SmallJoker c8ee755c05
Physics overrides: Move values to a common struct (#12591)
Co-authored-by: sfan5 <sfan5@live.de>
2022-08-12 10:17:02 +01:00
Zughy bcc56803d7
Fix crash when stars are reset 2022-08-10 18:03:57 +02:00
Wuzzy 142928e944
Allow to set maximum star opacity at daytime (#11663) 2022-07-02 19:57:48 +01:00
sfan5 f195db2d14 Add API function to invoke player respawn
closes #12272
2022-05-29 14:00:19 +02:00
Lars Müller 1f27bf6380
Remove unneeded ObjectRef setter return values (#12179) 2022-04-10 23:20:51 +02:00
x2048 0f25fa7af6
Add API to control shadow intensity from the game/mod (#11944)
* Also Disable shadows when sun/moon is hidden. Fixes #11972.
2022-03-26 16:58:26 +01:00
Lars Müller b9e886726c
Readd basic_debug as a HUD flag (#12020) 2022-03-05 22:16:17 +01:00
Zughy 44fc888bd6
Allow get_sky to return a table (#11963) 2022-03-05 22:15:41 +01:00
Lars Müller fe0b2d02bf
Define control(bits) as "unset" for entities (#11995) 2022-01-27 22:22:58 +01:00
Zughy 37d80784dd
Allow resetting celestial vault elements by leaving its arguments empty (#11922) 2022-01-22 12:42:49 +01:00
sfan5 5eb45e1ea0
Restore pass-through of direction keys (#11924)
This moves relevant code into the PlayerControl class and gets rid of separate keyPressed variable.
2022-01-09 18:46:36 +01:00
Wuzzy 6910c8d920
Fix number of tool uses being off by 1..32767 (#11110) 2021-10-31 22:33:33 +00:00
savilli 3f1adb49ae
Remove redundant on_dieplayer calls 2021-08-28 12:14:16 +02:00
NeroBurner 1d69a23ba4
Joystick sensitivity for player movement (#11262)
This commit deprecates the forward, backward, left, and right binary
inputs currently used for player movement in the PlayerControl struct.
In their place, it adds the movement_speed and movement_direction
values, which represents the player movement is a polar coordinate
system.

movement_speed is a scalar from 0.0 to 1.0. movement_direction is
an angle from 0 to +-Pi:

	       FWD
	        0
	        _
	 LFT   / \   RGT
	-Pi/2 |   | +Pi/2
	       \_/
	       +-Pi
	       BCK

Boolean movement bits will still be set for server telegrams and
Lua script invocations to provide full backward compatibility.
When generating these values from an analog input, a direction is
considered active when it is 22.5 degrees away from either
orthogonal axis.

Co-authored-by: Markus Koch <markus@notsyncing.net>
Co-authored-by: sfan5 <sfan5@live.de>
2021-08-27 20:24:24 +02:00
SmallJoker 0c1e9603db
HUD: Reject and warn on invalid stat types (#11548)
This comes into play on older servers which do not know the "stat" type.
Warnings are only logged once to avoid spam within globalstep callbacks
2021-08-21 20:04:04 +02:00
sfan5 e7b05beb7d
Validate staticdata and object property length limits (#11511)
Some games provide users with enough freedom to create items
with metadata longer than 64KB, preventing this from causing
issues is on them but we'll still do the minimum not to abort
the server if this happens.
2021-08-19 20:14:22 +02:00
sfan5 a0047d6edc script: Replace calls to depreated luaL_openlib 2021-05-30 11:40:14 +02:00
rubenwardy f85e9ab925
Add nametag background setting and object property (#10937) 2021-02-17 19:51:28 +00:00
sfan5 a01a02f7a1 Preserve immortal group for players when damage is disabled 2021-01-31 20:38:12 +01:00
Zughy ea5d6312c1
ObjectRef: fix some v3f checks (#10602) 2021-01-21 18:37:38 +01:00
hecks dd5a732fa9
Add on_deactivate callback for luaentities (#10723) 2021-01-02 15:14:29 +01:00
rubenwardy 2c3593b51e Fix unsafe cast in l_object 2020-12-23 22:24:58 +00:00
SmallJoker fca4db4184
ObjectRef: Re-add legacy code for set_physics_override (#10585)
These arguments are used at least by MTG beds and homedecor_common. A deprecation warning is shown to safely remove it in a future release.
2020-11-10 21:02:53 +01:00
Zughy 72b93ec0d7
Fix ObjectRef errors due to lua_isnil() (#10564)
Treat 'none' values as 'nil'
2020-11-04 21:43:18 +01:00
rubenwardy 89dd05fdf3
Fix segfault in deprecation logging due to tail call, log by default (#10174) 2020-10-31 18:19:23 +00:00
Zughy 33b2c5f5b1
Clean up l_object.cpp (#10512)
Co-authored-by: Zughy <4279489-marco_a@users.noreply.gitlab.com>
2020-10-22 16:18:01 +01:00
Zughy 2341a4aff1
Add ObjectRef:get_children() (#10480)
Co-authored-by: Zughy <4279489-marco_a@users.noreply.gitlab.com>
2020-10-13 20:27:52 +01:00
Pierre-Yves Rollo 81c66d6efb Minimap as HUD element with API control
Features:
 * Define Minimap available modes (surface/radar, scale) from Lua, using player:set_minimap_modes()
 * New HUD elements for displaying minimap with custom size and placing
 * New minimap mode for displaying a texture instead of the map
2020-10-04 15:24:34 +02:00