summaryrefslogtreecommitdiffstats
path: root/source/cChunk.cpp (unfollow)
Commit message (Expand)AuthorFilesLines
2012-06-06Item-dropping code rewritten and centralized - now there's only one place to modify if we want to split or merge same-item drops: cWorld:SpawnItemPickups(). Also, mined blocks can now drop more items, and they recognize if they're being mined by the correct tool.madmaxoft@gmail.com1-9/+13
2012-06-01Fixed a nasty int overflow bug in blockticking code ( http://forum.mc-server.org/showthread.php?tid=457 )madmaxoft@gmail.com1-3/+4
2012-05-31Fixed melons and pumpkins generating in a wrong place.madmaxoft@gmail.com1-1/+1
2012-05-30Added support for SetNextBlockTick() function callable from Luamadmaxoft@gmail.com1-18/+12
2012-05-30Melon and pumpkin stems now grow melons and pumpkinsmadmaxoft@gmail.com1-1/+1
2012-05-30Fixed blocktick distributionmadmaxoft@gmail.com1-6/+14
2012-05-30Farmland gets hydrated and dehydrated. Fixed an off-by-one error in neighbor-chunk manipulation.madmaxoft@gmail.com1-3/+75
2012-05-30Fixed a crash when chunks were loaded / generated with entities ( http://forum.mc-server.org/showthread.php?tid=450 )madmaxoft@gmail.com1-26/+4
2012-05-29Added code for the chunks to manipulate their neighbors while ticking. Also added some basic farming support - melon and pumpkin growing code. Untested and untestable so far, will test and fix later.madmaxoft@gmail.com1-189/+176
2012-05-28Chests and Furnaces are now saved properly into Anvil scheme.madmaxoft@gmail.com1-1/+1
2012-05-25Merged the composable_generator branch into the trunkmadmaxoft@gmail.com1-101/+143
2012-05-08Fixed two "bottlenecks" found using profiling - MakeIndex() instead of MakeIndexNoCheck()madmaxoft@gmail.com1-2/+2
2012-04-10Added the "/regeneratechunk" command that regenerates either current chunk or a chunk specified with x, z parameters. TODO: permissions - we don't want guests erasing our chunks!madmaxoft@gmail.com1-29/+15
2012-03-24Removed the split between 1.2.3 and 1.1, left only 1.2.3 codemadmaxoft@gmail.com1-13/+0
2012-03-22Fixed a deadlock by removing clients from all chunks upon their exit, not using the clients chunklists.madmaxoft@gmail.com1-8/+17
2012-03-14Unified the chunk data to use the BLOCKDATA datatype.madmaxoft@gmail.com1-7/+7
2012-03-14Split chunk data into separate arrays; decoupled most sources from cChunk.h dependencymadmaxoft@gmail.com1-126/+135
2012-03-10Using references instead of pointers for sending packetsmadmaxoft@gmail.com1-1/+1
2012-03-10Fixed mob spawn packet for 1.2 client, now client doesn't bail out when mobs are turned onmadmaxoft@gmail.com1-2/+3
2012-03-10Was using "#else if" which is not valid apparently, now using "#elif"faketruth1-1/+1
2012-03-10You can change axis ordering by setting AXIS_ORDER to AXIS_ORDER_XZY in cChunk.h !THIS WILL SCREW UP YOUR WORLDS THOUGH!faketruth1-0/+4
2012-03-10Using more of the index functions in cChunk, so it should be easy enough to flip the axis ordering nowfaketruth1-76/+61
2012-03-09cClientHandles have a unique ID now to distinguish themfaketruth1-9/+9
2012-03-05ChunkSender: Chunks are now compressed and sent to clients from a separate threads, proper passive waiting between threads. Not much tested, just appears to work :)madmaxoft@gmail.com1-62/+53
2012-03-04The world can now truly be made higher by incrementing cChunk::c_ChunkHeight to 256. !!HOWEVER THIS WILL DESTROY YOUR SAVED WORLD!!faketruth1-1/+1
2012-03-04Changed signed char to unsigned char in block packets, so we can receive height up to 255faketruth1-9/+16
2012-03-03Got rid of some hardcoded numbers, now using hardcoded variables! woofaketruth1-87/+87
2012-03-02Finally got the multiblock packet working! It seems the byte order was wrongfaketruth1-5/+3
2012-03-02MultiBlock packet is working partly.. I really don't understand what's wrong with this packet :/faketruth1-0/+13
2012-03-01New redstone simulator. Should work without crashes!faketruth1-1/+15
2012-02-28Server uses ~40% less CPU nowfaketruth1-86/+92
2012-02-28Chunk now has an indicator of load failure; Chunk generator uses cChunkStaymadmaxoft@gmail.com1-0/+16
2012-02-26New cChunkStay class for temporarily keeping chunks loaded even when then have no clients. For now unused, will be used by generator and lighting in the future.madmaxoft@gmail.com1-1/+13
2012-02-23Plain pointer cChunkPtr finishing touches; removed cChunk's critical sectionsmadmaxoft@gmail.com1-162/+14
2012-02-23cChunk: removed unused codemadmaxoft@gmail.com1-6/+0
2012-02-22Added some asserts to trace a bugfaketruth1-1/+5
2012-02-21Removed cChunkPtrs from everywhere but internal cChunkMap usage. Now we should finally be threadsafe :)madmaxoft@gmail.com1-5/+6
2012-02-21Fixed heightmap optimization from rev 302; removed a few more cChunkPtrsmadmaxoft@gmail.com1-16/+42
2012-02-21Optimized hightmap recalc when setting a chunk's blockmadmaxoft@gmail.com1-7/+31
2012-02-20Removed some more cChunkPtr usagemadmaxoft@gmail.com1-3/+7
2012-02-20Using own ASSERT() that logs to filefaketruth1-5/+5
2012-02-18Substantial cWorld::FastSetBlock() speed up by queueing all such calls and processing them later chunk-wise (makes growing trees in the generator fast again)madmaxoft@gmail.com1-8/+28
2012-02-18Re-implemented tree-growing. May produce artefacts on old-world / new-world boundaries.madmaxoft@gmail.com1-0/+10
2012-02-18Thread-safe chunk generation, storage and generator are queried for progress while initializing servermadmaxoft@gmail.com1-8/+8
2012-02-16cWorldGenerator speedup - doesn't call GetChunk() anymore, not queueing the chunk it's generating to be loaded recursively.madmaxoft@gmail.com1-5/+6
2012-02-16Marking chunk dirty after generatingmadmaxoft@gmail.com1-0/+2
2012-02-16Heightmap is properly generated after loading chunks now, so /spawn and /top should work properly againfaketruth1-0/+2
2012-02-16Chunk is now marked as dirty; saving only dirty chunks; rewritten load / save not to use cChunkPtr; set VC2008 project to level4 warnings; block entities are now loaded and saved properlymadmaxoft@gmail.com1-7/+146
2012-02-15Restored chest and furnace functionality as it was (it's basically working but joined chests show single-chest window)madmaxoft@gmail.com1-0/+13
2012-02-13Rewritten most of the code for multithreading; still not 100%, but getting there. If this commit proves to be too problematic, we can always undo it.madmaxoft@gmail.com1-361/+343
2012-02-08Removed unused codemadmaxoft@gmail.com1-44/+113
2012-02-08MTRand class is not created in each tick, therefore much improving tick-thread time (now uses ~5 % CPU instead of one full core)madmaxoft@gmail.com1-5/+8
2012-02-01Rewritten cAuthenticator to make use of the new cIsThread architecture - now authentication runs in a single separate thread for all clients;madmaxoft@gmail.com1-2/+2
2012-02-01AString logging fixmadmaxoft@gmail.com1-7/+7
2012-02-01sprintf() begone! Replaced with StringUtils' Printf()madmaxoft@gmail.com1-3/+3
2012-02-01Removed a few duplicate includesmadmaxoft@gmail.com1-2/+1
2012-01-30Fixed a problem in cCSLock (sorry); reverted cChunkmadmaxoft@gmail.com1-3/+3
2012-01-30Added a WebAdmin interface to view users their groups, and the permissions of groups.faketruth1-1/+1
2012-01-30More cFile cleanup; removed old format writing for block entitiesmadmaxoft@gmail.com1-176/+199
2012-01-29VC2008 / VC2010: Enabled precompiled header through Globals.h; the header included in every module in the project. Compilation optimization.madmaxoft@gmail.com1-10/+5
2012-01-26Working on a new plugin design with Lua. While retaining backwards compatibility of course...faketruth1-28/+28
2012-01-26Probably fixed a deadlock! http://www.mc-server.org/support/index.php?do=details&task_id=147faketruth1-2/+2
2012-01-23Cactus towers can be destroyed by removing the bottom blockfaketruth1-0/+1
2012-01-19Terrain generation is synchronous again, async generation has bugs.faketruth1-43/+13
2012-01-01Fixed the numchunks console command.faketruth1-0/+76
2011-12-31Made a couple of functions in cChunk inline, this should speed up several block operations on chunksfaketruth1-105/+8
2011-12-28This bug should be fixed now http://mc-server.org/support/index.php?do=details&task_id=112faketruth1-6/+44
2011-12-27Some kind of 'template' world generator that right now just generates an all dirt world. You can use this to test new algorithmsfaketruth1-2/+2
2011-12-26Players can switch worlds on the fly with the command /gotoworld [worldName]. This uses the function cPlayer::MoveToWorld()faketruth1-72/+72
2011-12-26- improved Simulator system lapayo94@gmail.com1-26/+1
2011-12-26 - Linux compatible fixes including updated makefilemtilden@gmail.com1-4/+5
2011-12-26Moved the actual world generation from cChunk.cpp to a more isolated file cWorldGenerator.cppfaketruth1-236/+3
2011-12-26Made some functions in cChunk and cNoise inline, this should significantly increase chunk generation speedfaketruth1-7/+0
2011-12-25Chunks are generated in a separate thread allowing players to keep on playing and chatting while chunks are generated. This means, however, that cWorld::GetChunk() does not always return a chunk and is something you need to be aware of. I am not entirely sure if all this is completely stable, but I think so :Ofaketruth1-21/+31
2011-12-22Digging leaves with shears now drops leaveslapayo94@gmail.com1-4/+31
2011-11-15Changed chunk generation so any surface sand with air underneath it will turn into sandstone to prevent most sand cave-ins due to odd cave placement.admin@omencraft.com1-12/+37
2011-11-10Fixed doors. I forgot to actually return proper Hex value. Started work on adding farmland, farming, and leaf decay support.admin@omencraft.com1-0/+5
2011-11-09Redstone clocks now work. even one clocks. torches don't update themselves when placed yet, but redstone wire updates the torch. Fixed a bug with piston animations.admin@omencraft.com1-4/+4
2011-11-08Fixed bug in cChunk.cpp not calculating RedstoneCircuits at the correct positions. Also, forgot to mention you can now place colored wool.admin@omencraft.com1-2/+2
2011-11-07Updated redstone and pistons some mode. If you break an extended piston the piston extension will now also break. When a redstone device is broken by something other than a person the redstone circuit should now update.admin@omencraft.com1-4/+21
2011-11-06Patch with diff file created by Sebi (implemented some stuff like lava physics, drops are deleted when in lava, water is now slower, lava gives actual damage etc.). Pistons now work mostly as they should. They do not yet show the motion animation and do not emit sound. They do extend, push, and retract as they should though. Right now the only way to activate a piston is to light redstone wire adjacent to it with a redstone torch.admin@omencraft.com1-10/+10
2011-11-05Change SetBlock to FastSetBlock in cRedstone.cpp and grass will now grow if any one hit block is above it.admin@omencraft.com1-6/+11
2011-11-02Fixed some "Entity was not found in any chunk!" warningsfaketruth1-10/+18
2011-11-01fixed player spawning in the ground.admin@omencraft.com1-1/+1
2011-10-31Prepared some parts of the code for multi world support, I created lots of TODO'sfaketruth1-33/+32
2011-10-25Using SSE instructions for noise (terrain generation)faketruth1-9/+9
2011-10-21Compiles for linuxfaketruth1-6/+9
2011-10-03MCServer c++ source filesfaketruth1-0/+1388