summaryrefslogtreecommitdiffstats
path: root/src/SetChunkData.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-08-01Replaced cpp14::make_unique<> with std::make_unique<>.Mattes D1-1/+1
2020-04-03Manage block entity lifetime with unique_ptr (#4080)peterbell101-2/+1
2019-02-20Limit the size of cListAllocationPool's free listpeterbell101-1/+1
2018-09-24Add a formatting function for Vector3 (#4282)peterbell101-4/+4
* Vector3: Add custom fmt compatible formatter. * cLuaState: Add fmt version of ApiParamError * Use vector formatting in manual bindings * Always log vectors with FLOG
2018-07-26CheckBasicStyle: Check number of empty lines between functions (#4267)peterbell101-1/+0
Add check for number of empty lines between functions and fix the corresponding failures
2018-07-23Optimise chunk set (#4260)peterbell101-23/+33
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
2017-08-07Changed entity ownership model to use smart pointersTiger Wang1-0/+1
2017-05-22Store cChunk::m_BlockEntities in a map (#3717)peterbell101-10/+8
* Store block entities in a map from block index * Cleanup ForEachBlockEntity * Cleanup DoWithBlockEntityAt
2016-02-05Bulk clearing of whitespaceLogicParrot1-4/+4
2015-05-08Tracer::signum function now returns intWoazboat1-1/+1
convert c style casts to c++ static casts Changed fabs() to std::abs()
2015-05-05Revert "Small code cleanup"worktycho1-2/+5
2015-04-28convert c style casts to c++ static castsWoazboat1-1/+1
2015-04-27Removed redundant temp iterator. std::list.erase already returnsWoazboat1-4/+1
iterator to next valid list element
2015-04-27cSetChunkData constructor explicitly requires std::move() instead ofWoazboat1-4/+4
unsafely stealing data
2015-01-17Fixed CppCheck: (performance) Prefer prefix ++/-- operators for non-primitive types.Kirill Kirilenko1-1/+1
2014-10-23En masse NULL -> nullptr replaceTiger Wang1-5/+5
2014-10-20En masse NULL -> nullptr replaceTiger Wang1-5/+5
2014-09-05Fixed loading empty chunks.Mattes D1-1/+0
Reported on the Dropper map in #1307.
2014-08-31Delete the entity before removing from the listworktycho1-1/+1
Old code was calling dereference on invalid iterator
2014-08-29Rewritten block entity loading.Mattes D1-0/+33
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.
2014-08-21cSetChunkData: Added missing initializers.Mattes D1-0/+3
2014-07-24Added a queue for setting chunk data.madmaxoft1-0/+115
Fixes #1196.