summaryrefslogtreecommitdiffstats
path: root/source/cClientHandle.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2012-09-24Source files cleanup: The rest of the files renamed.madmaxoft@gmail.com1-1651/+0
git-svn-id: http://mc-server.googlecode.com/svn/trunk@887 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-23Source files cleanup: ChunkDataSerializer is Protocol-relatedmadmaxoft@gmail.com1-1/+0
git-svn-id: http://mc-server.googlecode.com/svn/trunk@886 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-23Source files cleanup: OSSupport-related files in a separate subfolder, renamed.madmaxoft@gmail.com1-4/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@885 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-23Source files cleanup: Removed unused cBlockToPickupmadmaxoft@gmail.com1-1/+0
git-svn-id: http://mc-server.googlecode.com/svn/trunk@884 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-23Source files cleanup: Mobs-related files in a separate subfolder, renamed.madmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@883 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-23Source files cleanup: Protocol-related files in a separate subfoldermadmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@880 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-23Source files cleanup: UI files renamedmadmaxoft@gmail.com1-2/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@878 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-23Fixed position confirming for 1.3.2 (FS #245)madmaxoft@gmail.com1-1/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@877 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-23Fixed players not spawning to others when they join the server.madmaxoft@gmail.com1-0/+3
Ref.: http://forum.mc-server.org/showthread.php?tid=434&pid=4633#pid4633 git-svn-id: http://mc-server.googlecode.com/svn/trunk@876 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-23Tweaked logging.madmaxoft@gmail.com1-0/+6
Less output for UI. More output for player pos confirming (FS #245) and for player spawning git-svn-id: http://mc-server.googlecode.com/svn/trunk@875 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-20Refactored windows.madmaxoft@gmail.com1-12/+14
As described on the forum: http://forum.mc-server.org/showthread.php?tid=561 For now, only basic clicking works; shift-click not implemented yet. git-svn-id: http://mc-server.googlecode.com/svn/trunk@867 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-11Merged in a patch for sounds by l0udPLmadmaxoft@gmail.com1-0/+11
http://forum.mc-server.org/showthread.php?tid=434&pid=4564#pid4564 git-svn-id: http://mc-server.googlecode.com/svn/trunk@858 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-07Relaxed the check for held item, the client sometimes sends wrong ItemType.madmaxoft@gmail.com1-2/+9
http://forum.mc-server.org/showthread.php?tid=549&pid=4502#pid4502 git-svn-id: http://mc-server.googlecode.com/svn/trunk@846 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-06Added protocol-specific authentication, now works for both 1.2.5 and 1.3.2madmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@841 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-06ClientHandle: added an overflow buffer for outgoing data, it fixes the "bad packet id" problem with 1.3.2.madmaxoft@gmail.com1-5/+32
git-svn-id: http://mc-server.googlecode.com/svn/trunk@837 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-05Added the possibility of reserved player slots by implementing the HandleHandshake hook!faketruth1-0/+17
More info: http://forum.mc-server.org/showthread.php?tid=555 git-svn-id: http://mc-server.googlecode.com/svn/trunk@836 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-04Fixed a possible race condition in cClientHandle's packet sending code; prepared for moving cSocket out of cClientHandle's ownership.madmaxoft@gmail.com1-2/+5
git-svn-id: http://mc-server.googlecode.com/svn/trunk@832 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-02Next iteration on the 1.3.2 protocol. Still no good, but sometimes it just gets through. For your testing pleasures ;)madmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@819 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-01Fix for Rev 814, the correct cPlayer object is actually sent into the callbacks.madmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@816 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-01Implemented: http://www.mc-server.org/support/index.php?do=details&task_id=239&project=2&dev=26lapayo94@gmail.com1-1/+1
Fixed Bug on build collision git-svn-id: http://mc-server.googlecode.com/svn/trunk@813 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-31Progress on the 1.3.2 protocol.madmaxoft@gmail.com1-2/+2
Sometimes the client lets the player through, but most of the times the connection breaks for no apparent reason. git-svn-id: http://mc-server.googlecode.com/svn/trunk@812 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-31Another possible deadlock in cClientHandle averted. Hope this is the one.madmaxoft@gmail.com1-5/+13
git-svn-id: http://mc-server.googlecode.com/svn/trunk@810 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-31Fixed one possibility of a deadlock in cClientHandle::SendChunkData()madmaxoft@gmail.com1-13/+16
git-svn-id: http://mc-server.googlecode.com/svn/trunk@809 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-30Added a basic protocol recognizer and the base for 1.3.2 protocol.madmaxoft@gmail.com1-25/+10
Also fixed a few type-related warnings. git-svn-id: http://mc-server.googlecode.com/svn/trunk@805 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-30cProtocol handles the initial handshake up to player loginmadmaxoft@gmail.com1-58/+4
git-svn-id: http://mc-server.googlecode.com/svn/trunk@804 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-29Gotten completely rid of all cPackets. The cProtocol125 class now does all the parsing and writing by itself.madmaxoft@gmail.com1-4/+4
git-svn-id: http://mc-server.googlecode.com/svn/trunk@802 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-28Moved all packet-serializing code into cProtocol125; half the packet classes aren't needed anymore.madmaxoft@gmail.com1-38/+36
git-svn-id: http://mc-server.googlecode.com/svn/trunk@800 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-27Cut out all packet handling to a separate cProtocol descendantmadmaxoft@gmail.com1-892/+175
git-svn-id: http://mc-server.googlecode.com/svn/trunk@796 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-26git-svn-id: http://mc-server.googlecode.com/svn/trunk@795 0a769ca7-a7f5-676a-18bf-c427514a06d6madmaxoft@gmail.com1-0/+16
2012-08-25cSocket doesn't use cPackets.madmaxoft@gmail.com1-10/+7
git-svn-id: http://mc-server.googlecode.com/svn/trunk@790 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-25cWorld doesn't use cPackets.madmaxoft@gmail.com1-0/+58
git-svn-id: http://mc-server.googlecode.com/svn/trunk@789 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-25Removed cPackets from cChunk.madmaxoft@gmail.com1-2/+69
Also decoupled a possible deadlock in player login code. git-svn-id: http://mc-server.googlecode.com/svn/trunk@788 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-24cPickup doesn't use cPackets.madmaxoft@gmail.com1-0/+13
Also, Lua API change, OnCollectItem -> OnCollectPickup; first param is cPlayer to match other callbacks. git-svn-id: http://mc-server.googlecode.com/svn/trunk@786 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-24Monster classes don't use cPackets. Chat messages are sent / broadcast without cPackets. BlockEntities don't use cPackets.madmaxoft@gmail.com1-0/+77
git-svn-id: http://mc-server.googlecode.com/svn/trunk@783 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-19Window, Chest, Furnace and Pawn are not using cPackets at allmadmaxoft@gmail.com1-0/+39
git-svn-id: http://mc-server.googlecode.com/svn/trunk@762 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-19Almost all packets' handling is now rewritten not to use cPacket descendants elsewhere than in cClientHandle.madmaxoft@gmail.com1-49/+286
git-svn-id: http://mc-server.googlecode.com/svn/trunk@761 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-19Another handful of packets rewritten.madmaxoft@gmail.com1-31/+123
Also changed cItem::m_ItemID into m_ItemType of type short. Easier handling. m_ItemID kept for compatibility reasons (Lua-interface etc.) git-svn-id: http://mc-server.googlecode.com/svn/trunk@756 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-19Fixed Bug #236lapayo94@gmail.com1-3/+3
Workbench, Chest and Furnace are usable again git-svn-id: http://mc-server.googlecode.com/svn/trunk@755 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-18Chat packet handled in the new way; fixed missing packet sending for inventory slot.madmaxoft@gmail.com1-26/+28
Again, API change! cPlugin:OnChat() has had its parameters swapped, to match all the other callbacks - Player first, Message second git-svn-id: http://mc-server.googlecode.com/svn/trunk@751 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-18Packet refactoring, phase two, partial. Rewritten a few packet handling functions not to use cPacket-descendant objects.madmaxoft@gmail.com1-115/+196
This breaks plugin API! Plugins need to modify their hook functions to match those used in the Core plugin git-svn-id: http://mc-server.googlecode.com/svn/trunk@750 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-17Packets now parse themselves from a cByteBuffer object (1st part of packeting rewrite, http://forum.mc-server.org/showthread.php?tid=524 )madmaxoft@gmail.com1-15/+37
git-svn-id: http://mc-server.googlecode.com/svn/trunk@744 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-15Added temporary debug statistics of the RelEntMoveLook packet removal efficiencymadmaxoft@gmail.com1-0/+12
git-svn-id: http://mc-server.googlecode.com/svn/trunk@740 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-06A bit of cleanup and documentation around the UI window handlingmadmaxoft@gmail.com1-2/+4
git-svn-id: http://mc-server.googlecode.com/svn/trunk@716 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-17Simple health regeneration systemlapayo94@gmail.com1-14/+3
Prepared for food git-svn-id: http://mc-server.googlecode.com/svn/trunk@679 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-16Fixed some small bugs :)lapayo94@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@672 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-15A new Block handling system :olapayo94@gmail.com1-560/+78
It was really a lot of work :D Took me the complete weekend :D Would really like to here your opinion on this =) The aim of this is to put all the actions for one block in one place so it is not spread around the source. (ToPickup, Action in cWorld, Action in cChunk, Action here, action there :D) git-svn-id: http://mc-server.googlecode.com/svn/trunk@671 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-13The gamemode is now only saved if it is different from the current gamemode.lapayo94@gmail.com1-1/+2
Default gamemode now depends on the joined world, not on the default world git-svn-id: http://mc-server.googlecode.com/svn/trunk@661 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-12Save last gamemodelapayo94@gmail.com1-1/+9
git-svn-id: http://mc-server.googlecode.com/svn/trunk@660 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-16Leaves: Applied patch by Luksor.cedeel@gmail.com1-0/+5
git-svn-id: http://mc-server.googlecode.com/svn/trunk@624 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-16Proper kick reasons!cedeel@gmail.com1-3/+6
git-svn-id: http://mc-server.googlecode.com/svn/trunk@621 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-16Exported cWorld::ForEachEntity and cWorld::ForEachEntityInChunk; no idea if they actually workmadmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@620 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-15Lit furnaces can be used by playersmadmaxoft@gmail.com1-0/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@617 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-15Basic handling of vines. No growth yet.cedeel@gmail.com1-13/+18
git-svn-id: http://mc-server.googlecode.com/svn/trunk@615 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-15Fixed placing block on tall grass (FS #209)madmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@614 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-14Fixed snow again, this time for real.cedeel@gmail.com1-2/+17
I didn't realize the client would also try to replace the snow from the sides. git-svn-id: http://mc-server.googlecode.com/svn/trunk@612 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-14Fixes placing blocks on snow.cedeel@gmail.com1-10/+21
Also a little formatting. git-svn-id: http://mc-server.googlecode.com/svn/trunk@611 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-14Attempt to bring sanity to newlines across systems.cedeel@gmail.com1-2084/+2084
git-svn-id: http://mc-server.googlecode.com/svn/trunk@606 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-13Added a BlockToPickup hook for modifying pickups when a player breaks a block.madmaxoft@gmail.com1-2/+4
git-svn-id: http://mc-server.googlecode.com/svn/trunk@602 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-09Disallowed placing cacti in watermadmaxoft@gmail.com1-0/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@592 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-09Plants growable by bonemeal are settable in the world.ini. Default matches vanilla MC.madmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@584 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-09Bonemeal is consumed in survival mode when used on growable blocksmadmaxoft@gmail.com1-1/+5
git-svn-id: http://mc-server.googlecode.com/svn/trunk@582 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-08Sugarcane grows and can be grown using bonemeal.madmaxoft@gmail.com1-0/+5
git-svn-id: http://mc-server.googlecode.com/svn/trunk@578 0a769ca7-a7f5-676a-18bf-c427514a06d6
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-3/+33
git-svn-id: http://mc-server.googlecode.com/svn/trunk@573 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-07Repeaters' delays can be set by rclkmadmaxoft@gmail.com1-3/+8
git-svn-id: http://mc-server.googlecode.com/svn/trunk@570 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-07Multiple packets are serialized in one request.madmaxoft@gmail.com1-5/+6
git-svn-id: http://mc-server.googlecode.com/svn/trunk@568 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-07Added more statistics to the packet queue overfill problem.madmaxoft@gmail.com1-2/+20
git-svn-id: http://mc-server.googlecode.com/svn/trunk@566 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-07(Temporary) hotfix for the "too many packets" error - set the packet limit 5x higher.madmaxoft@gmail.com1-1/+7
git-svn-id: http://mc-server.googlecode.com/svn/trunk@565 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@561 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-04Updated zlib, added chat formatting, fixed upside down stairs and slabs, fixed makefiles, hopefully updated vc project filescedeel@gmail.com1-4/+21
git-svn-id: http://mc-server.googlecode.com/svn/trunk@546 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@540 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@523 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-05-29Farmland is created using a hoe on dirt or grass.madmaxoft@gmail.com1-2/+12
git-svn-id: http://mc-server.googlecode.com/svn/trunk@520 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-05-29Refactored item-eating from cClientHandle into cPlayermadmaxoft@gmail.com1-71/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@519 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@518 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-05-25Merged the composable_generator branch into the trunkmadmaxoft@gmail.com1-4/+33
git-svn-id: http://mc-server.googlecode.com/svn/trunk@504 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@454 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@447 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-26Added the supported client version to banner; shamelessly added myself to the authors list ;)madmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@436 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-24Added the new 1.2.4's PlayerAbilities packet; restructures packet files for less files, more dense.madmaxoft@gmail.com1-7/+3
git-svn-id: http://mc-server.googlecode.com/svn/trunk@431 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-24Protocol version bumped up to 29 (MC 1.2.4), seems to work.madmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@430 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-24Removed the split between 1.2.3 and 1.1, left only 1.2.3 codemadmaxoft@gmail.com1-16/+0
git-svn-id: http://mc-server.googlecode.com/svn/trunk@429 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-22Fixed a deadlock by removing clients from all chunks upon their exit, not using the clients chunklists.madmaxoft@gmail.com1-4/+7
git-svn-id: http://mc-server.googlecode.com/svn/trunk@426 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-14Split chunk data into separate arrays; decoupled most sources from cChunk.h dependencymadmaxoft@gmail.com1-4/+4
git-svn-id: http://mc-server.googlecode.com/svn/trunk@411 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-11Not sending chunks to the client twicemadmaxoft@gmail.com1-21/+16
git-svn-id: http://mc-server.googlecode.com/svn/trunk@399 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-10Fixed a few obsoleted functionsmadmaxoft@gmail.com1-6/+8
git-svn-id: http://mc-server.googlecode.com/svn/trunk@397 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-10Using references instead of pointers for sending packetsmadmaxoft@gmail.com1-15/+15
git-svn-id: http://mc-server.googlecode.com/svn/trunk@394 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-09cClientHandles have a unique ID now to distinguish themfaketruth1-1/+11
cAuthenticator uses unique client ID for authentication Changed the kick function used by cAuthenticator to take a client ID instead of name, so the correct user is kicked Using callback reference instead of pointer in GetChunkData and affiliates GetChunkData returns false when failed, and true when succeeded Renamed entity type enums to something prettier Exposed some functions to Lua git-svn-id: http://mc-server.googlecode.com/svn/trunk@388 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
Also removed the SetClientHandle() function from cPlayer Added a Destroyed() function to cEntity that is called ONLY ONCE after an entity has been 'destroyed' Cleaned up some code, using enums for GameMode and Weather and replaced some 'const char *' with 'const AString &' Exposed some more functions to Lua git-svn-id: http://mc-server.googlecode.com/svn/trunk@382 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@371 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@365 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-04Changed signed char to unsigned char in block packets, so we can receive height up to 255faketruth1-4/+6
Blocks placed above 128 limit don't become obsidian anymore. This was due to the cChunk::MakeIndex() function return 0 when outside of bounds, it now returns an 'error constant' git-svn-id: http://mc-server.googlecode.com/svn/trunk@356 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-03Got rid of some hardcoded numbers, now using hardcoded variables! woofaketruth1-2/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@355 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-02That should not have been committed...faketruth1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@354 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-01Started carefully moving to 1.2.2faketruth1-1/+18
Clients can get up to the login packet, after which the server tries to send chunks but in the wrong format and the client disconnects git-svn-id: http://mc-server.googlecode.com/svn/trunk@347 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-29Fixed the authenticator bugmadmaxoft@gmail.com1-0/+6
git-svn-id: http://mc-server.googlecode.com/svn/trunk@344 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-29Making sure cClientHandle::m_Player was NULL after authentication completedfaketruth1-0/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@343 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@340 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-26Attempt at fixing crashes with disconnecting playersmadmaxoft@gmail.com1-0/+8
git-svn-id: http://mc-server.googlecode.com/svn/trunk@329 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@328 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-26Extended SocketThreads for writing support (unusable in cClientHandle due to too many deadlock possibilities)madmaxoft@gmail.com1-9/+8
Extended the range of ignored packets in pre-game client states (fixes connection issues with some mods installed) git-svn-id: http://mc-server.googlecode.com/svn/trunk@327 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-23Made the viewdistance settable by users and default in settings.ini. The default is 9.madmaxoft@gmail.com1-6/+27
git-svn-id: http://mc-server.googlecode.com/svn/trunk@326 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-22Fixed a bug that no chunks were unloaded on the client. Now chunks are properly unloaded on the clients.faketruth1-0/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@318 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-21Removed cChunkPtrs from everywhere but internal cChunkMap usage. Now we should finally be threadsafe :)madmaxoft@gmail.com1-12/+9
Also fixed a threading issue when a player connecting might have gotten stuck in "Downloading world" forever git-svn-id: http://mc-server.googlecode.com/svn/trunk@304 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-21Fixed heightmap optimization from rev 302; removed a few more cChunkPtrsmadmaxoft@gmail.com1-11/+3
git-svn-id: http://mc-server.googlecode.com/svn/trunk@303 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-20Removed some more cChunkPtr usagemadmaxoft@gmail.com1-1/+4
git-svn-id: http://mc-server.googlecode.com/svn/trunk@298 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-20Using own ASSERT() that logs to filefaketruth1-5/+5
git-svn-id: http://mc-server.googlecode.com/svn/trunk@297 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-17Chunk coords mostly "upgraded" to include the Y coord for future compatibilitymadmaxoft@gmail.com1-14/+14
git-svn-id: http://mc-server.googlecode.com/svn/trunk@285 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-16Got rid of dangerous GetEntity(), not using DoWithEntity()faketruth1-6/+20
git-svn-id: http://mc-server.googlecode.com/svn/trunk@278 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@263 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@251 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@245 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@244 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-07Rewritten all packets to use buffers instead of direct sockets, for future cSocketThreads compatibility.madmaxoft@gmail.com1-23/+38
Moved data sending from cPacket into cSocket git-svn-id: http://mc-server.googlecode.com/svn/trunk@240 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-05Now showing proper error messages when sockets fail :)faketruth1-1/+1
Crossplatform GetLastError function in cSocket git-svn-id: http://mc-server.googlecode.com/svn/trunk@234 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-03cClientHandle: split packet handling into separate functions for claritymadmaxoft@gmail.com1-969/+1158
git-svn-id: http://mc-server.googlecode.com/svn/trunk@229 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-02cClientHandle: gotten rid of the obnoxious m_pState, now using direct members insteadmadmaxoft@gmail.com1-332/+333
git-svn-id: http://mc-server.googlecode.com/svn/trunk@228 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
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
2012-02-01sprintf() begone! Replaced with StringUtils' Printf()madmaxoft@gmail.com1-8/+12
git-svn-id: http://mc-server.googlecode.com/svn/trunk@216 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-01-31Slight code cleanup, no big changesmadmaxoft@gmail.com1-40/+126
git-svn-id: http://mc-server.googlecode.com/svn/trunk@202 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@188 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-01-23Cactus towers can be destroyed by removing the bottom blockfaketruth1-1/+53
Added checks whether flowers/mushrooms/saplings can be placed on surface Added checks for cactus to see if it's allowed to be placed Fluids now wash away certain items (flower, sapling, cactus) git-svn-id: http://mc-server.googlecode.com/svn/trunk@169 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@165 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-01-19Terrain generation is synchronous again, async generation has bugs.faketruth1-1/+33
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
2012-01-02Fixed crashing bug in cClientHandle::~cClientHandlefaketruth1-1/+3
When there are players in the server, and a client connects as far as the handshake and then disconnects, the server crashed. This is because there is no m_Player yet after the handshake, and the destructor uses m_Player without checking if it exists git-svn-id: http://mc-server.googlecode.com/svn/trunk@163 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-01-01Fixed the numchunks console command.faketruth1-8/+8
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
2012-01-01- implemented separated inventory for creative mode (cSurvivalInventory and cCreativeInventory)lapayo94@gmail.com1-17/+37
(Separation is not perfect yet, because maybe there are some mayor changes needed :D) - implemented CreativeInventoryAction (was mistakenly called CreateInventoryAction) -> Fixed meta data for creative selected blocks ->->Slabs/Steps are now placed correctly - slabs can now be build to a double slab - fixed a bug in the inventory which put items with different meta values in the same slot git-svn-id: http://mc-server.googlecode.com/svn/trunk@160 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-01-01Chests, furnaces and dispensers face the correct way now.faketruth1-0/+5
http://mc-server.org/support/index.php?do=details&task_id=88 git-svn-id: http://mc-server.googlecode.com/svn/trunk@159 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-31Made a couple of functions in cChunk inline, this should speed up several block operations on chunksfaketruth1-16/+6
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
2011-12-29 - Initial food handling by cedeelmtilden@gmail.com1-13/+30
git-svn-id: http://mc-server.googlecode.com/svn/trunk@156 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-29 - Chests open and close on clients when opened/closedmtilden@gmail.com1-1/+1
- Beginnings of "Double Chest". All that's needed is detection when 2 chests get put next to each other, block other chests from then touching them on any side, load/save with the m_JoinedChest seeing each other and adding and making sure the left side is always the top rows. I'm not sure exactly at this moment how to do all of the detection and saving/loading of the double chest stuff so if you've any ideas feel free to point out some areas in the server code or implement it yourself. git-svn-id: http://mc-server.googlecode.com/svn/trunk@154 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-29- Pickups should now burn in firelapayo94@gmail.com1-2/+9
- The player no longer gets an empty bucket when in creative mode - improved the simulators again (moved to std::list because this should be faster with so many objects) (But the water simulation still is very slow) git-svn-id: http://mc-server.googlecode.com/svn/trunk@153 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-28- implemented the fire simulation in native c++ (cFireSimulator)lapayo94@gmail.com1-84/+43
- 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
2011-12-28 - Fixed too fast actions kick for realmtilden@gmail.com1-5/+5
git-svn-id: http://mc-server.googlecode.com/svn/trunk@149 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-28Fixed some small memory leakslapayo94@gmail.com1-0/+5
git-svn-id: http://mc-server.googlecode.com/svn/trunk@148 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-28 - Didn't notice steak missing as wellmtilden@gmail.com1-0/+8
Interesting to note, when you make a food item handled with health it gets rid of the eating animation, this seems backwards. git-svn-id: http://mc-server.googlecode.com/svn/trunk@143 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-28 - Added chicken to eatingmtilden@gmail.com1-0/+9
- Increased max interactions again, seems to be fine now for even the fastest clickers. git-svn-id: http://mc-server.googlecode.com/svn/trunk@142 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@135 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-27Oops, accidentally left debug printmtilden@gmail.com1-1/+0
git-svn-id: http://mc-server.googlecode.com/svn/trunk@134 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-27 - Added basic ping handling.mtilden@gmail.com1-3/+27
Not sure what's up with the MC client, though. It doesn't seem to end up giving good results like the KA packet return is hanging and waiting for other things to process instead of being handled on its own to give a true result. Feel free to update if there's any way to deliver truer results. git-svn-id: http://mc-server.googlecode.com/svn/trunk@133 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-27Slightly cleaner block change interactions static in headermtilden@gmail.com1-2/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@130 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@128 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-26Players can switch worlds on the fly with the command /gotoworld [worldName]. This uses the function cPlayer::MoveToWorld()faketruth1-0/+14
Changed isValidItem to IsValidItem in Core.lua git-svn-id: http://mc-server.googlecode.com/svn/trunk@126 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@122 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-26 - Linux compatible fixes including updated makefilemtilden@gmail.com1-3/+7
- 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
2011-12-26 - Default Notchian Ping (static until ping implemented through keepalive send/receive)mtilden@gmail.com1-2/+10
- Player "left" message regardless of exit reason git-svn-id: http://mc-server.googlecode.com/svn/trunk@119 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@118 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@116 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
- Added xC9 PlayerListItem packet and added code for player names to be added and removed from the scoreboard (need a catch-all for client disconnects: crashes, timeouts, etc) - Changed wid wording to a_WindowType git-svn-id: http://mc-server.googlecode.com/svn/trunk@113 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-25Hold item is now dropped when inventory is closedlapayo94@gmail.com1-2/+4
Thanks to mtilden for this ( http://forum.mc-server.org/showthread.php?tid=183&pid=1428#pid1428 ) Also the items in the 4 crafting slots are now dropped. git-svn-id: http://mc-server.googlecode.com/svn/trunk@107 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-25Code improvementslapayo94@gmail.com1-0/+1
Fixed authentication (Can be activated now) Added MersenneTwister.h Thanks to mtilden ( http://forum.mc-server.org/showthread.php?tid=183&pid=1428#pid1428 and http://forum.mc-server.org/showthread.php?tid=183&pid=1418#pid1418 ) git-svn-id: http://mc-server.googlecode.com/svn/trunk@106 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-25- improved and simplified the door system (shorter, clearer)lapayo94@gmail.com1-26/+25
- Doors now drop a complete door & other part gets destroyed - Build a function for pickup counts (cBlockToPickup::PickupCount) (Default is 1) git-svn-id: http://mc-server.googlecode.com/svn/trunk@104 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
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
2011-12-24Max. players and MOTD are now changeable in the settings.inilapayo94@gmail.com1-3/+9
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
2011-12-23Added thread names to cThread so when debugging in Visual Studio you actually know what thread you're looking atfaketruth1-3/+3
git-svn-id: http://mc-server.googlecode.com/svn/trunk@100 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-22Digging leaves with shears now drops leaveslapayo94@gmail.com1-1/+2
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
2011-12-21- Crafting fixed in 1.0.0lapayo94@gmail.com1-7/+26
- Server compatible with the weapons and equip again. (Some Packets were incompatible) - fixed bucket bugs (not all) - Fixed clients getting crashed by wrong Pickups - fixed nearly all mob drops. (Check wheather they are burning is missing Big Grin) - maybe some other things I can´t recall atm Big Grin git-svn-id: http://mc-server.googlecode.com/svn/trunk@94 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-11-11Found and fixed a bug not letting users place blocks in water or lava.admin@omencraft.com1-2/+7
git-svn-id: http://mc-server.googlecode.com/svn/trunk@91 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-11-10Fixed logging in underground bug this time. A hack, but it works. :Dadmin@omencraft.com1-4/+4
git-svn-id: http://mc-server.googlecode.com/svn/trunk@90 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-11-10Can now set gamemode via lua.admin@omencraft.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@89 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@87 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@85 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-11-10Added random weather that persists per world. Also added SetWeather, GetWeather, and CastThunderbolt to lua bindings.admin@omencraft.com1-17/+7
git-svn-id: http://mc-server.googlecode.com/svn/trunk@83 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@82 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-11-08It's a Squirrel!!faketruth1-0/+1
In SquirrelBindings.h use #define USE_SQUIRREL 1 to enable squirrel git-svn-id: http://mc-server.googlecode.com/svn/trunk@76 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@74 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-11-07Added Sebi's changes to pistons and item drops.admin@omencraft.com1-13/+20
git-svn-id: http://mc-server.googlecode.com/svn/trunk@72 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-11-07Pistons now generate noise and animate when moving.admin@omencraft.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@71 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@69 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@68 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@67 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-11-05Added all the items up to Beta 1.9.5. Added pistons and piston class.admin@omencraft.com1-2/+10
git-svn-id: http://mc-server.googlecode.com/svn/trunk@63 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@51 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@50 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-11-03Added some redstone items.admin@omencraft.com1-6/+30
git-svn-id: http://mc-server.googlecode.com/svn/trunk@49 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-11-03Updated the thunderbolt packet. Lightning and rain can be tested with a workbench and a chest. >:)admin@omencraft.com1-7/+17
git-svn-id: http://mc-server.googlecode.com/svn/trunk@48 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@47 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-11-02Fixed some "Entity was not found in any chunk!" warningsfaketruth1-4/+8
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
2011-11-02Fixed player spawn teleport postion.admin@omencraft.com1-1/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@45 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-11-01fixed player spawning in the ground.admin@omencraft.com1-0/+4
git-svn-id: http://mc-server.googlecode.com/svn/trunk@42 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-11-01Accidentally removed a line of codefaketruth1-1/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@41 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
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
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@38 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@37 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-10-31Prepared some parts of the code for multi world support, I created lots of TODO'sfaketruth1-15/+16
git-svn-id: http://mc-server.googlecode.com/svn/trunk@29 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-10-27Fixed a memory leakfaketruth1-0/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@19 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-10-26Made several recomended changes. Gamemode is now world based. Need to add it to player.admin@omencraft.com1-3/+4
git-svn-id: http://mc-server.googlecode.com/svn/trunk@18 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@17 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@16 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@15 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@12 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-10-23Abstracted sockets some more to ensure the same behavior over the entire program and on multiple platforms.faketruth1-19/+3
MCSocket.h should soon be deprecated and deleted Do a full rebuild (mine bugged out when I didn't) git-svn-id: http://mc-server.googlecode.com/svn/trunk@8 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-10-21Compiles for linuxfaketruth1-2/+8
git-svn-id: http://mc-server.googlecode.com/svn/trunk@6 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-10-03MCServer c++ source filesfaketruth1-0/+1082
git-svn-id: http://mc-server.googlecode.com/svn/trunk@3 0a769ca7-a7f5-676a-18bf-c427514a06d6