Commit Graph

861 Commits (master)

Author SHA1 Message Date
rubenwardy 2d10fa7867
Prevent loading a world with unresolved dependencies (#12542) 2022-08-19 12:31:36 +01:00
rubenwardy 4648d8f499
Deprecate loading a world with unresolved dependencies (#12541)
Co-authored-by: sfan5 <sfan5@live.de>
2022-07-17 14:45:20 +01:00
Lexi Hale 20bd6bdb68
Animated particlespawners and more (#11545)
Co-authored-by: Lars Mueller <appgurulars@gmx.de>
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: Dmitry Kostenko <codeforsmile@gmail.com>
2022-07-13 11:57:12 +02:00
SmallJoker e51f474613
Sounds: Various little improvements (#12486)
Use SimpleSoundSpec where reasonable (OpenAL)
Ensure the sound IDs do not underflow or get overwritten -> loop in u16
Proper use of an enum.
2022-07-09 22:32:24 +02: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
Wuzzy 142928e944
Allow to set maximum star opacity at daytime (#11663) 2022-07-02 19:57:48 +01:00
SmallJoker a463620edb
Re-order sound-related code (#12382)
Dropped ServerSoundParams -> moved to ServerPlayingSound. This gets rid of the duplicated
'fade' and 'pitch' values on server-side where only one was used anyway.
SimpleSoundSpec is the basic sound without positional information, hence 'loop' is included.

Recursively added PROTOCOL_VERSION to most functions to reduce the versioning mess in the
future. Per-type version numbers are kept for now as a safety rope in a special case.
2022-06-20 21:56:12 +02:00
Lars Müller f4a53f7ee6
No damage effects on hp_max change (#11846) 2022-06-11 20:00:40 +02:00
sfan5 261a8db9dd Optimize Server::sendMetadataChanged a bit
The distance check also never worked as intended, now fixed.
2022-05-29 14:00:19 +02:00
sfan5 f195db2d14 Add API function to invoke player respawn
closes #12272
2022-05-29 14:00:19 +02:00
rubenwardy 4e9e230e34
Deprecate game.conf name, use title instead (#12030) 2022-05-21 16:23:30 +01:00
sfan5 ec9f157512 Use native packer to transfer globals into async env(s) 2022-05-10 22:37:42 +02:00
sfan5 f5a8593b11
Add more Prometheus metrics (#12274) 2022-05-09 21:20:58 +02:00
sfan5 1fa4f58080 Cache serialized mapblocks during sending
This reduces the
(absolute) time spent in Server::SendBlocks() from 700ms to 300ms
(relative) share of MapBlock::serialize() from 80% to 60%
in a test setup with 10 players and many block changes
2022-05-08 19:12:10 +02:00
paradust7 0704ca0550
Make logging cost free when there is no output target (#12247)
The logging streams now do almost no work when there is no output target for them.

For example, if LL_VERBOSE has no output targets, then `verbosestream << x` will return a StreamProxy with a null target. Any further `<<` operations applied to it will do nothing.
2022-05-04 20:55:01 +02:00
sfan5 e7659883cc Async environment for mods to do concurrent tasks (#11131) 2022-05-02 20:56:06 +02:00
sfan5 56a558baf8 Refactor some Lua API functions in preparation for async env 2022-05-02 20:54:55 +02:00
sfan5 a65f6f07f3 Clean up some auth packet handling related code 2022-04-28 20:05:26 +02:00
Jude Melton-Houghton 0b5b2b2633
Disentangle map implementations (#12148)
Fixes violation of Liskov substitution principle
Fixes #12144
2022-04-07 21:58:04 +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
sfan5 04bd253390 Move the codebase to C++14 2022-02-26 14:39:41 +01:00
sfan5 c31b301722 Clean up ClientReady packet handling
fixes #12073
2022-02-17 23:20:33 +01:00
Lars Müller b9ee29a945
Send HUD flags only if changed 2022-02-08 19:28:32 +01:00
Jude Melton-Houghton 1c73902005 Clean up ClientInterface locking 2022-02-03 11:43:51 +01:00
sfan5 91c6728eb8 Add game name to server status string 2022-01-28 17:15:10 +01:00
Alex 7c93b2d7a3
Give the ASCII console splash a facelift 2022-01-15 17:45:33 +01:00
sfan5 379473b670 Improve situation around race condition with dynamic_add_media during client join 2022-01-15 17:45:08 +01:00
savilli 72b14bd994
Don't call on_dieplayer callback two times (#11874) 2022-01-15 17:44:55 +01:00
Jude Melton-Houghton bf22569019
Use a database for mod storage (#11763) 2022-01-07 20:28:49 +02:00
sfan5 0ea8df4d64
Socket-related cleanups
Improve error handling on Windows and reduce the size of the `Address` class
2021-12-29 23:01:26 +01:00
sfan5 ff934d538c
Fix various code & correctness issues (#11815) 2021-12-05 14:40:30 +01:00
Wuzzy fe7195badb Make /status message easier to read 2021-10-15 18:13:57 +02:00
ROllerozxa 6fedee16f0
Readd TGA to the list of valid texture formats. (#11598) 2021-09-15 11:12:24 +01:00
sfan5 766e885a1b
Clean up/improve some scriptapi error handling code 2021-09-10 23:16:46 +02:00
Jude Melton-Houghton 7423c4c11e
Send to clients node metadata that changed to become empty (#11597) 2021-09-10 23:16:34 +02:00
sfan5 bbfae0cc67
Dynamic_Add_Media v2 (#11550) 2021-09-09 16:51:35 +02:00
savilli 3f1adb49ae
Remove redundant on_dieplayer calls 2021-08-28 12:14:16 +02:00
hecks 1e2b638881 Remove unsupported formats from the media enumerator 2021-07-29 22:42:47 +02:00
sfan5 6e8aebf432
Add bold, italic and monospace font styling for HUD text elements (#11478)
Co-authored-by: Elias Fleckenstein <eliasfleckenstein@web.de>
2021-07-27 19:11:46 +02:00
SmallJoker a8b7c8ff38 Server: Ignore whitespace-only chat messages 2021-06-22 19:47:18 +02:00
Wuzzy cafad6ac03 Translate builtin (#10693)
This PR is the second attempt to translate builtin.
Server-sent translation files can be added to `builtin/locale/`, whereas client-side translations depend on gettext.
2021-03-05 16:29:48 +01:00
SmallJoker 375bcd65c1
Send attachments instantly before set_pos (#10235) 2021-02-12 20:54:06 +01:00
SmallJoker d287da184c Server: properly delete ServerMap on interrupted startups
A static mod error (e.g. typo) would abort the initialization but never free ServerMap
2021-02-05 18:38:34 +01:00
sfan5 674d67f312 Encode high codepoints as surrogates to safely transport wchar_t over network
fixes #7643
2021-02-02 20:46:08 +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 40ad976753 Revise dynamic_add_media API to better accomodate future changes 2021-02-01 23:00:13 +01:00
sfan5 a01a02f7a1 Preserve immortal group for players when damage is disabled 2021-01-31 20:38:12 +01:00
sfan5 112a6adb10
Cache client IP in RemoteClient so it can always be retrieved (#10887)
specifically: after the peer has already disappeared
2021-01-31 20:36:47 +01:00
SmallJoker 37a05ec8d6 Settings: Proper priority hierarchy
Remove old defaults system
Introduce priority-based fallback list
Use new functions for map_meta special functions
Change groups to use end tags

Unittest changes:
 * Adapt unittest to the new code
 * Compare Settings objects
2021-01-29 17:32:35 +01:00
Lars e638056523 Allow configuring block disk and net compression. Change default disk level. 2020-12-15 10:15:25 -08:00