summaryrefslogtreecommitdiffstats
path: root/src/Simulator (unfollow)
Commit message (Collapse)AuthorFilesLines
2014-06-16FIxed second weird enumTycho1-20/+1
2014-06-16Refactored reversing logic into seperate functionTycho1-14/+3
2014-06-16Fixed tigers weird enumsTycho1-14/+6
2014-06-16Merge branch 'master' of github.com:mc-server/MCServerTycho1-8/+30
2014-06-16Moved repeater handling to seperate passTycho2-97/+64
2014-06-15Fixed bad comparison crashTiger Wang1-2/+2
* Fixes #1095
2014-06-15Fixed daylight sensor unpoweringTiger Wang1-6/+28
* Fixes #1094
2014-06-14Fixed a repeater issueTiger Wang2-17/+16
* Repeaters now properly continuously update their powering * Minor cosmetic improvements
2014-06-12Fixed two redstone bugsTiger Wang1-0/+6
* Fixed chunk border powering * Fixed quick place-replace powering
2014-06-08Fixed deadlock when moving players to other worlds.Mattes D1-1/+1
Fixes #1039, fixes #851
2014-06-07Further improvements on redstone speedTiger Wang2-67/+80
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-06Further reduced redstone idle CPU consumptionTiger Wang1-7/+27
* Repeaters and wires are no longer unnecessarily ticked * Fixed #1063, likely addressed #1062 * Fixed bugs regarding duplicate values
2014-06-05Redstone fixes and improvements [SEE DESC]Tiger Wang1-60/+87
Haha, see desc. * Improved redstone speed through a marking dirty system. Only a select few devices are still continuously simulated * Fixed redstone crashing with recent piston changes
2014-06-04Update IncrementalRedstoneSimulator.cppJulian Laubstein1-8/+8
2014-05-29Add SetOpen() and IsOpen() to BlockDoor.h and fix door redstone bug.Howaner1-4/+10
2014-05-29Fixed piston power checkingTiger Wang1-11/+6
2014-05-25Hopefully fixed piston duplication issuesTiger Wang1-5/+4
* Fixes #879 * Fixes #714
2014-05-19Fixed warnings in IncrementalRedstoneSimulatorJulian Laubstein1-1/+7
2014-05-19Rolled some changes backJulian Laubstein1-12/+2
2014-05-19Fixed some warningsJulian Laubstein1-2/+12
2014-05-09Fixed MSVC 64-bit build warnings.Mattes D2-2/+2
2014-05-08Fixed MSVC 64-bit build warnings.Mattes D2-2/+2
2014-05-07Fixed wires powering wires diagonally below themTiger Wang1-5/+1
2014-05-05Add clicks, exp subtraction, item check, ...Howaner1-0/+4
2014-05-05Fixed formattingTiger Wang1-4/+5
2014-05-04Fixed 027efe09ea3d3222c3cbf169643e57773c1614aeTiger Wang1-3/+49
2014-05-04Fixed lever and button powering directionTiger Wang1-16/+8
2014-05-04Fixed pressure plate oversightsTiger Wang1-2/+8
* Fixed stone pressure plates not checking for the correct distance for players * Fixed pressure plates in general not link powering the blocks beneath them
2014-05-03Fixed vanilla fluid simulator.madmaxoft1-4/+1
Fixes #919.
2014-05-02Fixed vanilla fluid simulator.madmaxoft4-14/+20
Fixes #919.
2014-04-27Redstone simulator now directly accesses cChunkTiger Wang2-438/+556
* Redstone simulator performance improvements * Added return values to some functions * Minor fixes
2014-04-26Implemented Chunk Sparsing with segmentsTycho1-4/+6
2014-04-25Cmake generated projects for IDEs include headers in project files.archshift1-0/+1
2014-04-18Did some static analysis, fixed some bugs and optimized a lot of codejfhumann2-2/+2
2014-04-18Removed unsupported C++11 features.madmaxoft1-13/+19
2014-04-17Compile fix?Tiger Wang1-2/+2
2014-04-17Implemented weighted pressure platesTiger Wang2-29/+171
2014-04-15Rewrote redstone powering to use power levelsTiger Wang2-180/+149
2014-04-08cRedstoneSimulator.cpp style improvementsTiger Wang1-40/+41
2014-04-08Uppercased Zwiseoldman951-3/+3
Minor, no code changed.
2014-04-08Comments: Inverted Z axis.wiseoldman951-9/+10
-Comments fix, No code has been changed. -Inverted the Z axis in the comments and changed all dependent comments accordingly. -Added NORTH/SOUTH/EAST/WEST in addition to LEFT/RIGHT/UP/DOWN.
2014-04-08Added comments regarding latching and orientationwiseoldman951-9/+31
No real code was changed.
2014-04-08Fixed the thing properly.Alexander Harkness1-8/+8
2014-04-07Fixed IsOnwiseoldman951-3/+2
2014-04-07Removed stray IsLockedwiseoldman951-2/+2
2014-04-07Removed unneeded spacingswiseoldman951-6/+3
2014-04-07Slight cleanupwiseoldman951-13/+17
It is more efficient and readable if we do nothing unless we're not locked.
2014-04-07Fixed some more minor issues with the redstone simulator.Alexander Harkness1-34/+39
2014-04-07Improved the speed a little more.Alexander Harkness1-1/+1
2014-04-07Fixed the redstone simulator.Alexander Harkness1-49/+40
2014-04-07Fixed #859Tiger Wang1-23/+3
2014-04-07Fix some of the comments in the PR tycho just did.Alexander Harkness1-8/+6
2014-04-06Added support for redstone latchingTycho2-2/+65
fixes #856
2014-03-28Some fixes to lilypadsTiger Wang1-0/+1
* Fixed placement on lava * Fixed placement on side of blocks * Fixed placement through blocks + Added washing-away of pads + Added ice as a block that fully occupies its voxel
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-16Fixed double to float conversions.madmaxoft1-1/+1
2014-03-11Unified Vector classesandrew2-2/+1
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-08Fixed issues with int vs size_t and a few other warningsTycho1-1/+1
2014-03-08Change TNT Fuse to ticksHowaner1-1/+1
2014-03-07Added some commentsandrew2-1/+6
2014-03-07Fixed water/lava interactionandrew3-4/+69
2014-03-05Added extra awesomeness to TNTTiger Wang1-1/+1
+ TNT now has a chance of flinging FallingBlock entities around * Improved TNT damage * Improved TNT spawning visuals * Possible fix for 'SetSwimState failure' messages in debug
2014-03-05Implemented vanilla-like fluid simulatorandrew4-8/+219
2014-03-02Add Trapdoor Functions to cWorld and fix Trapdoor Redstone BugsHowaner1-5/+3
2014-03-01g_BlockXXX => cBlockInfo::XXXandrew3-4/+4
2014-02-28Fix Double Slabs, fix Slab Meta and add more things to burnableHowaner1-0/+13
2014-02-20Removed problematic utf8.madmaxoft1-2/+2
2014-02-20Bad UTF-8 o.OHowaner1-2/+2
2014-02-20Remove typeinfo import in IncrementalRedstoneSimulatorHowaner1-2/+0
2014-02-20Add Pressure Plate SoundHowaner1-0/+9
2014-02-20Add Light weighted pressure platesHowaner2-10/+20
2014-02-20Add Hay Bale to BurnableHowaner1-0/+1
2014-02-16Fixed a glaring bug with chunk cross-simulatingTiger Wang1-9/+17
* A chunk's redstone blocks list is no longer touched if AddBlock was being called with another chunk's coordinates * Fixed chunk boundary checks
2014-02-15Added a 'default:' for SimChunk()'s switchTiger Wang1-0/+1
2014-02-15A fix and an improvementTiger Wang2-23/+43
* Fixed a special case with the wrong ChunkX/Z values being used to calculate a relative position * Simplified data structure adding and removing operations (no more pointers!) - Removed one character of whitespace :D
2014-02-15Sizeable speed improvements to redstoneTiger Wang2-81/+115
+ Moved all simulator data into individual chunks * Cleaned up parameters for functions and some code * Fixed repeaters powering off faster than they power on The main issue before was that, although the redstone simulator stored blocks to be simulated in individual cChunks, other data, such as powered lists, and etcetera, were global regardless of which chunk was being simulated. Therefore, with worlds with lots of redstone, each tick saw the ticking of chunks, which themselves iterated through the entire dataset needlessly, creating LOTS of lag. Should be better now :)
2014-02-15Add more Sounds to Redstone SimulatorHowaner1-1/+23
2014-02-15Add Fence Gate to Redstone SimulatorHowaner2-0/+31
2014-02-12Improved pressure platesTiger Wang2-1/+5
+ Two (or more) pressure plates can be triggered at the same time * Fixed issues caused by pressure plates not being in the sources list
2014-02-07Renamed cRedstoneManager to cRedstoneSimulator and renamed cRedstoneSimulator to cIncrementalRedstoneSimulator (Might change later).STRWarrior7-1809/+1809
2014-02-07Fixed some end of linesSTRWarrior2-2/+2
2014-02-07Implemented an easy way of adding new redstone simulators.STRWarrior4-3/+79
Also added a "noop" redstone simulator that does the same as the fluid version.
2014-02-05Fixed most of the reordering warningsTycho1-3/+3
2014-02-04Improved Type safety of eBlockFaceTycho1-2/+3
May Fix #640
2014-02-03Removed unused lookupsTycho1-2/+0
2014-02-02Changed Signiture of OnUpdateTycho1-1/+7
2014-02-01Split cCoord template into one and two data typesTiger Wang1-2/+2
2014-02-01Changed pointers to referencesTycho1-2/+2
2014-02-01Changed signitures of Several BLockHandler MethodsTycho1-2/+4
Changed the signitures of the following to use interfaces: GetPlacementBlockTypeMeta OnPlaced OnPlacedByPlayer OnDestroyed OnNeighbourChanged NeighbourChanged OnUse CanBeAt Check
2014-01-29Fixed redstone simulator crash found in #570Tiger Wang2-13/+14
2014-01-18Basic command block implementationandrew2-1/+30
2014-01-13Fixed wire, rail, and pressure plate unpoweringTiger Wang1-3/+4
2014-01-11Fixed rails poweringTiger Wang1-0/+2
2014-01-11Did some stuff with the vectorsTiger Wang1-32/+17
2014-01-11Fixed a door bug and reduced codeTiger Wang1-19/+1
Doors wouldn't get powered by repeaters, and some blocks, like glass, were viable middle blocks when they shouldn't have been.
2014-01-10Fixed doors, fixes #453Tiger Wang1-38/+8
2014-01-10Major refactoring of redstoneTiger Wang2-185/+178
This commit is a refactoring of the redstone code, mainly the functions handling the removal of invalid blocks from power supplier data structures. Its aim is to improve performance and potentially reduce the memory footprint of the data structures. It works to reduce the amount of GetBlock()s triggered every tick. Before, a GetBlock() was requested for every single item in the data lists, as well as for every single redstone block in a chunk. Following these changes, the AddBlock() event is utilised more effectively to only update the lists when needed (a block is changed), as well as to insert the block type (and update it when needed) alongside the coordinates into the main redstone simulator chunkdata list. In short, a single GetBlock() is now cached, with this cache being updated when the simulator is awoken due to a block change. At least, I *hope* that this is what it does :P
2013-12-31fixed warnings in World.cppTycho Bickerstaff1-2/+8
2013-12-26Moved increment operator to back of variablesTiger Wang1-9/+9
2013-12-24Implemented stone and wooden pressure platesTiger Wang2-3/+105
2013-12-23Provides an enhancement to daylight sensorsTiger Wang1-2/+27
2013-12-23Daylight sensor sensing enhancementTiger Wang1-9/+11
2013-12-22A fix for daylight sensorsTiger Wang1-2/+3
2013-12-22merged in warnings changesTycho Bickerstaff4-5/+12
2013-12-22converted commneted paramater names to the unused macroTycho Bickerstaff4-5/+11
2013-12-22Daylight sensorsTiger Wang1-2/+1
2013-12-22Fixed them again, confound itTiger Wang1-9/+21
2013-12-21Piston is now warnings cleanTycho Bickerstaff3-4/+4
2013-12-21ChunkSender is now warnings cleanTycho Bickerstaff1-1/+2
2013-12-20Fixed repeaters delay, maybeTiger Wang2-12/+38
Also added basic daylight sensors, though because GetBlockSkylight always is 15, it doesn't work.
2013-12-20Fixed compiler warning when iterating over a fixed array of items (ARRAYCOUNT).madmaxoft3-6/+6
2013-12-19Fixed repeaters not updating powerTiger Wang1-11/+41
2013-12-18Fixed wire powering blocks beneathTiger Wang1-1/+1
2013-12-18Fixed bad repeater power queuing in corner caseTiger Wang2-83/+76
Repeaters remain queued to power even if their original source has since unpowered. Also functionised and cleaned up code.
2013-12-15Implemented xoft's suggestionsTiger Wang1-3/+16
2013-12-15Fixed wire repeater checkingTiger Wang1-1/+1
2013-12-15Wires now power repeaters properlyTiger Wang1-0/+7
2013-12-15Fixed the hopefully final wire self-powering bugTiger Wang1-1/+13
2013-12-14Potentially fixed debug assertsTiger Wang1-5/+5
2013-12-14Wires no longer power if a block cuts them offTiger Wang1-23/+32
Also reduced more unneeded code.
2013-12-14Implemented note block playing and fixed wireTiger Wang2-4/+50
Game of Thrones music in Minecraft, here I come!
2013-12-14Fixed compilating!Tiger Wang1-5/+5
2013-12-14Fixes to redstone wire and torchesTiger Wang2-20/+36
+ Wires now power blocks around the block beneath * Torches no longer power off if it is on a linked powered block * Enhanced code, split functions, etc.
2013-12-14Removed loads of unneeded code againTiger Wang1-86/+60
2013-12-14Reduced loads of unneeded codeTiger Wang1-188/+44
Merged wire powering detection code into a single function.
2013-12-11Fixed pistons being viable middle blockTiger Wang1-0/+3
Also an excuse to update submodules
2013-12-11moved simulor to globsTycho Bickerstaff1-1/+5
2013-12-10more cmakeTycho Bickerstaff1-0/+7
2013-12-10Provides a possible fix for repeater timingsTiger Wang1-1/+1
Not completely reliable, but at least some types of clock work.
2013-12-10Readded initial lineTiger Wang1-0/+1
2013-12-10Fixed compile (alas, no more goto)Tiger Wang1-11/+14
2013-12-10Fixed Floody lava to stone fizzleTiger Wang1-2/+16
2013-12-10Added repeater delaysTiger Wang2-1/+62
They DO sometimes get stuck though :P
2013-12-10Slight redstone wire performance improvementTiger Wang1-1/+6
2013-12-10Changed more FastSetBlocks to SetBlocksTiger Wang1-3/+3
Fixes duplication bugs.
2013-12-09Fix Unused Variable Warning at FluidSimulator.cpp line 169 and 176worktycho1-4/+3
2013-12-07Changed some FastSetBlocks to SetBlockTiger Wang1-3/+3
Should fix some duplication glitches.
2013-12-07Fixed trapdoors not togglingTiger Wang2-16/+102
The redstone simulator kept on resetting them.
2013-12-06Re-implemented redstone duplicate checkingTiger Wang1-0/+29
2013-12-05Merged if statements.Samuel Barney1-7/+1
2013-12-05Finished MergeSamuel Barney1-2/+2
2013-12-04Lava can spawn fire.madmaxoft1-2/+2
Settable in world.ini, lava can spawn fire to fuel blocks near it. Fix #65.
2013-12-04Made suggested changesSamuel Barney2-6/+11
2013-12-02Fire no longer goes out when on top of nether rackSamuel Barney1-1/+6
2013-12-01Fixed linux compile errors and formatting in RedstoneSimulator.cppmadmaxoft1-14/+26
2013-11-30Fixed pistons extendingTiger Wang1-0/+10
They didn't when a source was in front, but now they do! Yay!
2013-11-30Removed redstone duplicate power checkingTiger Wang1-2/+0
There was no need for it, and it introduced some bugs.
2013-11-30Improved piston direction checkingTiger Wang1-62/+8
Now uses AddFaceDirection, as suggested by xoft.
2013-11-30Pistons no longer accept power through front faceTiger Wang2-3/+96
This fixes #60.
2013-11-30Improved redstone speed and fixed a wire bugTiger Wang1-73/+83
The redstone simulator no longer goes through the Powered and LinkedPowered blocks lists for EVERY item in the chunk data, instead, only at every tick. Also, wires powering each other that had the same data value is now fixed.
2013-11-29Implemented trapdoors, fixes #43 and #105Tiger Wang2-0/+19
Also updated redstone simulator to support it
2013-11-27Fixed the remaining derpsAlexander Harkness1-1/+1
2013-11-25Further attempts to fix compileTiger Wang1-1/+1
2013-11-24Attempt to fix compilationTiger Wang1-1/+1
2013-11-24Moved source to srcAlexander Harkness19-0/+3347