1
0
Fork 0
Commit Graph

18 Commits

Author SHA1 Message Date
Tiger Wang 225c2fa9f6 Always use relative coordinates in AddBlock
+ Pass block, use relatives
* Fixes everything immediately converting abs back to rel and getting block, when these data were already available
2020-08-02 15:52:06 +01:00
Tiger Wang 99856df686 Add WakeUp/AddBlock distinction
* WakeUp is for singular changes (block breaking for example). The simulator should check blocks around the position and discover other affected blocks as it sees fit
* AddBlock is for when you know a whole area is to be updated; chunk loading, or area wakeups for example
+ Prepares for correct handling of destroyed blocks after removal of SolidBlockHandler in the redstone simulator
2020-08-02 15:52:06 +01:00
Tiger Wang 4e5ab02a58 Use SimulateChunk in redstone simulator
+ Improved performance, reduces bottleneck in chunkmap lookup
* Stop allocating and throwing away lots of small vectors in Update/GetValidSourcePositions return values
- Remove unused GetPowerLevel virtual
2020-07-26 14:16:46 +01:00
Mattes D 9ee47e5999 Using Super. 2020-04-16 20:07:48 +00:00
Lane Kolbly 7bdbfad1bb Changed int parameters to vector parameters in cCuboid and simulators (#3874) 2017-08-17 15:48:38 +02:00
LogicParrot ca6ef58b1e Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
Tiger Wang 5b62c4c314 Reorganised the redstone simulator
-> Many thanks to @worktycho for the idea, and @Haxi52 for the implementation plan!
* Uses classes and inheritance now
* Speed should be improved
2015-12-18 13:17:38 +00:00
Tycho 2a9664d6ca Initial convertion of a_Dt to std::chrono
also refactored cWorld::m_WorldAge and cWorld::m_TimeOfDay
2015-01-11 21:12:26 +00:00
Tiger Wang 85c298d73e Cleaned up simulators 2014-10-25 21:54:00 +01:00
Tiger Wang a26541a7c3 En masse NULL -> nullptr replace 2014-10-22 20:12:49 -07:00
Tycho f6979642e6 Use factory method to construct redstone simulator data 2014-09-28 15:36:00 +01:00
Tycho 0b044e1c83 Possibly decoupled IncrementalRedstoneSimulator from the rest of the server
THis wil hopefully allow for unit testing
2014-09-11 17:48:21 +01:00
madmaxoft 93d29555e5 Style: Normalized to no spaces before closing parenthesis. 2014-07-21 17:40:43 +02:00
madmaxoft 5e198c6730 Basic style fixes. 2014-07-17 22:50:58 +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
STRWarrior 3a897844a0 Renamed cRedstoneManager to cRedstoneSimulator and renamed cRedstoneSimulator to cIncrementalRedstoneSimulator (Might change later). 2014-02-07 22:59:08 +01:00
STRWarrior 09a23fa114 Fixed some end of lines 2014-02-07 22:25:15 +01:00
STRWarrior 176664810b Implemented an easy way of adding new redstone simulators.
Also added a "noop" redstone simulator that does the same as the fluid version.
2014-02-07 22:13:55 +01:00