summaryrefslogtreecommitdiffstats
path: root/src/SetChunkData.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Limit the size of cListAllocationPool's free listpeterbell102019-02-201-1/+1
|
* Add a formatting function for Vector3 (#4282)peterbell102018-09-241-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
* CheckBasicStyle: Check number of empty lines between functions (#4267)peterbell102018-07-261-1/+0
| | | | Add check for number of empty lines between functions and fix the corresponding failures
* Optimise chunk set (#4260)peterbell102018-07-231-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
* Changed entity ownership model to use smart pointersTiger Wang2017-08-071-0/+1
|
* Store cChunk::m_BlockEntities in a map (#3717)peterbell102017-05-221-10/+8
| | | | | | * Store block entities in a map from block index * Cleanup ForEachBlockEntity * Cleanup DoWithBlockEntityAt
* Bulk clearing of whitespaceLogicParrot2016-02-051-4/+4
|
* Merge pull request #1945 from Woazboat/CodeCleanup_refactoredMattes D2015-05-081-1/+1
|\ | | | | Small code cleanup - clean version
| * Tracer::signum function now returns intWoazboat2015-05-081-1/+1
| | | | | | | | | | | | convert c style casts to c++ static casts Changed fabs() to std::abs()
* | Revert "Small code cleanup"worktycho2015-05-051-2/+5
| |
* | convert c style casts to c++ static castsWoazboat2015-04-281-1/+1
|/
* Removed redundant temp iterator. std::list.erase already returnsWoazboat2015-04-271-4/+1
| | | | iterator to next valid list element
* cSetChunkData constructor explicitly requires std::move() instead ofWoazboat2015-04-271-4/+4
| | | | unsafely stealing data
* Fixed CppCheck: (performance) Prefer prefix ++/-- operators for non-primitive types.Kirill Kirilenko2015-01-171-1/+1
|
* En masse NULL -> nullptr replaceTiger Wang2014-10-231-5/+5
|
* Fixed loading empty chunks.Mattes D2014-09-051-1/+0
| | | | Reported on the Dropper map in #1307.
* Delete the entity before removing from the listworktycho2014-08-311-1/+1
| | | Old code was calling dereference on invalid iterator
* Rewritten block entity loading.Mattes D2014-08-291-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.
* cSetChunkData: Added missing initializers.Mattes D2014-08-211-0/+3
|
* Added a queue for setting chunk data.madmaxoft2014-07-241-0/+115
Fixes #1196.