1
0
Commit Graph

21 Commits

Author SHA1 Message Date
Mattes D
9ee47e5999 Using Super. 2020-04-16 20:07:48 +00:00
Mattes D
01b8ed5295
Pulled the BlockID and BlockInfo headers from Globals.h. (#4591)
The BlockID.h file was removed from Globals.h and renamed to BlockType.h (main change)
The BlockInfo.h file was removed from Globals.h (main change)
The ENUM_BLOCK_ID and ENUM_ITEM_ID enum names were replaced with ENUM_BLOCK_TYPE and ENUM_ITEM_TYPE (cosmetics)
The various enums, such as eDimension, eDamageType and eExplosionSource were moved from BlockType.h to Defines.h, together with the helper functions for converting between them and strings (StringToDimension et al.) (minor)
Many inline functions were moved from headers to their respective cpp files, so that BlockType.h could be included only into the cpp file, rather than the header.
That broke our tests a bit, since they pick bits and pieces out of the main code and provide stubs for the rest; they had to be re-stubbed and re-verified.
eMonsterType values are no longer tied to E_ITEM_SPAWN_EGG_META_* values
2020-04-03 08:57:01 +02:00
peterbell10
c54bf40ef9 cWorld Threads: Seperate initialization and thread start.
Prevents nullptr dereferences before Start has been called.
2017-10-21 19:33:22 +02:00
peterbell10
759618b035 Remove double includes part 2 (#3890) 2017-08-03 15:34:19 +02:00
peterbell10
fbe17a4e8a Lighting Optimisations (#3785) 2017-06-20 09:28:33 +02:00
Lukas Pioch
e35ac1bfb9 Clang 5.0 fixes
- Added override keyword
- Removed inherited member variables
2017-05-21 12:19:06 +02:00
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
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
Tiger Wang
a26541a7c3 En masse NULL -> nullptr replace 2014-10-22 20:12:49 -07: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
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
madmaxoft
1b78bef4b3 Removed unneeded asserts. 2014-04-03 09:38:29 +02:00
madmaxoft
a5c0600e6c Fixed a few clang warnings. 2014-03-30 20:02:30 +02:00
andrew
d73cdba1f6 g_BlockXXX => cBlockInfo::XXX 2014-03-01 21:34:19 +02:00
Tycho
462e0bcf46 fixed globals.h warnings 2014-02-23 12:23:35 -08: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
ea71bfa9b6 Initial ChunkStay code. 2014-02-08 21:55:21 +01:00
madmaxoft
ffd2caea66 Fixed compiler warnings in LightingThread.cpp. 2013-12-01 14:04:17 +01:00
Alexander Harkness
675b4aa878 Moved source to src 2013-11-24 14:19:41 +00:00