1
0
Commit Graph

34 Commits

Author SHA1 Message Date
LogicParrot
ca6ef58b1e Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
Mattes D
9da404ea2d Fixed a race condition between chunk loader and generator.
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.
2015-10-04 14:06:37 +02:00
Mattes D
6e4122e551 Unified the doxy-comment format. 2015-07-31 16:49:10 +02:00
Samuel Barney
804805d35a Silenced and fixed many warning messages across multiple files. 2015-07-29 09:49:30 -06:00
tycho
06a74e45e2 Made cLightingThread own its callbacks 2015-05-30 11:11:17 +01:00
tycho
dae9e5792a Made -Weverything an error. 2015-05-24 12:56:56 +01:00
Kirill Kirilenko
3dc994f9dc Fixed CppCheck: (performance) Possible inefficient checking for emptiness. 2015-01-17 15:20:03 +03:00
Mattes D
c8a49a6189 LightingThread: Fixed a memory leak. 2014-12-12 14:27:19 +01:00
Mattes D
563f41af65 Lighting thread: skip chunks that are already lit. 2014-12-10 22:27:48 +01:00
Tiger Wang
a26541a7c3 En masse NULL -> nullptr replace 2014-10-22 20:12:49 -07:00
Mattes D
64fec204c4 Added initializers for class members.
As reported by Coverity, these weren't initialized.
2014-08-21 22:39:53 +02:00
madmaxoft
2423fbf2ef Normalized comments.
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.
2014-07-17 22:15:34 +02:00
madmaxoft
993fd14ddf Fixed basic whitespace problems.
Indenting by spaces and alignment by spaces, as well as trailing whitespace on non-empty lines.
2014-07-17 16:33:09 +02:00
madmaxoft
d6979ad95d Fixed GCC compilation. 2014-06-16 22:53:08 +02:00
worktycho
4fddbf9dfc Merge pull request #883 from mc-server/CutOffLighting
Lighting reads blocktypes only for blocks under heightmap.
2014-06-16 17:37:07 +01:00
madmaxoft
f7777e8c75 Added comments, reformatted code. 2014-05-29 18:25:08 +02:00
Tycho
024027db89 Renamed cChunkBuffer to cChunkData 2014-05-21 19:58:48 +01:00
Tycho
d478e3cfb1 Merge branch 'master' into chunksparsing/structs
Conflicts:
	src/Chunk.h
2014-05-10 05:05:44 -07:00
Mattes D
56ad2c2124 Lighting thread disabled its chunkstays before deleting them. 2014-05-09 18:32:03 +02:00
Tycho
57b8ee9163 Merge branch 'master' into chunksparsing/structs
Conflicts:
	src/Chunk.cpp
	src/Chunk.h
2014-04-27 06:35:27 -07:00
Tycho
e40f9d6e5b Implemented Chunk Sparsing with segments 2014-04-26 10:50:23 -07:00
madmaxoft
34cf058b02 ChunkStay must be disabled while being deleted.
Fixes #758.
2014-04-12 22:35:04 +02:00
madmaxoft
5bc5272a4e Fixed member construction order. 2014-04-12 00:24:35 +02:00
madmaxoft
8bcb176a19 Lighting reads blocktypes only for blocks under heightmap.
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.
2014-04-12 00:04:50 +02:00
Tycho
2eca30aebc Removed Some unnessicary macros 2014-03-10 11:34:20 -07:00
andrew
d73cdba1f6 g_BlockXXX => cBlockInfo::XXX 2014-03-01 21:34:19 +02:00
madmaxoft
9cebc9157c Rewritten Lua ChunkStay API into a single function, cWorld:ChunkStay().
This fixes problems with indeterminate class object lifespan (Lua-GC) and forgetting to disable it or keep it until ready.
2014-02-10 22:47:10 +01:00
madmaxoft
cf48968835 Moved a forgotten comment back to its place. 2014-02-08 22:35:45 +01:00
madmaxoft
df0ecc6c07 Fixed lighting thread queueing. 2014-02-08 22:33:42 +01:00
madmaxoft
ea71bfa9b6 Initial ChunkStay code. 2014-02-08 21:55:21 +01:00
madmaxoft
39a1bcdea0 More MSVC warning fixes. 2014-01-07 17:07:49 +01:00
Tycho Bickerstaff
8e7e990cfe fixed warnings in LightingThread.cpp 2013-12-31 09:16:43 +01:00
Tycho Bickerstaff
3da41de553 take Z axis into account when calculating neighboors in LightingThread::ChunkReady 2013-12-31 09:16:43 +01:00
Alexander Harkness
675b4aa878 Moved source to src 2013-11-24 14:19:41 +00:00