summaryrefslogtreecommitdiffstats
path: root/src/LightingThread.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Removed all Printf-family functions from StringUtils.Mattes D2023-05-161-4/+4
| | | | | 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.
* syntaxTiger Wang2022-01-141-1/+1
|
* fixed compile error in jenkins and more warningsx12xx12x2022-01-141-1/+1
|
* Fix Windows XP to 7 compatibility (#5167)Tiger Wang2021-03-281-1/+1
| | | | | * Partially reverts 01a4e696b * Unify thread names - Remove use of GetThreadId API
* Prepare ChunkData for BlockState storage (#5105)Tiger Wang2021-03-051-10/+10
| | | | | | | | | | | | | | | | | | | | | | | * 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>
* Using Super.Mattes D2020-04-161-2/+2
|
* Pulled the BlockID and BlockInfo headers from Globals.h. (#4591)Mattes D2020-04-031-0/+28
| | | | | | | | | 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
* NBTChunkSerializer: Cleaned up interface.Mattes D2019-09-241-1/+1
| | | | | | Removed dependency on cChunkDataCallback. Moved all the serializing code into a worker class. Changed the serialization into a single-call action.
* Separated chunk generator from world / plugin interfaces.Mattes D2019-09-061-2/+2
| | | | The generator now only takes care of servicing synchronous "GetChunk(X, Y)" and "GetBiomes(X, Y)" requests.
* CheckBasicStyle: Check number of empty lines between functions (#4267)peterbell102018-07-261-2/+0
| | | | Add check for number of empty lines between functions and fix the corresponding failures
* cIsThread: Reset m_ShouldTerminate after the thread has stopped (#4258)peterbell102018-07-221-1/+1
| | | | | This allows threads to be restarted after stopping. Fixes #4257
* cLightingThread: Faster chunk reading (#4185)peterbell102018-02-211-12/+23
| | | | Profiled at a 10x speedup for cLightingThread::ReadChunks.
* cWorld Threads: Seperate initialization and thread start.peterbell102017-10-211-20/+6
| | | | Prevents nullptr dereferences before Start has been called.
* Lighting now generally consistent with vanilla (#3988)Alexander Harkness2017-09-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Removed double includes (#3885)Lukas Pioch2017-08-021-1/+0
|
* Lighting Optimisations (#3785)peterbell102017-06-201-69/+23
|
* Fixed skylight going down through transparent blocks.Mattes D2017-06-091-1/+12
|
* Bulk clearing of whitespaceLogicParrot2016-02-051-30/+30
|
* Fixed a race condition between chunk loader and generator.Mattes D2015-10-041-3/+3
| | | | | | 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.
* Unified the doxy-comment format.Mattes D2015-07-311-1/+1
|
* Silenced and fixed many warning messages across multiple files.Samuel Barney2015-07-291-12/+12
|
* Made cLightingThread own its callbackstycho2015-05-301-4/+4
|
* Made -Weverything an error.tycho2015-05-241-3/+3
|
* Fixed CppCheck: (performance) Possible inefficient checking for emptiness.Kirill Kirilenko2015-01-171-1/+1
|
* LightingThread: Fixed a memory leak.Mattes D2014-12-121-2/+2
|
* Lighting thread: skip chunks that are already lit.Mattes D2014-12-101-0/+10
|
* En masse NULL -> nullptr replaceTiger Wang2014-10-231-4/+4
|
* Added initializers for class members.Mattes D2014-08-211-1/+5
| | | | As reported by Coverity, these weren't initialized.
* Normalized comments.madmaxoft2014-07-171-2/+2
| | | | | 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.
* Fixed basic whitespace problems.madmaxoft2014-07-171-1/+1
| | | | Indenting by spaces and alignment by spaces, as well as trailing whitespace on non-empty lines.
* Fixed GCC compilation.madmaxoft2014-06-161-1/+1
|
* Merge pull request #883 from mc-server/CutOffLightingworktycho2014-06-161-14/+78
|\ | | | | Lighting reads blocktypes only for blocks under heightmap.
| * Fixed member construction order.madmaxoft2014-04-121-2/+2
| |
| * Lighting reads blocktypes only for blocks under heightmap.madmaxoft2014-04-121-14/+78
| | | | | | | | | | | | 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.
* | Added comments, reformatted code.madmaxoft2014-05-291-1/+1
| |
* | Renamed cChunkBuffer to cChunkDataTycho2014-05-211-1/+1
| |
* | Merge branch 'master' into chunksparsing/structsTycho2014-05-101-0/+2
|\ \ | | | | | | | | | | | | Conflicts: src/Chunk.h
| * | Lighting thread disabled its chunkstays before deleting them.Mattes D2014-05-091-0/+2
| | |
* | | Merge branch 'master' into chunksparsing/structsTycho2014-04-271-0/+1
|\| | | | | | | | | | | | | | | | | Conflicts: src/Chunk.cpp src/Chunk.h
| * | ChunkStay must be disabled while being deleted.ProtoProxy_1.7.2_001madmaxoft2014-04-121-0/+1
| |/ | | | | | | Fixes #758.
* / Implemented Chunk Sparsing with segmentsTycho2014-04-261-7/+4
|/
* Removed Some unnessicary macrosTycho2014-03-101-6/+0
|
* g_BlockXXX => cBlockInfo::XXXandrew2014-03-011-2/+2
|
* Rewritten Lua ChunkStay API into a single function, cWorld:ChunkStay().madmaxoft2014-02-101-1/+13
| | | | This fixes problems with indeterminate class object lifespan (Lua-GC) and forgetting to disable it or keep it until ready.
* Moved a forgotten comment back to its place.madmaxoft2014-02-081-2/+2
|
* Fixed lighting thread queueing.madmaxoft2014-02-081-2/+4
|
* Initial ChunkStay code.madmaxoft2014-02-081-79/+72
|
* More MSVC warning fixes.madmaxoft2014-01-071-1/+1
|
* fixed warnings in LightingThread.cppTycho Bickerstaff2013-12-311-0/+1
|
* take Z axis into account when calculating neighboors in LightingThread::ChunkReadyTycho Bickerstaff2013-12-311-1/+1
|
* Moved source to srcAlexander Harkness2013-11-241-0/+562