1
0
Fork 0
Commit Graph

37 Commits

Author SHA1 Message Date
peterbell10 31a11a6df4
Optimise chunk set (#4260)
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
2018-07-23 19:12:51 +01:00
peterbell10 2df14a0496
cChunk and cChunkData: Use vectors for block get and set functions (#4172)
* cChunkData: Change interface to use Vector3i
* cChunk: Add Vector3i overloads for bounded block get and set functions.
2018-02-04 22:15:31 +00:00
peterbell10 447d929da1 Implement anvil chunk sparsing 2017-08-26 20:56:44 +02:00
peterbell10 096cdac80d Implement protocol level chunk sparsing (#3864) 2017-08-21 17:56:53 +01:00
LogicParrot 77bf00a599 Out of world blocks are now always considered air blocks 2016-04-23 09:54:34 +03:00
LogicParrot ca6ef58b1e Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
Samuel Barney 804805d35a Silenced and fixed many warning messages across multiple files. 2015-07-29 09:49:30 -06:00
worktycho 45fa2d98db Fixed Bug in cChunkData.
FIxed a bug where if the index was not aligned with the sections empty sections would not be set in the correct location.
2015-03-10 20:32:01 +00:00
Tiger Wang a26541a7c3 En masse NULL -> nullptr replace 2014-10-22 20:12:49 -07:00
Tycho ee50790398 Merge branch 'master' of github.com:mc-server/MCServer 2014-06-16 15:12:50 +01:00
Tiger Wang d5649df326 Further improvements on redstone speed
Based on suggestions of @worktycho
* Repeaters now walk their data structure only when needed
* Fixed a bug with cChunkData returning an incorrect value for whether a
meta had changed
2014-06-07 10:39:36 +01:00
Tiger Wang 8e57f75622 Fixed #1057 2014-06-04 09:21:44 +01:00
Tycho f26ddac619 removed NULL assignment to const value 2014-05-30 14:50:30 +01:00
Tycho d854d3af1c removed unneded addressof 2014-05-30 14:43:33 +01:00
madmaxoft e136f6e0f5 Fixed cChunkData nibble copying. 2014-05-30 11:35:29 +02:00
madmaxoft 5368c5dd79 Fixed sign comparison. 2014-05-30 09:49:57 +02:00
madmaxoft 0e2138736c Fixed wrong copy sizes in cChunkData. 2014-05-30 09:17:17 +02:00
madmaxoft 8c4dd5dcfd Attempt at fixing an unresolved symbol in gcc / clang. 2014-05-29 21:41:44 +02:00
worktycho be10f07db0 Fix bug when a_Idx is not a multiple of SectionBLockCount 2014-05-29 19:44:36 +01:00
worktycho 901e3ec494 Derp 2014-05-29 19:35:47 +01:00
worktycho b50181e361 fix underflow
Wish c++ could specify saturating unsigned underflow.
2014-05-29 19:29:06 +01:00
madmaxoft 59068b77b7 Fixed wrong block sizes for copying / setting. 2014-05-29 20:21:39 +02:00
worktycho 0cfee5d141 Fixed Wrong types in nibble sizeofs 2014-05-29 19:10:35 +01:00
worktycho 80fe19c0e2 Fixed overflow bug 2014-05-29 17:41:07 +01:00
madmaxoft f7777e8c75 Added comments, reformatted code. 2014-05-29 18:25:08 +02:00
madmaxoft 999662503a Fixed forgotten changes. 2014-05-29 09:09:11 +02:00
madmaxoft 81f756cbda cChunkData: Normalized code style. 2014-05-28 22:40:19 +02:00
madmaxoft 7ec44951a0 Fixed cChunkData formatting. 2014-05-28 16:34:25 +02:00
Tycho 19df18c461 Fixed test globals to work with precompiled headers 2014-05-27 12:46:22 +01:00
Tycho 944d29c0ae inject TestGlobals.h correctly 2014-05-24 14:09:51 +01:00
Tycho 7fac63cffb Moved accessors to cpp file 2014-05-24 13:37:25 +01:00
Tycho 8f964886e0 Implemented style changes 2014-05-24 13:33:40 +01:00
Tycho 4b23472097 Fixed if spaces 2014-05-21 21:46:20 +01:00
Tycho 88c61a2e96 Fixed reversed comparisons to null 2014-05-21 21:18:14 +01:00
Tycho 93c0dcb1fe Added space to ChunkData.cpp 2014-05-21 20:26:43 +01:00
Tycho 5929ffbc40 Fixed stylistic issues 2014-05-21 20:08:34 +01:00
Tycho 024027db89 Renamed cChunkBuffer to cChunkData 2014-05-21 19:58:48 +01:00