Commit Graph

323 Commits

Author SHA1 Message Date
Gary Miguel da832a295e
Delete clang-format files and comments (#14079) 2023-12-15 10:23:44 +01:00
superfloh247 7cb20dd6c2
Fix undefined behaviour in modulo360f (#13976)
Resolves a crash on macOS/arm64 by no longer depending on UB.
2023-11-12 20:08:33 +01:00
Nekobit 50234b8e5c
Fix string conversion for FreeBSD (#13648) 2023-07-17 20:46:06 +02:00
numzero 3b74cc4a41 Replace PP with direct printing 2023-06-26 22:51:32 +02:00
Desour 5e6d144567 Enable -Wimplicit-fallthrough and use [[fallthrough]] attribute 2023-06-15 10:38:44 +02:00
Desour 9c348d057e Replace the old STATIC_ASSERT macro with static_assert 2023-06-15 10:38:44 +02:00
Desour e700182f44 Replace Optional with std::optional 2023-06-15 10:38:44 +02:00
Thresher 180ec92ef9
Remove trailing whitespace (#13505) 2023-05-18 20:34:18 +02:00
savilli 5ba70cf5ef
Fix crash on handling wallmounted nodes with invalid param2 (#13487) 2023-05-18 20:31:04 +02:00
sfan5 15445a0fbe Raise and clean up _WIN32_WINNT constant 2023-05-11 22:51:01 +02:00
rubenwardy 4158b72971
Add ability to override item images using meta (#12614) 2023-04-17 19:44:41 +01:00
Desour 67068cfaf4 Get rid of wgettext 2023-04-08 20:17:50 +02:00
x2048 705195b43e
Scale culler steps proportionally to the mesh sizes (#13250) 2023-03-11 14:10:26 +01:00
lhofhansl d3a6ee00e6
Generalize mesh chunking, and make it configurable. (#13179)
* Generalize mesh chunking. Set 3x3x3 chunks.

* Make mesh chunk size configurable... Default to 1 (off).

* Extract all mesh grid maths into a dedicated class

---------

Co-authored-by: x2048 <codeforsmile@gmail.com>
2023-02-08 13:42:12 -08:00
x2048 69fc206109
8x block meshes (#13133)
Reduce the number of drawcalls by generating a mesh per 8 blocks (2x2x2). Only blocks with even coordinates (lowest bit set to 0) will get a mesh.

Note: This also removes the old 'loops' algorithm for building the draw list, because it produces visual artifacts and cannot be made compatible with the approach of having a mesh for every 8th block without hurting performance.

Co-authored-by: Jude Melton-Houghton <jwmhjwmh@gmail.com>
Co-authored-by: Lars <larsh@apache.org>
Co-authored-by: sfan5 <sfan5@live.de>
2023-01-31 17:30:59 +01:00
Jude Melton-Houghton 5f2925c59c
Increase `ftos` precision (#13141) 2023-01-12 14:12:31 -05:00
Jude Melton-Houghton 055fc69c11
Handle num lock in chat (#12984) 2022-11-30 10:43:12 -05:00
Jude Melton-Houghton 8817af07fb
Deprecate special handling of `${key}` syntax in metadata values (#12970) 2022-11-24 17:56:43 -05:00
Wuzzy 3c7f26d937
Add support for attached facedir/4dir nodes (#11432) 2022-11-24 17:56:07 -05:00
Abdou-31 d1b80b462e
Fix typos and en_US/en_GB inconsistency in various files (#12902) 2022-11-09 11:57:19 -05:00
Lars Müller 077627181e
Allow rotating entity selectionboxes (#12379) 2022-10-30 16:53:14 +01:00
DS 7153cb8a0b
Fix formspec focus (#12795) 2022-10-21 17:11:41 +02:00
fluxionary 6b6f886bcd
object ids are u16, not s16 (#12848) 2022-10-13 08:46:48 -04:00
ndren 2c3f641e0b
Simplify bit flip in sha1.cpp 2022-09-20 10:54:35 +02:00
Jude Melton-Houghton fe13f9dfd1
Fix potential use-after-free with item metadata (#12729)
This fixes a use-after-free bug in the case where itemstack metadata is accessed after the itemstack has been garbage-collected.
2022-09-11 19:28:37 +02:00
Herman Semenov 038da00e79
Code optimizations / refactor (#12704)
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
Co-authored-by: sfan5 <sfan5@live.de>
2022-09-06 11:21:09 +01:00
Mantar 95d7fcb949
Apply NetBSD string conversion workaround to OpenBSD as well (#12618) 2022-07-31 15:18:19 +02:00
sfan5 137eef6590 Move f1000 sanitizing to the places that still use this type 2022-07-14 20:55:45 +02: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
Nathanaël Courant 622d857bed Update my name 2022-06-16 21:38:32 +02:00
sfan5 3ac5a24b12
Sanitize player position and speed server-side (#12396) 2022-06-07 21:27:05 +02:00
savilli 1f39948bc3
Fix BSD iconv declaration 2022-06-05 15:20:29 +02:00
sfan5 9ee3dc71f1 Optimize JSON string (de)serialization routines
stringstreams were shown to be slow when reading/writing single characters
and there is lots of potential by having functions perform on existing
buffers whenever possible.
2022-05-21 17:46:10 +02:00
sfan5 70dc23f996 Improve testSerializeJsonString unit tests
this also removes the requirement that / is escaped, there is
no reason for doing so.
2022-05-21 17:46:10 +02:00
sfan5 f5a8593b11
Add more Prometheus metrics (#12274) 2022-05-09 21:20:58 +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
Lars Müller fccf1e2eac
Support CSS Color Module Level 4 (#12204) 2022-04-27 17:00:02 -04:00
ShadowNinja f5e54cd398 Fix OOB read in trim("") 2022-04-08 14:55:21 +01:00
ShadowNinja dae6fe91a1 Update directory name sanitization
Only ASCII spaces have to be handles specially, and leading spaces are
also disallowed.
2022-04-08 14:55:21 +01:00
ShadowNinja 00ebedad93 Add additional reserved directory names 2022-04-08 14:55:21 +01:00
ShadowNinja 7993909fab Spacing fixes 2022-04-08 14:55:21 +01:00
ShadowNinja 5683bb76cc Fix compiler warnings 2022-04-08 14:55:21 +01:00
Daroc Alden 598efbf7f9
Fix memory leak from SpatialAreaStore (#12120) 2022-03-09 19:28:12 +01:00
sfan5 04bd253390 Move the codebase to C++14 2022-02-26 14:39:41 +01:00
ShadowNinja 29d2b2ccd0
Print announce error response (#11878)
Fix HTTPFetch caller and request ID to 64 bits
Check that allocated caller ID is not DISCARD
Print body if serverlist request returns error
Don't print control characters from HTTP responses
Document special HTTPFetch caller IDs
Allow unicode to be printed
2022-01-01 22:44:56 +01:00
JosiahWI 7f6306ca96
Restore GCC 5 compatibility (#11778) 2021-12-28 14:05:49 +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 660e63dbae
Fix item duplication if player dies during interact callback (alternative) (#11662) 2021-10-25 20:30:27 +02:00
Wuzzy fe7195badb Make /status message easier to read 2021-10-15 18:13:57 +02:00