summaryrefslogtreecommitdiffstats
path: root/src/Simulator/FireSimulator.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2022-06-18Additional Y height checks (#5405)Debucquoy Anthony tonitch1-4/+11
For redstone wire, block area bindings, and fire simulator. Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
2022-04-20Updated protocol functions to Vector3xx12xx12x1-2/+2
also added support in included functions
2021-03-07Some emplace_back replacements (#5149)12xx121-1/+1
* replace push_back with emplace_back when a new object was created in the function call
2021-01-11Convert most calls to blocking GetHeight/GetBiomeAt to direct chunk accessesTiger Wang1-5/+8
* Hopefully fixes #5094
2020-08-02Always use relative coordinates in AddBlockTiger Wang1-20/+5
+ Pass block, use relatives * Fixes everything immediately converting abs back to rel and getting block, when these data were already available
2020-08-02Add WakeUp/AddBlock distinctionTiger Wang1-1/+1
* 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-05-31Fire sim: Handle fuel block being destroyed (#4751)peterbell101-9/+25
2020-05-10Cleanup some workarounds and warnings (#4735)peterbell101-12/+3
* Cleanup thread_local usage in FastRandom * Use constexpr to avoid clang warning * Fix more Wglobal-constructor warnings * Make MSVC happy?
2020-04-03Pulled the BlockID and BlockInfo headers from Globals.h. (#4591)Mattes D1-0/+1
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-03-22TNT position fixes (#4519)Mat1-1/+1
* TNT position fixes * Don't add offset to explosion spawn coords * Don't make other entities push TNT * Correct initial TNT speed * Fix typo * Improvements * Revert unwanted change * Style fixes * Update format
2019-10-28Moved growing from cWorld / cChunk to cBlockHandler descendants.Mattes D1-69/+51
2019-10-16Refactored block-to-pickup conversion. (#4417)Mattes D1-6/+6
2018-09-24Add a formatting function for Vector3 (#4282)peterbell101-13/+11
* Vector3: Add custom fmt compatible formatter. * cLuaState: Add fmt version of ApiParamError * Use vector formatting in manual bindings * Always log vectors with FLOG
2018-08-29Force all headers other than "Globals.h" to be included with relative paths (#4269)peterbell101-1/+1
Closes #4236 CMake now creates a header file in the build directory under the path "include/Globals.h" which just includes "src/Globals.h" with an absolute path. Then instead of adding "src/" to the include directories, it adds "include/". #include "Globals.h" still works by including the build generated file and any other src-relative path will not work.
2018-01-03Add the fmt library (#4065)peterbell101-8/+9
* Replaces AppendVPrintf with fmt::sprintf * fmt::ArgList now used as a type safe alternative to varargs. * Removed SIZE_T_FMT compatibility macros. fmt::sprintf is fully portable and supports %zu. * Adds FLOG functions to log with fmt's native formatting style.
2017-12-26improve rain simulation (#4017)Alexander Harkness1-22/+45
* Uses vanilla logic to decide which blocks rain falls through. * Rain falls infinitely above the world, and stops at y=0. * Entities will now be extinguished if they are under rain-blocking blocks, and fire will now be extinguished by rain similarly. * Create IsWeatherWetAtXYZ to identify wetness at a particular location. * Use new code for enderman rain detection. * Fixes issue #916 * Disable warnings for global constructors in the fire simulator.
2017-09-07Changed some int parameters to vector parameters (#3937)Bond-0091-6/+6
2017-08-17Changed int parameters to vector parameters in cCuboid and simulators (#3874)Lane Kolbly1-7/+7
2017-08-03Remove double includes part 2 (#3890)peterbell101-1/+0
2017-07-21Increment fire block iteratorTiger Wang1-0/+1
* Resolves potential deadlock
2017-06-13FastRandom rewrite (#3754)peterbell101-3/+3
2016-02-05Bulk clearing of whitespaceLogicParrot1-11/+11
2015-07-29Silenced and fixed many warning messages across multiple files.Samuel Barney1-5/+5
2015-07-14Improved mapsTiger Wang1-2/+2
2015-03-20Correct world height validations.Tommy Santerre1-1/+1
Unify the way we test block above the current one (Height - 1 instead of a_RelY + 1). Allow generation of world of flat height = 255
2015-01-18Fixed type conversion warnings.Mattes D1-1/+1
2015-01-11Initial convertion of a_Dt to std::chronoTycho1-2/+2
also refactored cWorld::m_WorldAge and cWorld::m_TimeOfDay
2014-10-23En masse NULL -> nullptr replaceTiger Wang1-2/+2
2014-10-20En masse NULL -> nullptr replaceTiger Wang1-2/+2
2014-10-15Functions in cPluginManager get references instead of pointers.Mattes D1-2/+2
2014-09-11Added blocks to the fire simulatorMasy981-0/+11
2014-08-01Added missing HOOK_BLOCK_SPREAD call.Howaner1-6/+14
2014-07-21Style: Normalized spaces after if, for and while.madmaxoft1-1/+1
2014-07-19Fixed style: spaces after commas.madmaxoft1-1/+1
2014-07-17Basic style fixes.madmaxoft1-2/+2
2014-07-17Normalized comments.madmaxoft1-1/+1
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-04-26Implemented Chunk Sparsing with segmentsTycho1-4/+6
2014-04-18Did some static analysis, fixed some bugs and optimized a lot of codejfhumann1-1/+1
2014-03-28Fixed compilation after last PR merge.madmaxoft1-1/+1
2014-03-27Change SpreadSource prefix to ssHowaner1-1/+1
2014-03-27Add SpreadSourceHowaner1-1/+1
2014-03-27Add HOOK_BLOCK_SPREADHowaner1-3/+11
2014-03-10Fixed compileTiger Wang1-1/+2
2014-03-09Removed uneeded meta obtainTiger Wang1-3/+1
2014-03-09TNT explodes when consumed by fireTiger Wang1-6/+19
Fixed FS#406
2014-03-01g_BlockXXX => cBlockInfo::XXXandrew1-1/+1
2014-02-28Fix Double Slabs, fix Slab Meta and add more things to burnableHowaner1-0/+13
2014-02-20Add Hay Bale to BurnableHowaner1-0/+1
2013-12-20Fixed compiler warning when iterating over a fixed array of items (ARRAYCOUNT).madmaxoft1-3/+3
2013-12-05Merged if statements.Samuel Barney1-7/+1
2013-12-04Made suggested changesSamuel Barney1-5/+10
2013-12-02Fire no longer goes out when on top of nether rackSamuel Barney1-1/+6
2013-11-24Moved source to srcAlexander Harkness1-0/+0
2013-10-09Fixed warning in cFireSimulator.madmaxoft1-13/+8
All code paths now have a return value.
2013-09-30Fixed issuesTiger Wang1-2/+2
2013-09-30Fixed a fire simulator bugTiger Wang1-6/+18
Fire now doesn't stay when it isn't on a flammable block. Fixes the "fire creates chandeliers" bug in report #131
2013-07-22Simulators don't simulate in invalid chunks (valgrind error)madmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1676 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-03Simulators now check if they are given a valid chunkmadmaxoft@gmail.com1-0/+5
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1244 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-01New fire simulator, fully rewritten to the new scheme of things, directly accessing chunk data.madmaxoft@gmail.com1-71/+256
http://forum.mc-server.org/showthread.php?tid=617&pid=6626#pid6626 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1233 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-28Converted simulators to take cWorld reference instead of a pointermadmaxoft@gmail.com1-19/+23
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1228 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-28Simulators now have direct access to the cChunk object in the WakeUp() callmadmaxoft@gmail.com1-1/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1227 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-16Removed all E_ITEM_ symbols equivalent to E_BLOCK_, and all obsolete item and block symbols.madmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1218 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-14Initial Floody fluid simulator.madmaxoft@gmail.com1-23/+17
Can spread, cannot dry. git-svn-id: http://mc-server.googlecode.com/svn/trunk@963 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-13Preparation for multiple fluid simulators.madmaxoft@gmail.com1-6/+51
Moved all simulators into a subfolder. Replaced cWaterSimulator and cLavaSimulator with a generic cFluidSimulator. Moved original fluid simulation into cClassicFluidSimulator. Fluid simulator parameters (MaxHeight, Falloff) are read from the world.ini file (can have nether-like lava with lower falloff) git-svn-id: http://mc-server.googlecode.com/svn/trunk@956 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-03Moved blockticking into blockhandler classes.madmaxoft@gmail.com1-16/+16
Also slightly refactored the variable / argument names (BlockID is deprecated, use BlockType instead) git-svn-id: http://mc-server.googlecode.com/svn/trunk@921 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-30Added falling block entities. Sand and gravel now properly fall downfaketruth1-4/+4
Implemented the PACKET_SPAWN_OBJECT packet Made some things use BLOCKTYPE instead of char Android: Requests WebAdmin port when pressing the configure button git-svn-id: http://mc-server.googlecode.com/svn/trunk@915 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-24Source files cleanup: The rest of the files renamed.madmaxoft@gmail.com1-2/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@887 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-12http://www.mc-server.org/support/index.php?do=details&task_id=153lapayo94@gmail.com1-2/+3
+ simple code improvements git-svn-id: http://mc-server.googlecode.com/svn/trunk@656 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-14Attempt to bring sanity to newlines across systems.cedeel@gmail.com1-131/+131
git-svn-id: http://mc-server.googlecode.com/svn/trunk@606 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-05-25Merged the composable_generator branch into the trunkmadmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@504 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-14Fixed the same leak in FireSimulatorfaketruth1-15/+14
git-svn-id: http://mc-server.googlecode.com/svn/trunk@253 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-01-29VC2008 / VC2010: Enabled precompiled header through Globals.h; the header included in every module in the project. Compilation optimization.madmaxoft@gmail.com1-1/+3
git-svn-id: http://mc-server.googlecode.com/svn/trunk@188 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-29- water slacks fire nowlapayo94@gmail.com1-2/+9
- Bug which caused lava to disappear is fixed git-svn-id: http://mc-server.googlecode.com/svn/trunk@152 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-28- implemented the fire simulation in native c++ (cFireSimulator)lapayo94@gmail.com1-0/+124
- Changed the Durationsystem for Items. cPlayer::UseEquippedItem calls cItem::DamageItem this function damages the item if it has a duration. (needed the duration also in another place so this saves code ;)) - added some other burning blocks - the mobtypes for the settings.ini which i must have forgotten in the last commit git-svn-id: http://mc-server.googlecode.com/svn/trunk@150 0a769ca7-a7f5-676a-18bf-c427514a06d6