Commit Graph

917 Commits

Author SHA1 Message Date
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
Lars 7c9706fdcf Remove unused meshgen_block_cache_size setting 2024-01-19 11:52:39 +01:00
HybridDog f08e4bb27d
Return to the main menu if a shader compilation fails (#14256)
Before this change, if the shaders are broken, only an error message is shown and the player enters the world nonetheless, where he/she sees broken graphics.
2024-01-19 11:51:46 +01:00
cx384 2ea8d9ca11
Fix out of range enum casts in deSerialize functions (#14090) 2024-01-17 20:05:46 +01:00
sfan5 0383c44f0d
Custom data structure for active objects to get performance *and* safety (#13880) 2024-01-17 20:04:56 +01:00
Wuzzy 08ee6d8d4b
Add rotation support for wallmounted nodes in 'ceiling' or 'floor' mode (#11073) 2024-01-17 17:47:06 +01:00
Vitaliy 8093044f07
Support OpenGL 3 (#13321) 2024-01-16 21:09:18 +01:00
SmallJoker ed7d4037b2 Client: fix possible division by zero in [crack modifier 2024-01-14 16:28:03 +01:00
sfan5 1ba26d67bd Remove excessive includes from porting.h 2024-01-14 13:17:53 +01:00
grorp b12be0498e
Don't enable relative mouse mode if in touchscreen mode (#14118) 2024-01-13 20:01:10 +01:00
lhofhansl 518ecd7f4e
Slight optimizations in ClientMap (#14251) 2024-01-12 16:53:08 -08:00
HybridDog 345e93d19c Code style: Use non-static member initialisation instead of member initialiser lists for shader uniform names
Before this change,
the member type and member name are at one place,
and the member name and uniform name are at another place.
If the uniform name is written directly at the member declaration,
the member type, member name and uniform name are all at one place,
which leads to shorter code and may be easier to read.
2024-01-11 20:04:42 +01:00
SmallJoker a7eaee77ca
ContentCAO: Fix threshold of alpha channel textures (#14213)
With disabled shaders, the material EMT_TRANSPARENT_ALPHA_CHANNEL uses the
parameter as an alpha threshold to decide whether to draw the texture.
Thus lowering this limit fixes the issue of vanishing textures below alpha 128.
2024-01-10 19:34:52 +01:00
lhofhansl 4bf95703a0
Allow access into MapSector::m_blocks (#14232)
* New API to allow access into MapSector::m_blocks
* Use this API on ClientMap::touchMapBlocks(), ClientMap::updateDrawList(), and ClientMap::updateDrawListShadow() to speed them up
2024-01-10 09:17:26 -08:00
cx384 2766c70ad3
Fix dividing by zero crashes in texture modifiers 2024-01-07 21:49:26 +01:00
sfan5 2c390b5473 Rework client connecting and enable fallback address use 2024-01-07 21:49:05 +01:00
sfan5 dc7fb26921 Extend capabilities of Address class 2024-01-07 21:49:05 +01:00
Muhammad Rifqi Priyo Susanto 171f911237
Android: Add selection dialog (drop down/combo box) (#13814)
- The handling of IGUIComboBox uses the new setAndSendSelected() method.
- getDialogState() is now getInputDialogState() and returns the state of the input dialog.
- getLastDialogType() is added and returns current/last shown dialog's type.
- getInputDialogState() now returns an enum instead of int.
- getAndroidUIInput() now returns void instead of bool.
- New data types (enum) are added:
  (1) GameActivity.DialogType (Java) and porting::AndroidDialogType (C++)
  (2) GameActivity.DialogState (Java) and porting::AndroidDialogState (C++)
- When showing a text input dialog, there is no custom accept button text any more.
- showDialog()/showDialogUI() for text input is now showTextInputDialog()/showTextInputDialogUI().
- showInputDialog()/showDialogUI() for text input is now showTextInputDialog()/showTextInputDialogUI().
- getDialogValue()/getInputDialogValue() is now getDialogMessage()/getInputDialogMessage().


Co-authored-by: Gregor Parzefall <82708541+grorp@users.noreply.github.com>
2024-01-07 19:00:04 +07:00
Zughy c2c8d4d410
Remove controls listed in the pause menu (no touchscreen) (#13282) 2024-01-05 20:10:07 +00:00
Maintainer_ 34ce86a8f5
Fix GameUI text staying visible during shutdown. (#14197) 2024-01-05 00:39:56 +01:00
Muhammad Rifqi Priyo Susanto e17455cb22
Remove server's address and port from pause menu (#14082) 2024-01-05 00:39:11 +01:00
DS c9cd0d20ef
Use AL_SOFT_direct_channels_remix extension for non-positional stereo sounds (#14195) 2024-01-03 21:57:00 +01:00
DS 3eab5e9002
Replace clientmap's MeshBufListList with a hashmap 2024-01-03 21:56:38 +01:00
sfence d0753dddb1
Method add_pos for object/player (#14126) 2024-01-01 22:48:56 +01:00
Alfred Wingate c9ab61aa8c Add missing header for gcc-14
https://gcc.gnu.org/gcc-14/porting_to.html

Signed-off-by: Alfred Wingate <parona@protonmail.com>
2023-12-31 19:26:33 +01:00
Gregor Parzefall 335af393f0 Make the loading screen progress bar respect "gui_scaling" 2023-12-26 20:21:15 +01:00
Desour 322c4a5b2b Rework server stepping and dtime calculation 2023-12-25 10:07:03 +01:00
grorp 46c930cf70
Touchscreen: Make server-sent overrides of button textures work (#14145) 2023-12-23 14:39:42 +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
x2048 04f0d545da Initial implementation of 'Godrays' 2023-12-21 16:21:01 -08:00
Gregor Parzefall 04dc4a10f0 Fix TouchScreenGUI ignoring server-sent pitch changes 2023-12-20 21:24:10 +01:00
Lars Müller 0d61598d8a
Extend bone override capabilities (#12388) 2023-12-20 21:21:53 +01:00
grorp 00d9d96e48
Android: Pause rendering while the app is paused (#14058) 2023-12-19 20:18:28 +01:00
HybridDog b1aec1b5c8
Add dithering (#9014) 2023-12-19 20:18:11 +01:00
grorp 91ba02449b
Add `touch_controls` boolean to `get_player_window_information()` (#14092) 2023-12-17 20:47:07 +01:00
JosiahWI 7162b536eb
Extract Game::drawScene from Game::updateFrame 2023-12-17 20:44:45 +01:00
Gary Miguel da832a295e
Delete clang-format files and comments (#14079) 2023-12-15 10:23:44 +01:00
lhofhansl a98200bb4c
Avoid movement jitter (#13093)
This allows the client and server to agree on the position of objects and attached players even when there is lag.
2023-12-10 19:12:37 +01:00
Muhammad Rifqi Priyo Susanto 55fafb7d25
Add sound volume when unfocused setting (#14083)
This adds a new setting to set sound volume multiplier when Minetest window is unfocused/inactive (sound_volume_unfocused, located in Settings > Graphics and Audio > Audio > Volume when unfocused).

If the window is not focused, the sound volume will be multiplied by sound_volume_unfocused setting. The sound volume will be set back to sound_volume again when the window is focused.
2023-12-10 19:11:39 +01:00
SmallJoker 321bcf5c44
GUIFormspecMenu: Fix race condition between quit event and cleanup in Game (#14010)
To not instantly free GUIFormSpec upon close/quit, Game periodically
cleans up the remaining instance on the next frame.

When a new formspec is received and processed after closing the previous formspec
but before the cleanup in Game, the formspec would be closed regardless.
This now re-creates the formspec when the old one is already pending for removal.
2023-12-10 19:09:51 +01:00
sfan5 d6a8b546e4 Enable clean transparent filter in more cases
It was determined that this fixes scaling artifacts that can happen with bilinear,
trilinear or anisotropic filtering alone.
Since the previous commit did not bring back the relevant setting, we fix this
shortcoming by just enabling it in all cases where it is known to help.
2023-11-29 21:09:21 +01:00
sfan5 7f9326805c Return texture filter settings to previous state
This partially reverts commit 72ef90885d.

fixes #14007
2023-11-29 21:09:21 +01:00
Desour 73e85b2ebb Fix cached wanted_range and camera_fov being written with out-of-range value 2023-11-19 20:45:18 +01:00
JosiahWI 56902745c8
Extract updateClouds method from updateFrame (#13939)
Co-authored-by: Gregor Parzefall <82708541+grorp@users.noreply.github.com>
2023-11-08 07:00:59 +07:00
Muhammad Rifqi Priyo Susanto 7213ff7a00
Resolves some warnings for Android version (#13862) 2023-11-05 19:02:01 +01:00
Nils Dagsson Moskopp 2025dcffbd Revert "Don't trigger a key event if a key with the same associated char was pressed (#13773)"
This partially reverts commit d57c936b08.

The reverted commit prevented recognition of key combinations.
It correctly changed a test case to no longer use “KEY_NUMPAD_5”.

Several keyboard layouts use a key combination to input a “+” (e.g. Neo2);
therefore some users could no longer input “+” to increase the view range.

Co-authored-by: savilli <78875209+savilli@users.noreply.github.com>
2023-10-30 21:23:59 +01:00
Muhammad Rifqi Priyo Susanto 1363059416
Fix issues in Minetest's English texts (#13913)
Co-authored-by: Gregor Parzefall <82708541+grorp@users.noreply.github.com>
Co-authored-by: rubenwardy <rw@rubenwardy.com>
Co-authored-by: Desour <ds.desour@proton.me>
Co-authored-by: sfan5 <sfan5@live.de>
2023-10-29 12:24:39 +01:00
Desour b3988d964a Sounds: Do not fade paused sounds 2023-10-29 00:40:07 +02:00
Desour 2ad17136dc Sounds: Fix dtime being in milliseconds 2023-10-29 00:40:07 +02:00
Desour b2aa5d9261 Sounds: Don't pause new sounds when paused 2023-10-29 00:39:38 +02:00