| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Replaced them with fmt::format calls, including changes to the format strings. Also changed the format strings to use FMT_STRING, so that the format is checked compile-time against the arguments.
Also fixed code-style violations already present in the code.
|
| |
|
| |
|
|
|
|
|
| |
* Partially reverts 01a4e696b
* Unify thread names
- Remove use of GetThreadId API
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Rename ChunkData Creatable test
* Add missing Y-check in RedstoneWireHandler
* Remove ChunkDef.h dependency in Scoreboard
* Prepare ChunkData for BlockState storage
+ Split chunk block, meta, block & sky light storage
+ Load the height map from disk
- Reduce duplicated code in ChunkData
- Remove saving MCSBiomes, there aren't any
- Remove the allocation pool, ref #4315, #3864
* fixed build
* fixed test
* fixed the debug compile
Co-authored-by: 12xx12 <44411062+12xx12@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
The BlockID.h file was removed from Globals.h and renamed to BlockType.h (main change)
The BlockInfo.h file was removed from Globals.h (main change)
The ENUM_BLOCK_ID and ENUM_ITEM_ID enum names were replaced with ENUM_BLOCK_TYPE and ENUM_ITEM_TYPE (cosmetics)
The various enums, such as eDimension, eDamageType and eExplosionSource were moved from BlockType.h to Defines.h, together with the helper functions for converting between them and strings (StringToDimension et al.) (minor)
Many inline functions were moved from headers to their respective cpp files, so that BlockType.h could be included only into the cpp file, rather than the header.
That broke our tests a bit, since they pick bits and pieces out of the main code and provide stubs for the rest; they had to be re-stubbed and re-verified.
eMonsterType values are no longer tied to E_ITEM_SPAWN_EGG_META_* values
|
|
|
|
|
|
| |
Removed dependency on cChunkDataCallback.
Moved all the serializing code into a worker class.
Changed the serialization into a single-call action.
|
|
|
|
| |
The generator now only takes care of servicing synchronous "GetChunk(X, Y)" and "GetBiomes(X, Y)" requests.
|
|
|
|
| |
Add check for number of empty lines between functions and fix the corresponding failures
|
|
|
|
|
| |
This allows threads to be restarted after stopping.
Fixes #4257
|
|
|
|
| |
Profiled at a 10x speedup for cLightingThread::ReadChunks.
|
|
|
|
| |
Prevents nullptr dereferences before Start has been called.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Lighting now generally consistent with vanilla
Skylight is now dispersed by some blocks, instead of passing
through unimpeded.
Some blocks which were not marked as transparent are now marked as
such.
Water and other such blocks now attenuate light with the correct
intensity.
Generally changes were based on documentation in the Minecraft
Wiki: https://minecraft.gamepedia.com/Opacity#On_block_light ,
however during play-testing on vanilla lava was found not to
attenuate sky or block-light so the attenuation was removed.
This fixes #3849
* Add API documentation for IsSkylightDispersant
* Rename m_SkylightDispersant to m_IsSkylightDispersant
* Update comment for m_Transparent property of Blocks
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
When using ChunkWorx to generate multiple chunks, the server would sometimes fail an assert because it would generate a chunk even when it was successfully loaded. This was caused by chunks queued in cWorld's m_SetChunkDataQueue and thus being marked as "InQueue" although they were already loaded.
Solved by adding a new parameter to chunk coord callbacks specifying whether the operation succeeded or failed, and using that instead of the chunk presence flag to decide whether to generate or not.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
As reported by Coverity, these weren't initialized.
|
|
|
|
|
| |
This was mostly done automatically and then visually inspected for obvious errors.
All //-style comments should have a 2-space separation from the code, and 1 space after the comment sign.
|
|
|
|
| |
Indenting by spaces and alignment by spaces, as well as trailing whitespace on non-empty lines.
|
| |
|
|\
| |
| | |
Lighting reads blocktypes only for blocks under heightmap.
|
| | |
|
| |
| |
| |
| |
| |
| | |
This should theoretically speed it up, since less data is copied back and forth.
Also implemented a possibly more cache-friendly blocklight starter algorithm (PrepareBlockLight2()), is disabled by default, needs perf testing.
|
| | |
|
| | |
|
|\ \
| | |
| | |
| | |
| | | |
Conflicts:
src/Chunk.h
|
| | | |
|
|\| |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/Chunk.cpp
src/Chunk.h
|
| |/
| |
| |
| | |
Fixes #758.
|
|/ |
|
| |
|
| |
|
|
|
|
| |
This fixes problems with indeterminate class object lifespan (Lua-GC) and forgetting to disable it or keep it until ready.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|