Commit Graph

80 Commits

Author SHA1 Message Date
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 b38ffdec27
Implement vector and node conversion in Lua (#12609)
Co-authored-by: sfan5 <sfan5@live.de>
2022-10-18 18:01:44 -04:00
Jude Melton-Houghton f4a01f3a5d
Avoid duplication of mod metadata in memory (#12562)
Co-authored-by: sfan5 <sfan5@live.de>
2022-09-26 17:03:43 -04:00
rubenwardy 2d10fa7867
Prevent loading a world with unresolved dependencies (#12542) 2022-08-19 12:31:36 +01:00
x2048 aa2fdc6ef6
Limit force shadow update to urgent blocks (#12692) 2022-08-14 20:29:20 +02:00
rubenwardy 06de82fd86 Refactor ModConfiguration 2022-07-14 22:12:54 +01:00
SmallJoker 051181fa6e
Enforce limits of settings that could cause buggy behaviour (#12450)
Enforces the setting value bounds that are currently only limited by the GUI (settingtypes.txt).
2022-07-09 22:32:08 +02:00
Lars Müller f4a53f7ee6
No damage effects on hp_max change (#11846) 2022-06-11 20:00:40 +02:00
rubenwardy 03d86ea0b4
Add register dialog to separate login/register (#12185)
New users find Minetest's account system confusing.
This change moves username/password to a new dialog,
with login and register buttons added to the Join Game tab.

The old registration confirmation dialog is removed in
favour of the new dialog.

Fixes #8138
2022-06-05 17:47:38 +02:00
sfan5 85c824ed13 Make sure real disconnect reason isn't overwritten
bug introduced in 2f32044273
2022-05-29 14:00:19 +02:00
x2048 ef22c0206f
Force-update shadows when the world is changed (#12364) 2022-05-26 22:28:34 +02:00
sfan5 2f32044273 Don't ignore server disconnects in client code
If the server stops talking to us without saying bye we
should actually end the in-game session with an error message.
2022-05-21 17:49:55 +02:00
SmallJoker 3ce5a68cd1
guiScalingFilter: Fix most memory leaks (#12256)
Calls to the cache function ended up creating a new texture regardless whether
the texture is already cached.
2022-05-04 20:55:13 +02:00
Oblomov 0d91ef78dd
Refactor local time getter functions (#12221)
This commit introduces mt_localtime() in src/gettime.h, a wrapper
around the OS-specific thread-safe versions of localtime()
(resp. localtime_s on Windows and localtime_r in other systems).

Per the Open Group recommendation,
«portable applications should call tzset() explicitly before using
ctime_r() or localtime_r() because setting timezone information is
optional for those functions», so we also do a one-shot
call of tzset() (_tzset() on Windows to avoid warning C4996).

The function is used to replace the localtime() calls in
getTimestamp() and makeScreenshot().

(The only reminaing call to localtime() in the tree now is the one in
the local copy of the Lua source code.)
2022-04-28 18:53:33 +02:00
Jude Melton-Houghton fc161e757c
Automatically migrate client mod storage (#11960) 2022-01-27 22:24:30 +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
Jude Melton-Houghton bf22569019
Use a database for mod storage (#11763) 2022-01-07 20:28:49 +02:00
Vitaliy 9b650b9efb
Add more neighbors on mesh update (#6765) 2021-12-29 22:59:53 +01:00
SmallJoker 57a59ae92d
Network: Delete copy constructor and use std::move instead (#11642)
This is a follow-up change which disables class copies where possible to avoid unnecessary memory movements.
2021-12-01 20:22:33 +01:00
sfan5 75bf9b75ca
Make sure relevant std::stringstreams are set to binary 2021-09-11 21:06:57 +02:00
sfan5 bbfae0cc67
Dynamic_Add_Media v2 (#11550) 2021-09-09 16:51:35 +02:00
rubenwardy 24b66dede0
Add fwgettext util function 2021-08-19 20:13:25 +02:00
SmallJoker 32cb9d0828
Mods: Combine mod loading checks and deprection logging (#11503)
This limits the logged deprecation messages to the mods that are loaded
Unifies the mod naming convention check for CSM & SSM
2021-07-31 19:54:52 +02:00
SmallJoker 40bee27e56 CSM: Do not index files within hidden directories
CSM would previously scan for files within .git or .svn directories, and also special files such as .gitignore
2021-07-17 16:44:06 +02:00
Loic Blot 225d4541ff fix: extractZipFile is not part of Client but more generic.
This solve a crash from mainmenu while extracting the zip
2021-05-06 16:01:52 +02:00
Loic Blot de85bc9227 fix: some code tidy about includes & irr namespaces 2021-05-03 19:49:19 +02:00
Loic Blot 48d5abd5be refacto: remove get_gui_env & draw_load_screen from RenderingEngine singleton 2021-05-03 19:49:19 +02:00
Loic Blot a93712458b fix: don't use RenderingEngine singleton when it's possible 2021-05-03 19:49:19 +02:00
Loic Blot 5a02c376ea refacto: RenderingEngine::get_scene_manager() is now not callable from singleton
This permits to make evidence that we have some bad object passing on various code parts. I fixed majority of them to reduce the scope of passed objects

Unfortunately, for some edge cases i should have to expose ISceneManager from client, this should be fixed in the future when our POO will be cleaner client side (we have a mix of rendering and processing in majority of the client objects, it works but it's not clean)
2021-05-03 19:49:19 +02:00
Loic Blot 1bc855646e refacto: protect some RenderingEngine::get_scene_manager
* protect it from Camera, Sky, ClientMap object calls
* rename Game::sky to Game::m_sky
2021-05-03 19:49:19 +02:00
Loic Blot 74125a74d3 refacto: hide mesh_cache inside the rendering engine
This permit cleaner access to meshCache and ensure we don't access to it from all the code
2021-05-03 19:49:19 +02:00
Loic Blot e0716384d6 refacto: add RenderingEngine::cleanupMeshCache
This permits to prevent client to own the mesh cache cleanup logic. It's better in RenderingEngine
2021-05-03 19:49:19 +02:00
Loic Blot e34d28af9f refacto: rendering engine singleton removal step 1 (filesystem)
Make the RenderingEngine filesystem member non accessible from everywhere

This permits also to determine that some lua code has directly a logic to extract zip file. Move this logic inside client, it's not the lua stack role to perform a such complex operation

Found also another irrlicht <1.8 compat code to remove
2021-05-03 19:49:19 +02:00
Loic Blot bc1888ff21 fix: drop old irrlicht <1.8 compat on Client::loadMedia 2021-05-03 19:49:19 +02:00
sfan5 1bc85a47cb Avoid unnecessary copies during media/mesh loading 2021-03-12 20:56:02 +01:00
sfan5 cff35cf0b3 Handle mesh load failure without crashing 2021-03-12 20:56:02 +01:00
sfan5 c834d2ab25 Drop wide/narrow conversion functions
The only valid usecase for these is interfacing with OS APIs
that want a locale/OS-specific multibyte encoding.
But they weren't used for that anywhere, instead UTF-8 is pretty
much assumed when it comes to that.
Since these are only a potential source of bugs and do not fulfil
their purpose at all, drop them entirely.
2021-02-02 20:46:08 +01:00
sfan5 fd1c1a755e Readd Client::sendPlayerPos optimization (was part of 81c7f0a)
This reverts commit b49dfa92ce.
2021-01-31 20:38:12 +01:00
rubenwardy 4c76239818
Remove dead code (#10845) 2021-01-22 15:09:26 +00:00
sfan5 660115c1ab
Decouple entity minimap markers from nametags replacing with show_on_minimap property (#10443) 2020-10-19 20:38:15 +02:00
SmallJoker f46509d5e2
Remove unused functions reported by cppcheck (#10463)
Run unused functions reported by cppcheck

This change removes a few (but not all) unused functions.
Some unused helper functions were not removed due to their complexity and potential of future use.
2020-10-05 09:07:33 +02: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
rubenwardy 9ec75d7765
Clean up server-side translations, remove global variable (#10075) 2020-09-16 14:51:11 +01:00
ANAND 291a6b70d6 Allow binding dig, place actions to keys; remove LMB/RMB hardcoding
Co-authored-by: Sam Caulfield <sam@samcaulfield.com>
2020-08-15 12:19:20 +03:00
TheTermos ebb721a476 Fix player controls only being applied for the first move 2020-07-07 19:09:23 +02:00
sfan5 2424dfe007
Server pushing media at runtime (#9961) 2020-06-13 19:03:26 +02:00
sfan5 be38a44ffe Client: Add sum and average to packetcounter 2020-05-17 21:37:01 +02:00
EvidenceB Kidscode cee3c5e73d
Add server side translations capability (#9733)
* Add server side translations capability
2020-04-25 07:20:00 +02:00
Hugues Ross 5cf6318117
Refactor texture overrides and add new features (#9600)
* Refactor texture overrides, and add new features:

- Texture overrides can support multiple targets in one line
- Texture override files can have comment lines
- Item images/wield images can be overridden

* Formatting changes

* Address soime feedback

- Pass vectors by const reference
- Log syntax errors as warnings
- Remove 'C' prefix from TextureOverrideSource

* Simplify override target checks with an inline helper function

* make linter happy

* Apply feedback suggestions

Co-Authored-By: rubenwardy <rw@rubenwardy.com>

* Remove remaining != 0 checks

* Update copyright notice

Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: rubenwardy <rw@rubenwardy.com>
2020-04-14 20:41:29 +02:00
sfan5 f105bc8dc2 A few initialization cleanups 2020-04-11 13:12:51 +02:00