summaryrefslogtreecommitdiffstats
path: root/source/cWorld.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Chunk 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.com2012-02-161-1/+72
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@273 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Fixed logging formatting error in cWorldmadmaxoft@gmail.com2012-02-151-1/+1
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@264 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Got rid of cWorld::GetAllPlayers() and implemented ForEachPlayer() more or less in Luafaketruth2012-02-141-20/+0
| | | | | | Core now uses ForEachPlayer() to interact with connected players git-svn-id: http://mc-server.googlecode.com/svn/trunk@260 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Rewritten 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.com2012-02-131-451/+404
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@251 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Added total chunk count to webadminmadmaxoft@gmail.com2012-02-081-2/+108
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@248 0a769ca7-a7f5-676a-18bf-c427514a06d6
* MTRand class is not created in each tick, therefore much improving tick-thread time (now uses ~5 % CPU instead of one full core)madmaxoft@gmail.com2012-02-081-42/+82
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@245 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Rewritten cAuthenticator to make use of the new cIsThread architecture - now authentication runs in a single separate thread for all clients;madmaxoft@gmail.com2012-02-011-0/+4
| | | | | | | Global player-kicking function (cServer, cRoot); More char * -> AString conversion git-svn-id: http://mc-server.googlecode.com/svn/trunk@221 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Old code begone! ChunkMap cleanupmadmaxoft@gmail.com2012-01-291-1/+1
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@189 0a769ca7-a7f5-676a-18bf-c427514a06d6
* VC2008 / VC2010: Enabled precompiled header through Globals.h; the header included in every module in the project. Compilation optimization.madmaxoft@gmail.com2012-01-291-5/+6
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@188 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Terrain generation is synchronous again, async generation has bugs.faketruth2012-01-191-27/+29
| | | | | | | | | Made some funky smart pointer things for chunks. Fixed a bug where the client would override the player position on the server and back again, resulting in sending too many chunks to the client which it doesn't even need. Fixed some compiler warnings in cPickup.cpp git-svn-id: http://mc-server.googlecode.com/svn/trunk@164 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Fixed the numchunks console command.faketruth2012-01-011-1/+15
| | | | | | | Added some form of reference counting to cChunk to make sure it's not referenced when deleting it. Right now it's only needed due to the generation of chunks in a separate thread and adding it to the spread light list in cWorld git-svn-id: http://mc-server.googlecode.com/svn/trunk@161 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Made a couple of functions in cChunk inline, this should speed up several block operations on chunksfaketruth2011-12-311-2/+2
| | | | | | | Players should not spawn in the ground anymore. When an entity was added to cWorld twice (which shouldn't happen actually), the server would crash when the entity is destroyed, this should be fixed now. git-svn-id: http://mc-server.googlecode.com/svn/trunk@158 0a769ca7-a7f5-676a-18bf-c427514a06d6
* - implemented the fire simulation in native c++ (cFireSimulator)lapayo94@gmail.com2011-12-281-5/+12
| | | | | | | | - 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
* Fixed some small memory leakslapayo94@gmail.com2011-12-281-0/+2
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@148 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Users file was pretty messed up with mixed unix and windows line endings. The ini failed to parse correctly under cygwin.faketruth2011-12-271-1/+8
| | | | | | | | | 'Fixed' a 'bug' where MCServer would seemingly endlessly calculate lighting for an entire world (and then crash), when this entire world has 'wrong' lighting. This happens when running a converted map from Vanilla. Fixed this by only allowing a maximum of 50 chunks to recalculate their lighting per tick. Fixed a small coding error in cChunkMap where it would check PakVersion twice, instead of also ChunkVersion. DeNotch converter does not need the VS2010 runtime thingies anymore git-svn-id: http://mc-server.googlecode.com/svn/trunk@138 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Some kind of 'template' world generator that right now just generates an all dirt world. You can use this to test new algorithmsfaketruth2011-12-271-8/+14
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@127 0a769ca7-a7f5-676a-18bf-c427514a06d6
* - improved Simulator system lapayo94@gmail.com2011-12-261-8/+22
| | | | | | | | | | | | -> Manager handles all ticks -> advantage: Much easier to add new simulators, because you only have to register them in the manager - moved sand and gravel simulation to a Simulator-class (cSandSimulator) - Made Squid a little bit more funny and realistic, because it dies now when it´s not in water -Escaping mobs run now faster than normal (They just walked away before :D) git-svn-id: http://mc-server.googlecode.com/svn/trunk@125 0a769ca7-a7f5-676a-18bf-c427514a06d6
* - Linux compatible fixes including updated makefilemtilden@gmail.com2011-12-261-14/+18
| | | | | | | | - Mersenne Twister still says uint32 but it's now signed for compatibility with random uses needing negative values - Server seed is sent to clients, but needs to be able to be signed long long later on for authentic reasons - Protocol Version is required to match to ensure client compatibility, this should probably have a settings.ini check as well as store the value there git-svn-id: http://mc-server.googlecode.com/svn/trunk@121 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Chunks 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 :Ofaketruth2011-12-251-50/+120
| | | | | | | | | Chunks are now generated before the player is able to see them. This is done because after a chunks is done generating, some blocks might still need to be set (parts of trees from neighboring chunk), causing more bandwidth to be used (each changed block needs to be sent to clients again) and (fps) lagging the clients when changing a lot of blocks. Calculating ahead fixes these issues. Separated the placing of foliage (trees and stuff) when generated chunks into a new function GenerateFoliage() Cleaned up the VS2010 project, now using some VS2010 specific functions like dependencies on projects (no need for setting library dependencies manually). VS2010 project now compiles way faster in Release by using multi threading. git-svn-id: http://mc-server.googlecode.com/svn/trunk@103 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Max. players and MOTD are now changeable in the settings.inilapayo94@gmail.com2011-12-241-0/+21
| | | | | | Thanks to mtilden ( http://forum.mc-server.org/showthread.php?tid=183&pid=1381#pid1381 ) git-svn-id: http://mc-server.googlecode.com/svn/trunk@101 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Digging leaves with shears now drops leaveslapayo94@gmail.com2011-12-221-5/+5
| | | | | | | | | | | | | Falling Sand now notifies water around Implemented Function to get the relative chunk position in the total position (cChunk::PositionToWorldPosition) Pistons don´t drop water and lava items anymore when stopping water/lava implemented Getter for lava and water simulator IsBlockWater and IsBlockLava function in Defines.h git-svn-id: http://mc-server.googlecode.com/svn/trunk@97 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Added 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.com2011-11-101-3/+3
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@85 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Storms were WAY too frequent. I toned them down.admin@omencraft.com2011-11-101-4/+4
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@84 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Added random weather that persists per world. Also added SetWeather, GetWeather, and CastThunderbolt to lua bindings.admin@omencraft.com2011-11-101-0/+71
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@83 0a769ca7-a7f5-676a-18bf-c427514a06d6
* bugfix to redstone, it can climb walls again.admin@omencraft.com2011-11-091-5/+5
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@81 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Redstone 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.com2011-11-091-0/+35
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@80 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Fixed world timefaketruth2011-11-081-1/+10
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@78 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Added Sebi's changes to pistons and item drops.admin@omencraft.com2011-11-071-0/+38
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@72 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Patch 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.com2011-11-061-3/+15
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@67 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Fixed some "Entity was not found in any chunk!" warningsfaketruth2011-11-021-0/+1
| | | | | | | Player's current world is saved in the player file. When a player joins the server, the player joins the last world he was in. It seems MCServer can finally run multiple worlds! It just needs functionality to switch between them git-svn-id: http://mc-server.googlecode.com/svn/trunk@46 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Changed world gamemode location to world.ini for world based gamemodes.admin@omencraft.com2011-11-021-2/+4
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@43 0a769ca7-a7f5-676a-18bf-c427514a06d6
* fixed player spawning in the ground.admin@omencraft.com2011-11-011-5/+0
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@42 0a769ca7-a7f5-676a-18bf-c427514a06d6
* You can now run multiple worlds by defining them in settings.ini . However there's no way to change worlds on the fly yetfaketruth2011-11-011-36/+32
| | | | | | | | | | | Players are now stored in separate folder /players instead of in the world folder (!so move the folder!) Fixed a memory leak/error in cPickup.cpp Multiple worlds are stored in cRoot cClientHandle lists are taken out of cWorld and now stored in cServer Worlds now have names to distinguish them by Some functions in the Core plugin now distinguish between worlds git-svn-id: http://mc-server.googlecode.com/svn/trunk@40 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Prepared some parts of the code for multi world support, I created lots of TODO'sfaketruth2011-10-311-4/+4
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@29 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Made several recomended changes. Gamemode is now world based. Need to add it to player.admin@omencraft.com2011-10-261-1/+2
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@18 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Updated VS2010 project filesfaketruth2011-10-261-104/+43
| | | | | | | Made monster spawning code in cWorld.cpp a bit more compact and readable srand() is only supposed to be called once in the whole program, and it's already called in the constructor of cWorld so it doesn't have to be in cWorld::Tick() git-svn-id: http://mc-server.googlecode.com/svn/trunk@14 0a769ca7-a7f5-676a-18bf-c427514a06d6
* git-svn-id: http://mc-server.googlecode.com/svn/trunk@10 0a769ca7-a7f5-676a-18bf-c427514a06d6admin@omencraft.com2011-10-261-10/+120
|
* MCServer c++ source filesfaketruth2011-10-031-0/+764
git-svn-id: http://mc-server.googlecode.com/svn/trunk@3 0a769ca7-a7f5-676a-18bf-c427514a06d6