1
0
Commit Graph

125 Commits

Author SHA1 Message Date
cedeel@gmail.com
b17d12c86f Updated zlib, added chat formatting, fixed upside down stairs and slabs, fixed makefiles, hopefully updated vc project files
git-svn-id: http://mc-server.googlecode.com/svn/trunk@546 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-03 23:35:17 +00:00
madmaxoft@gmail.com
783ca913d4 ClientHandle 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.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@540 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-02 17:56:36 +00:00
madmaxoft@gmail.com
38862ad018 Seeds can now be planted and they grow (albeit too quickly and too non-uniformly, need to fix blocktick selection)
git-svn-id: http://mc-server.googlecode.com/svn/trunk@523 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-05-30 16:50:59 +00:00
madmaxoft@gmail.com
2372419d0c Farmland is created using a hoe on dirt or grass.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@520 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-05-29 20:45:25 +00:00
madmaxoft@gmail.com
322ba59c3a Refactored item-eating from cClientHandle into cPlayer
git-svn-id: http://mc-server.googlecode.com/svn/trunk@519 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-05-29 19:56:07 +00:00
madmaxoft@gmail.com
9d6a5b9ce0 Added 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.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@518 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-05-29 14:59:43 +00:00
madmaxoft@gmail.com
a4a418a679 Merged the composable_generator branch into the trunk
git-svn-id: http://mc-server.googlecode.com/svn/trunk@504 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-05-25 07:18:52 +00:00
madmaxoft@gmail.com
c51a4b9469 Added 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!
git-svn-id: http://mc-server.googlecode.com/svn/trunk@454 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-04-10 11:22:11 +00:00
madmaxoft@gmail.com
b5a646d94a Logging OnBlockDig and OnBlockPlace only in Debug mode ( http://mc-server.org/support/index.php?do=details&task_id=133&project=2 )
git-svn-id: http://mc-server.googlecode.com/svn/trunk@447 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-04-03 14:07:18 +00:00
madmaxoft@gmail.com
05252babc6 Added the supported client version to banner; shamelessly added myself to the authors list ;)
git-svn-id: http://mc-server.googlecode.com/svn/trunk@436 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-26 18:09:10 +00:00
madmaxoft@gmail.com
5783437436 Added the new 1.2.4's PlayerAbilities packet; restructures packet files for less files, more dense.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@431 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-24 13:28:53 +00:00
madmaxoft@gmail.com
3c3d1c60a3 Protocol version bumped up to 29 (MC 1.2.4), seems to work.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@430 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-24 12:10:23 +00:00
madmaxoft@gmail.com
e1ef489e08 Removed the split between 1.2.3 and 1.1, left only 1.2.3 code
git-svn-id: http://mc-server.googlecode.com/svn/trunk@429 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-24 11:40:29 +00:00
madmaxoft@gmail.com
389062a1ed Fixed a deadlock by removing clients from all chunks upon their exit, not using the clients chunklists.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@426 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-22 15:53:40 +00:00
madmaxoft@gmail.com
0b24efeb00 Split chunk data into separate arrays; decoupled most sources from cChunk.h dependency
git-svn-id: http://mc-server.googlecode.com/svn/trunk@411 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-14 20:56:09 +00:00
madmaxoft@gmail.com
af44154ff5 Not sending chunks to the client twice
git-svn-id: http://mc-server.googlecode.com/svn/trunk@399 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-11 10:48:20 +00:00
madmaxoft@gmail.com
219be8186c Fixed a few obsoleted functions
git-svn-id: http://mc-server.googlecode.com/svn/trunk@397 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-10 22:27:24 +00:00
madmaxoft@gmail.com
e7731242c1 Using references instead of pointers for sending packets
git-svn-id: http://mc-server.googlecode.com/svn/trunk@394 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-10 21:34:47 +00:00
faketruth
f43b65cf53 cClientHandles have a unique ID now to distinguish them
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-09 13:42:28 +00:00
faketruth
787382caf8 Fixed bug where cPlayer's cClientHandle was used after cPlayer was destroyed http://forum.mc-server.org/showthread.php?tid=380
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-07 13:36:30 +00:00
madmaxoft@gmail.com
8cdd63f06c Fixed rev368's ChunkSender, now sends properly even chunks that are loaded. Fixed a deadlock in cClientHandle vs TickThread over cClientHandle::m_CSChunkLists
git-svn-id: http://mc-server.googlecode.com/svn/trunk@371 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-06 14:52:44 +00:00
madmaxoft@gmail.com
4d65ffffc0 ChunkSender: Chunks are now compressed and sent to clients from a separate threads, proper passive waiting between threads. Not much tested, just appears to work :)
git-svn-id: http://mc-server.googlecode.com/svn/trunk@365 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-05 16:41:57 +00:00
faketruth
fb7c60ec11 Changed signed char to unsigned char in block packets, so we can receive height up to 255
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-04 13:54:33 +00:00
faketruth
ad89cf88ba Got rid of some hardcoded numbers, now using hardcoded variables! woo
git-svn-id: http://mc-server.googlecode.com/svn/trunk@355 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-03 20:55:16 +00:00
faketruth
f7b29dc727 That should not have been committed...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@354 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-02 14:09:52 +00:00
faketruth
957ef3b297 Started carefully moving to 1.2.2
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-03-01 17:07:41 +00:00
madmaxoft@gmail.com
93d73ac520 Fixed the authenticator bug
git-svn-id: http://mc-server.googlecode.com/svn/trunk@344 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-29 20:25:11 +00:00
faketruth
bba824a1c6 Making sure cClientHandle::m_Player was NULL after authentication completed
git-svn-id: http://mc-server.googlecode.com/svn/trunk@343 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-29 13:40:40 +00:00
madmaxoft@gmail.com
a4503ddb77 Setting the m_bDestroyed flag only after the cClienthandle is truly destroyed; cClientHandle's destructor now locks loaded chunk lists
git-svn-id: http://mc-server.googlecode.com/svn/trunk@340 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-28 14:58:07 +00:00
madmaxoft@gmail.com
7268a70902 Attempt at fixing crashes with disconnecting players
git-svn-id: http://mc-server.googlecode.com/svn/trunk@329 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-26 12:55:42 +00:00
madmaxoft@gmail.com
0e33c919dd Using 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 :)
git-svn-id: http://mc-server.googlecode.com/svn/trunk@328 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-26 00:36:51 +00:00
madmaxoft@gmail.com
a14e015354 Extended SocketThreads for writing support (unusable in cClientHandle due to too many deadlock possibilities)
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-25 23:48:28 +00:00
madmaxoft@gmail.com
bf19f7ae9c Made the viewdistance settable by users and default in settings.ini. The default is 9.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@326 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-23 22:51:03 +00:00
faketruth
6015b59f13 Fixed a bug that no chunks were unloaded on the client. Now chunks are properly unloaded on the clients.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@318 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-22 19:31:30 +00:00
madmaxoft@gmail.com
b653e6a012 Removed cChunkPtrs from everywhere but internal cChunkMap usage. Now we should finally be threadsafe :)
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-21 16:27:30 +00:00
madmaxoft@gmail.com
f0145ee9fa Fixed heightmap optimization from rev 302; removed a few more cChunkPtrs
git-svn-id: http://mc-server.googlecode.com/svn/trunk@303 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-21 15:18:02 +00:00
madmaxoft@gmail.com
d592882fe0 Removed some more cChunkPtr usage
git-svn-id: http://mc-server.googlecode.com/svn/trunk@298 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-20 16:39:00 +00:00
faketruth
0b616909e3 Using own ASSERT() that logs to file
git-svn-id: http://mc-server.googlecode.com/svn/trunk@297 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-19 23:00:00 +00:00
madmaxoft@gmail.com
510133bd35 Chunk coords mostly "upgraded" to include the Y coord for future compatibility
git-svn-id: http://mc-server.googlecode.com/svn/trunk@285 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-17 17:56:25 +00:00
faketruth
008addf5d7 Got rid of dangerous GetEntity(), not using DoWithEntity()
git-svn-id: http://mc-server.googlecode.com/svn/trunk@278 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-16 17:20:28 +00:00
madmaxoft@gmail.com
1aebcea095 Restored chest and furnace functionality as it was (it's basically working but joined chests show single-chest window)
git-svn-id: http://mc-server.googlecode.com/svn/trunk@263 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-15 14:22:44 +00:00
madmaxoft@gmail.com
4f17362aeb 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.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@251 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-13 21:47:03 +00:00
madmaxoft@gmail.com
32880153ab MTRand class is not created in each tick, therefore much improving tick-thread time (now uses ~5 % CPU instead of one full core)
git-svn-id: http://mc-server.googlecode.com/svn/trunk@245 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-08 12:36:54 +00:00
madmaxoft@gmail.com
c82c636d8c cSocketThreads 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.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@244 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-08 10:02:46 +00:00
madmaxoft@gmail.com
b7d524423c Rewritten all packets to use buffers instead of direct sockets, for future cSocketThreads compatibility.
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-07 20:49:52 +00:00
faketruth
ab95abb6bd Now showing proper error messages when sockets fail :)
Crossplatform GetLastError function in cSocket

git-svn-id: http://mc-server.googlecode.com/svn/trunk@234 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-05 16:24:16 +00:00
madmaxoft@gmail.com
b8be8a4df0 cClientHandle: split packet handling into separate functions for clarity
git-svn-id: http://mc-server.googlecode.com/svn/trunk@229 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-03 14:33:40 +00:00
madmaxoft@gmail.com
f86d796295 cClientHandle: gotten rid of the obnoxious m_pState, now using direct members instead
git-svn-id: http://mc-server.googlecode.com/svn/trunk@228 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-02 21:13:24 +00:00
madmaxoft@gmail.com
48d30d6ab4 Rewritten cAuthenticator to make use of the new cIsThread architecture - now authentication runs in a single separate thread for all clients;
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-01 22:38:03 +00:00
madmaxoft@gmail.com
2568bad3cc sprintf() begone! Replaced with StringUtils' Printf()
git-svn-id: http://mc-server.googlecode.com/svn/trunk@216 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-01 13:43:47 +00:00