summaryrefslogtreecommitdiffstats
path: root/source/cWorld.cpp (unfollow)
Commit message (Expand)AuthorFilesLines
2012-08-27Cut out all packet handling to a separate cProtocol descendantmadmaxoft@gmail.com1-36/+19
2012-08-26git-svn-id: http://mc-server.googlecode.com/svn/trunk@795 0a769ca7-a7f5-676a-18bf-c427514a06d6madmaxoft@gmail.com1-0/+9
2012-08-25cWorld doesn't use cPackets.madmaxoft@gmail.com1-40/+70
2012-08-24cPickup doesn't use cPackets.madmaxoft@gmail.com1-0/+9
2012-08-24Monster classes don't use cPackets. Chat messages are sent / broadcast without cPackets. BlockEntities don't use cPackets.madmaxoft@gmail.com1-4/+31
2012-08-23Added a RateCompareString function to StringUtilsfaketruth1-0/+36
2012-08-19Window, Chest, Furnace and Pawn are not using cPackets at allmadmaxoft@gmail.com1-0/+18
2012-08-19Almost all packets' handling is now rewritten not to use cPacket descendants elsewhere than in cClientHandle.madmaxoft@gmail.com1-3/+74
2012-08-19Another handful of packets rewritten.madmaxoft@gmail.com1-0/+18
2012-08-18Chat packet handled in the new way; fixed missing packet sending for inventory slot.madmaxoft@gmail.com1-1/+19
2012-08-15Added a true "all chunks saved" message for the save-all console command (FS #215)madmaxoft@gmail.com1-2/+2
2012-08-03Fixed a few gcc pedantic warnings; made BLOCKTYPE an unsigned char type.madmaxoft@gmail.com1-8/+8
2012-07-15A new Block handling system :olapayo94@gmail.com1-83/+56
2012-07-15World threads are stopped before the plugin mgr for clean exit (FS #228)madmaxoft@gmail.com1-3/+10
2012-07-15Basic jungle trees with vines, efficient trees handling.madmaxoft@gmail.com1-10/+13
2012-07-13Fixed case comparison - used the builtin functionmadmaxoft@gmail.com1-1/+1
2012-07-13fixed /tp commandlapayo94@gmail.com1-1/+1
2012-07-02cBlockArea object added (with only minimal testing so far)madmaxoft@gmail.com1-2/+9
2012-07-02Added the cWorld::DoWithPlayer() function and exported it in the Lua API. Removed the obsolete cWorld::GetPlayer() function.madmaxoft@gmail.com1-47/+10
2012-06-19Made ForEach API safer to use, now supports Destroy()-ing objects, too ( http://forum.mc-server.org/showthread.php?tid=434&pid=3513#pid3513 )madmaxoft@gmail.com1-2/+4
2012-06-17Removed the deprecated GetBlockEntity(), added several enumerators to replace it.madmaxoft@gmail.com1-10/+45
2012-06-17Logs completion of chunk saving (FS #215)cedeel@gmail.com1-0/+1
2012-06-16Added new hooks: UPDATING_SIGN and UPDATED_SIGN. The first one is capable of changing the sign text by returning the new four lines along with the bool valuemadmaxoft@gmail.com1-4/+13
2012-06-16Exported cWorld::ForEachEntity and cWorld::ForEachEntityInChunk; no idea if they actually workmadmaxoft@gmail.com1-7/+33
2012-06-15Only spawn nether mobs in nether biome.cedeel@gmail.com1-20/+26
2012-06-14Renamed HOOK_WEATHER_CHANGE to HOOK_WEATHER_CHANGED, added the glue code for it to actually workmadmaxoft@gmail.com1-3/+3
2012-06-14Attempt to bring sanity to newlines across systems.cedeel@gmail.com1-1845/+1845
2012-06-14Added HOOK_WEATHER_CHANGE.cedeel@gmail.com1-0/+3
2012-06-13Revamped the weather system.cedeel@gmail.com1-28/+69
2012-06-09Fixed a forgotten ini file readmadmaxoft@gmail.com1-0/+1
2012-06-09More ini settings save their defaultsmadmaxoft@gmail.com1-5/+5
2012-06-09New IniFile functionality: read value and set default if it isn't present (GetValueSet() ); used by cWorldmadmaxoft@gmail.com1-29/+20
2012-06-09Sugarcane and cactus max height can be set in world.ini.madmaxoft@gmail.com1-2/+2
2012-06-09Plants growable by bonemeal are settable in the world.ini. Default matches vanilla MC.madmaxoft@gmail.com1-8/+67
2012-06-09Cacti grow by themselves and by bonemealmadmaxoft@gmail.com1-0/+6
2012-06-09Bonemeal is consumed in survival mode when used on growable blocksmadmaxoft@gmail.com1-6/+7
2012-06-08Sugarcane grows and can be grown using bonemeal.madmaxoft@gmail.com1-0/+6
2012-06-07Bonemeal works on crops, melons, pumpkins, saplings and grass. Plant growing has been refactored into separate functions callable from Lua, too.madmaxoft@gmail.com1-0/+88
2012-06-07Repeaters' delays can be set by rclkmadmaxoft@gmail.com1-0/+9
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-7/+44
2012-05-30Added support for SetNextBlockTick() function callable from Luamadmaxoft@gmail.com1-0/+9
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-21/+75
2012-05-25Merged the composable_generator branch into the trunkmadmaxoft@gmail.com1-234/+258
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-0/+12
2012-03-24Reverted the previous commit - it is useless, since entities still depend heavily on cWorldmadmaxoft@gmail.com1-98/+0
2012-03-23Encapsulated cWorld functions needed in cWorldStorage into an interface, so that cWorldStorage can actually be used outside of MC-Server (such as storage conversion tools and chunk analyzers)madmaxoft@gmail.com1-0/+98
2012-03-22Fixed a deadlock by removing clients from all chunks upon their exit, not using the clients chunklists.madmaxoft@gmail.com1-2/+2
2012-03-16Exposed a function to Lua to get a block's sky light valuefaketruth1-0/+9
2012-03-14Unified the chunk data to use the BLOCKDATA datatype.madmaxoft@gmail.com1-0/+15
2012-03-14Split chunk data into separate arrays; decoupled most sources from cChunk.h dependencymadmaxoft@gmail.com1-9/+27
2012-03-12Added a flat terrain generator with settable terrain heightmadmaxoft@gmail.com1-2/+4
2012-03-11Stopping the ChunkSender upon server stopmadmaxoft@gmail.com1-0/+1
2012-03-10Fixed a few obsoleted functionsmadmaxoft@gmail.com1-23/+28
2012-03-10Fixed *nix threading issue;madmaxoft@gmail.com1-1/+1
2012-03-09cClientHandles have a unique ID now to distinguish themfaketruth1-2/+2
2012-03-07Fixed bug where cPlayer's cClientHandle was used after cPlayer was destroyed http://forum.mc-server.org/showthread.php?tid=380faketruth1-32/+44
2012-03-06That was not a good place to use ARRAYCOUNT()madmaxoft@gmail.com1-5/+5
2012-03-06Fixed rev368's ChunkSender, now sends properly even chunks that are loaded. Fixed a deadlock in cClientHandle vs TickThread over cClientHandle::m_CSChunkListsmadmaxoft@gmail.com1-0/+18
2012-03-06Fixed bug FS#157 http://mc-server.org/support/index.php?do=details&task_id=157faketruth1-5/+5
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-9/+13
2012-03-03Got rid of some hardcoded numbers, now using hardcoded variables! woofaketruth1-6/+6
2012-03-01New redstone simulator. Should work without crashes!faketruth1-0/+4
2012-02-29Fixed the authenticator bugmadmaxoft@gmail.com1-0/+3
2012-02-29Added validity checks to world broadcasting. Also added logging to cPlayer deletion to catch that stupid BugByBoo.madmaxoft@gmail.com1-3/+5
2012-02-28Chunk now has an indicator of load failure; Chunk generator uses cChunkStaymadmaxoft@gmail.com1-0/+9
2012-02-28Implemented synchronous chunk loading; optimized cChunkStay interface for speed (though still unused ;)madmaxoft@gmail.com1-2/+20
2012-02-28Const-correctness for packet broadcasting (fixes GCC compilation)madmaxoft@gmail.com1-1/+1
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-0/+9
2012-02-22Added a crude way of disabling redstone. It's necessary though, redstone is completely broken, crashes the server all the timefaketruth1-22/+0
2012-02-21Removed cChunkPtrs from everywhere but internal cChunkMap usage. Now we should finally be threadsafe :)madmaxoft@gmail.com1-74/+35
2012-02-21Fixed heightmap optimization from rev 302; removed a few more cChunkPtrsmadmaxoft@gmail.com1-0/+27
2012-02-21Fixed block-getting so that simulators work againmadmaxoft@gmail.com1-16/+26
2012-02-20Removed some more cChunkPtr usagemadmaxoft@gmail.com1-14/+53
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-20/+9
2012-02-18Fixed previous commit: forgot to remove a debugging settingmadmaxoft@gmail.com1-3/+1
2012-02-18Re-implemented tree-growing. May produce artefacts on old-world / new-world boundaries.madmaxoft@gmail.com1-11/+32
2012-02-18Thread-safe chunk generation, storage and generator are queried for progress while initializing servermadmaxoft@gmail.com1-40/+108
2012-02-17Chunk coords mostly "upgraded" to include the Y coord for future compatibilitymadmaxoft@gmail.com1-0/+2
2012-02-17Removed useless log messagesmadmaxoft@gmail.com1-1/+0
2012-02-16git-svn-id: http://mc-server.googlecode.com/svn/trunk@281 0a769ca7-a7f5-676a-18bf-c427514a06d6faketruth1-2/+2
2012-02-16cWorldGenerator speedup - doesn't call GetChunk() anymore, not queueing the chunk it's generating to be loaded recursively.madmaxoft@gmail.com1-0/+9
2012-02-16Got rid of dangerous GetEntity(), not using DoWithEntity()faketruth1-5/+4
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-1/+72
2012-02-15Fixed logging formatting error in cWorldmadmaxoft@gmail.com1-1/+1
2012-02-14Got rid of cWorld::GetAllPlayers() and implemented ForEachPlayer() more or less in Luafaketruth1-20/+0
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-451/+404
2012-02-08Added total chunk count to webadminmadmaxoft@gmail.com1-2/+108
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-42/+82
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-0/+4
2012-01-29Old code begone! ChunkMap cleanupmadmaxoft@gmail.com1-1/+1
2012-01-29VC2008 / VC2010: Enabled precompiled header through Globals.h; the header included in every module in the project. Compilation optimization.madmaxoft@gmail.com1-5/+6
2012-01-19Terrain generation is synchronous again, async generation has bugs.faketruth1-27/+29
2012-01-01Fixed the numchunks console command.faketruth1-1/+15
2011-12-31Made a couple of functions in cChunk inline, this should speed up several block operations on chunksfaketruth1-2/+2
2011-12-28- implemented the fire simulation in native c++ (cFireSimulator)lapayo94@gmail.com1-5/+12
2011-12-28Fixed some small memory leakslapayo94@gmail.com1-0/+2
2011-12-27Users file was pretty messed up with mixed unix and windows line endings. The ini failed to parse correctly under cygwin.faketruth1-1/+8
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-8/+14
2011-12-26- improved Simulator system lapayo94@gmail.com1-8/+22
2011-12-26 - Linux compatible fixes including updated makefilemtilden@gmail.com1-14/+18
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-50/+120
2011-12-24Max. players and MOTD are now changeable in the settings.inilapayo94@gmail.com1-0/+21
2011-12-22Digging leaves with shears now drops leaveslapayo94@gmail.com1-5/+5
2011-11-10Added code for doors. Doors now place correctly but opening them is buggy and I need to change the current opening code to use bitwise operators.admin@omencraft.com1-3/+3
2011-11-10Storms were WAY too frequent. I toned them down.admin@omencraft.com1-4/+4
2011-11-10Added random weather that persists per world. Also added SetWeather, GetWeather, and CastThunderbolt to lua bindings.admin@omencraft.com1-0/+71
2011-11-09bugfix to redstone, it can climb walls again.admin@omencraft.com1-5/+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-0/+35
2011-11-08Fixed world timefaketruth1-1/+10
2011-11-07Added Sebi's changes to pistons and item drops.admin@omencraft.com1-0/+38
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-3/+15
2011-11-02Fixed some "Entity was not found in any chunk!" warningsfaketruth1-0/+1
2011-11-02Changed world gamemode location to world.ini for world based gamemodes.admin@omencraft.com1-2/+4
2011-11-01fixed player spawning in the ground.admin@omencraft.com1-5/+0
2011-11-01You can now run multiple worlds by defining them in settings.ini . However there's no way to change worlds on the fly yetfaketruth1-36/+32
2011-10-31Prepared some parts of the code for multi world support, I created lots of TODO'sfaketruth1-4/+4
2011-10-26Made several recomended changes. Gamemode is now world based. Need to add it to player.admin@omencraft.com1-1/+2
2011-10-26Updated VS2010 project filesfaketruth1-104/+43
2011-10-26git-svn-id: http://mc-server.googlecode.com/svn/trunk@10 0a769ca7-a7f5-676a-18bf-c427514a06d6admin@omencraft.com1-10/+120
2011-10-03MCServer c++ source filesfaketruth1-0/+764