summaryrefslogtreecommitdiffstats
path: root/src/SetChunkData.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Manage block entity lifetime with unique_ptr (#4080)peterbell102020-04-031-0/+1
|
* Optimise chunk set (#4260)peterbell102018-07-231-19/+6
| | | | | | | | | | | | | | | | | Closes #1244 Initially I was just going to add the cChunkData to cSetChunkData but profiling revealed that the copying wasn't even the biggest slowdown. Much more time was being spent in cChunk::CreateBlockEntities and cChunk::WakeUpSimulators than was in memcpy so I've made those significantly faster as well. Optimisations performed: * cSetChunkData now stores blocks in a cChunkData object * cChunkData objects can now perform moves even if they are using different pools * cChunk::CreateBlockEntities now iterates in the correct order and only over present chunk sections * Similarly for cChunk::WakeUpSimulators * cSetChunkData::CalculateHeightMap now shortcuts to the highest present chunk section before checking blocks directly
* Changed entity ownership model to use smart pointersTiger Wang2017-08-071-8/+0
|
* Remove smart pointer macrospeterbell102017-07-211-1/+1
|
* Store cChunk::m_BlockEntities in a map (#3717)peterbell102017-05-221-4/+4
| | | | | | * Store block entities in a map from block index * Cleanup ForEachBlockEntity * Cleanup DoWithBlockEntityAt
* Bulk clearing of whitespaceLogicParrot2016-02-051-16/+16
|
* cSetChunkData constructor explicitly requires std::move() instead ofWoazboat2015-04-271-4/+6
| | | | unsafely stealing data
* En masse NULL -> nullptr replaceTiger Wang2014-10-231-1/+1
|
* Rewritten block entity loading.Mattes D2014-08-291-0/+3
| | | | | | Block entities are now loaded based on the blocktype at the coords they specify; before loading, their type ("id" NBT tag) is checked. The chunk now expects that all block entities given to it via cChunk::SetAllData() have their valid blocktype; asserts if they don't. Fixes #1354.
* Added a queue for setting chunk data.madmaxoft2014-07-241-0/+120
Fixes #1196.