summaryrefslogtreecommitdiffstats
path: root/source/cClientHandle.cpp (unfollow)
Commit message (Expand)AuthorFilesLines
2012-06-07Repeaters' delays can be set by rclkmadmaxoft@gmail.com1-3/+8
2012-06-07Multiple packets are serialized in one request.madmaxoft@gmail.com1-5/+6
2012-06-07Added more statistics to the packet queue overfill problem.madmaxoft@gmail.com1-2/+20
2012-06-07(Temporary) hotfix for the "too many packets" error - set the packet limit 5x higher.madmaxoft@gmail.com1-1/+7
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-41/+41
2012-06-04Updated zlib, added chat formatting, fixed upside down stairs and slabs, fixed makefiles, hopefully updated vc project filescedeel@gmail.com1-4/+21
2012-06-02ClientHandle dumps the contents of all packets in the queue if the packet queue gets overloaded to the point of client-kicking. Use this to debug FS #197.madmaxoft@gmail.com1-0/+63
2012-05-30Seeds can now be planted and they grow (albeit too quickly and too non-uniformly, need to fix blocktick selection)madmaxoft@gmail.com1-1/+28
2012-05-29Farmland is created using a hoe on dirt or grass.madmaxoft@gmail.com1-2/+12
2012-05-29Refactored item-eating from cClientHandle into cPlayermadmaxoft@gmail.com1-71/+2
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-65/+4
2012-05-25Merged the composable_generator branch into the trunkmadmaxoft@gmail.com1-4/+33
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-1/+16
2012-04-03Logging OnBlockDig and OnBlockPlace only in Debug mode ( http://mc-server.org/support/index.php?do=details&task_id=133&project=2 )madmaxoft@gmail.com1-2/+8
2012-03-26Added the supported client version to banner; shamelessly added myself to the authors list ;)madmaxoft@gmail.com1-1/+1
2012-03-24Added the new 1.2.4's PlayerAbilities packet; restructures packet files for less files, more dense.madmaxoft@gmail.com1-7/+3
2012-03-24Protocol version bumped up to 29 (MC 1.2.4), seems to work.madmaxoft@gmail.com1-1/+1
2012-03-24Removed the split between 1.2.3 and 1.1, left only 1.2.3 codemadmaxoft@gmail.com1-16/+0
2012-03-22Fixed a deadlock by removing clients from all chunks upon their exit, not using the clients chunklists.madmaxoft@gmail.com1-4/+7
2012-03-14Split chunk data into separate arrays; decoupled most sources from cChunk.h dependencymadmaxoft@gmail.com1-4/+4
2012-03-11Not sending chunks to the client twicemadmaxoft@gmail.com1-21/+16
2012-03-10Fixed a few obsoleted functionsmadmaxoft@gmail.com1-6/+8
2012-03-10Using references instead of pointers for sending packetsmadmaxoft@gmail.com1-15/+15
2012-03-09cClientHandles have a unique ID now to distinguish themfaketruth1-1/+11
2012-03-07Fixed bug where cPlayer's cClientHandle was used after cPlayer was destroyed http://forum.mc-server.org/showthread.php?tid=380faketruth1-1/+0
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-4/+11
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-33/+22
2012-03-04Changed signed char to unsigned char in block packets, so we can receive height up to 255faketruth1-4/+6
2012-03-03Got rid of some hardcoded numbers, now using hardcoded variables! woofaketruth1-2/+2
2012-03-02That should not have been committed...faketruth1-1/+1
2012-03-01Started carefully moving to 1.2.2faketruth1-1/+18
2012-02-29Fixed the authenticator bugmadmaxoft@gmail.com1-0/+6
2012-02-29Making sure cClientHandle::m_Player was NULL after authentication completedfaketruth1-0/+1
2012-02-28Setting the m_bDestroyed flag only after the cClienthandle is truly destroyed; cClientHandle's destructor now locks loaded chunk listsmadmaxoft@gmail.com1-3/+10
2012-02-26Attempt at fixing crashes with disconnecting playersmadmaxoft@gmail.com1-0/+8
2012-02-26Using cSocketThreads for client outgoing packets. Unfortunately had to put in one intermediate thread (cServer::cNotifyWriteThread) to avoid deadlocks. Still, seems we have a proper multithreading for clients and no more per-client threads, yay :)madmaxoft@gmail.com1-115/+73
2012-02-26Extended SocketThreads for writing support (unusable in cClientHandle due to too many deadlock possibilities)madmaxoft@gmail.com1-9/+8
2012-02-23Made the viewdistance settable by users and default in settings.ini. The default is 9.madmaxoft@gmail.com1-6/+27
2012-02-22Fixed a bug that no chunks were unloaded on the client. Now chunks are properly unloaded on the clients.faketruth1-0/+2
2012-02-21Removed cChunkPtrs from everywhere but internal cChunkMap usage. Now we should finally be threadsafe :)madmaxoft@gmail.com1-12/+9
2012-02-21Fixed heightmap optimization from rev 302; removed a few more cChunkPtrsmadmaxoft@gmail.com1-11/+3
2012-02-20Removed some more cChunkPtr usagemadmaxoft@gmail.com1-1/+4
2012-02-20Using own ASSERT() that logs to filefaketruth1-5/+5
2012-02-17Chunk coords mostly "upgraded" to include the Y coord for future compatibilitymadmaxoft@gmail.com1-14/+14
2012-02-16Got rid of dangerous GetEntity(), not using DoWithEntity()faketruth1-6/+20
2012-02-15Restored chest and furnace functionality as it was (it's basically working but joined chests show single-chest window)madmaxoft@gmail.com1-87/+85
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-294/+406
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-9/+10
2012-02-08cSocketThreads plugged in for cClientHandle reading. Sending still kept the old way. Please help me test this commit thoroughly, this is a change that can break on subtleties.madmaxoft@gmail.com1-110/+65
2012-02-07Rewritten all packets to use buffers instead of direct sockets, for future cSocketThreads compatibility.madmaxoft@gmail.com1-23/+38
2012-02-05Now showing proper error messages when sockets fail :)faketruth1-1/+1
2012-02-03cClientHandle: split packet handling into separate functions for claritymadmaxoft@gmail.com1-969/+1158
2012-02-02cClientHandle: gotten rid of the obnoxious m_pState, now using direct members insteadmadmaxoft@gmail.com1-332/+333
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-40/+28
2012-02-01sprintf() begone! Replaced with StringUtils' Printf()madmaxoft@gmail.com1-8/+12
2012-01-31Slight code cleanup, no big changesmadmaxoft@gmail.com1-40/+126
2012-01-29VC2008 / VC2010: Enabled precompiled header through Globals.h; the header included in every module in the project. Compilation optimization.madmaxoft@gmail.com1-8/+3
2012-01-23Cactus towers can be destroyed by removing the bottom blockfaketruth1-1/+53
2012-01-20MCServer is now compatible with Minecraft client 1.1 (as long as the client is not using any mods/plugins I think)faketruth1-2/+6
2012-01-19Terrain generation is synchronous again, async generation has bugs.faketruth1-1/+33
2012-01-02Fixed crashing bug in cClientHandle::~cClientHandlefaketruth1-1/+3
2012-01-01Fixed the numchunks console command.faketruth1-8/+8
2012-01-01- implemented separated inventory for creative mode (cSurvivalInventory and cCreativeInventory)lapayo94@gmail.com1-17/+37
2012-01-01Chests, furnaces and dispensers face the correct way now.faketruth1-0/+5
2011-12-31Made a couple of functions in cChunk inline, this should speed up several block operations on chunksfaketruth1-16/+6
2011-12-29 - Initial food handling by cedeelmtilden@gmail.com1-13/+30
2011-12-29 - Chests open and close on clients when opened/closedmtilden@gmail.com1-1/+1
2011-12-29- Pickups should now burn in firelapayo94@gmail.com1-2/+9
2011-12-28- implemented the fire simulation in native c++ (cFireSimulator)lapayo94@gmail.com1-84/+43
2011-12-28 - Fixed too fast actions kick for realmtilden@gmail.com1-5/+5
2011-12-28Fixed some small memory leakslapayo94@gmail.com1-0/+5
2011-12-28 - Didn't notice steak missing as wellmtilden@gmail.com1-0/+8
2011-12-28 - Added chicken to eatingmtilden@gmail.com1-0/+9
2011-12-27I'll lower my frequency of commits.. 1000 default ends up sent more often than calc'd packets.mtilden@gmail.com1-1/+0
2011-12-27Oops, accidentally left debug printmtilden@gmail.com1-1/+0
2011-12-27 - Added basic ping handling.mtilden@gmail.com1-3/+27
2011-12-27Slightly cleaner block change interactions static in headermtilden@gmail.com1-2/+2
2011-12-27Set player interaction kicking to 5 interactions per .1 seconds to help with lag disconnects. Still need to change code to lessen the false positives.admin@omencraft.com1-2/+2
2011-12-26Players can switch worlds on the fly with the command /gotoworld [worldName]. This uses the function cPlayer::MoveToWorld()faketruth1-0/+14
2011-12-26Fixed the little check for max players. If somehow a player was able to connect and the number of players would exceed the max players, everybody is allowed in and the server will never be 'full'. It's fixed nowfaketruth1-9/+9
2011-12-26 - Linux compatible fixes including updated makefilemtilden@gmail.com1-3/+7
2011-12-26 - Default Notchian Ping (static until ping implemented through keepalive send/receive)mtilden@gmail.com1-2/+10
2011-12-26 - Scoreboard deleting moved to cClientHandle::~cClientHandle() with checks. Please test this every way you can with clients disconnecting from the internet, crashing, etc. It should work on all cases as every client gets called in this part to be 'Deleted'mtilden@gmail.com1-6/+10
2011-12-26 - Cleaned up PLI Packet and its creation/sending and fixed bug of player not being removed on scoreboard (forgot to send color in the removal packet)mtilden@gmail.com1-6/+6
2011-12-26 - Make Color was using 2 extra characters which took 2 characters off the 16 max (including color codes) for scoreboard displaymtilden@gmail.com1-0/+11
2011-12-25Hold item is now dropped when inventory is closedlapayo94@gmail.com1-2/+4
2011-12-25Code improvementslapayo94@gmail.com1-0/+1
2011-12-25- improved and simplified the door system (shorter, clearer)lapayo94@gmail.com1-26/+25
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-7/+21
2011-12-24Max. players and MOTD are now changeable in the settings.inilapayo94@gmail.com1-3/+9
2011-12-23Added thread names to cThread so when debugging in Visual Studio you actually know what thread you're looking atfaketruth1-3/+3
2011-12-22Digging leaves with shears now drops leaveslapayo94@gmail.com1-1/+2
2011-12-21- Crafting fixed in 1.0.0lapayo94@gmail.com1-7/+26
2011-11-11Found and fixed a bug not letting users place blocks in water or lava.admin@omencraft.com1-2/+7
2011-11-10Fixed logging in underground bug this time. A hack, but it works. :Dadmin@omencraft.com1-4/+4
2011-11-10Can now set gamemode via lua.admin@omencraft.com1-1/+1
2011-11-10Made block action sanity checks more robust, water buckets, lava buckets and empty buckets should all now work.admin@omencraft.com1-15/+70
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-2/+48
2011-11-10Added random weather that persists per world. Also added SetWeather, GetWeather, and CastThunderbolt to lua bindings.admin@omencraft.com1-17/+7
2011-11-09Added m_IP to player class and binding to get IP for LUA. (Probably should use m_pState)admin@omencraft.com1-0/+2
2011-11-08It's a Squirrel!!faketruth1-0/+1
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-15/+34
2011-11-07Added Sebi's changes to pistons and item drops.admin@omencraft.com1-13/+20
2011-11-07Pistons now generate noise and animate when moving.admin@omencraft.com1-1/+1
2011-11-06Redstone wire now updates correctly when added and removed. it also updates all currently programmed redstone items and wire circuits. Also cleaned up the mess I left of the code.admin@omencraft.com1-2/+6
2011-11-06Redstone is now self aware. It's not quite as dumb as it used to be at any rate. Redstone wires have no range and understand they are supposed to stay on whenever there's an active torch touching it. (Need to add other power devices)admin@omencraft.com1-9/+29
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-7/+5
2011-11-05Added all the items up to Beta 1.9.5. Added pistons and piston class.admin@omencraft.com1-2/+10
2011-11-04Added (Probably incorrectly) a cRedstone class. Also, palcing a redstone torch will recursively light any redstone wire it's connected to. Removing a torch from an active wire will unlight the entire length. Class needs to be updated to make use of non deprecated function. Current deprecated function warning drastically slows redstone performance.admin@omencraft.com1-5/+27
2011-11-03Fixed some redstone items and a bug that prevented floats from client to server packets reading correctly on 64 bit linux.admin@omencraft.com1-2/+0
2011-11-03Added some redstone items.admin@omencraft.com1-6/+30
2011-11-03Updated the thunderbolt packet. Lightning and rain can be tested with a workbench and a chest. >:)admin@omencraft.com1-7/+17
2011-11-02Added New/Invaid State and Thunderbolt packets. For testing purposes it now rains whenever a player opens a workbench and stops when they pen a chest. The rain start/stop in only sent to the sole clientopening the items.admin@omencraft.com1-7/+26
2011-11-02Fixed some "Entity was not found in any chunk!" warningsfaketruth1-4/+8
2011-11-02Fixed player spawn teleport postion.admin@omencraft.com1-1/+2
2011-11-01fixed player spawning in the ground.admin@omencraft.com1-0/+4
2011-11-01Accidentally removed a line of codefaketruth1-1/+2
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-46/+49
2011-11-01Put in some sanity checks to ensure players don't interact with blocks too quickly. Changed gamemode to be player based. (MCServer crashes when picking up an item. Need to find and fix bug.)admin@omencraft.com1-5/+23
2011-11-01Players can now place blocks in creative mode. The blocks players select from the creative mode inventory are not stored in the players' inventory. (I kind of like that)admin@omencraft.com1-3/+3
2011-10-31Prepared some parts of the code for multi world support, I created lots of TODO'sfaketruth1-15/+16
2011-10-27Fixed a memory leakfaketruth1-0/+1
2011-10-26Made several recomended changes. Gamemode is now world based. Need to add it to player.admin@omencraft.com1-3/+4
2011-10-26Moved GAMEMODE declaration to a single place... cPacket.h. Player can't take damage any more but can still sometimes die on spawn. Not sure why. Falling through the void does not kill you yet.admin@omencraft.com1-2/+2
2011-10-26Creative mode now breaks blocks without providing block drops. Need to work with Player's Inventory for proper creative mode support. GAMEMODE is declared and set twice.admin@omencraft.com1-3/+3
2011-10-26Added CreateInventoryAction packet for creative mode. Used cPacketEntityEquipment as template. Forced server into Creative Mode. Can't break blocks yet. Player can stil be damaged in creative mode and dying takes you back to survival mode.admin@omencraft.com1-0/+2
2011-10-26added simple code for server side item durabilty on tool items that have durabilty. need to add block destroyed durability modifier.admin@omencraft.com1-3/+70
2011-10-23Abstracted sockets some more to ensure the same behavior over the entire program and on multiple platforms.faketruth1-19/+3
2011-10-21Compiles for linuxfaketruth1-2/+8
2011-10-03MCServer c++ source filesfaketruth1-0/+1082