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
d63b092e02
No need to reset zlib (copypasta error)
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@381 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-07 11:31:54 +00:00
madmaxoft@gmail.com
69a4ee5383
Added the Anvil level format (MCA) support, read-only for the time being. Now MCS can read your worlds from the official server :)
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@380 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-07 11:28:24 +00:00
faketruth
bae54ee7bd
Sticky pistons should work as well now
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@379 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-06 22:17:36 +00:00
madmaxoft@gmail.com
b20fa171a4
Added a little documentation on ChunkSender.
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@378 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-06 21:58:32 +00:00
faketruth
944dec3a4e
Fixed redstone repeater bug where it could not get the direction when it has delay bits set
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@377 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-06 21:56:12 +00:00
madmaxoft@gmail.com
3d0eced7e7
ChunkSender won't send NULL packets anymore
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@376 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-06 21:48:45 +00:00
madmaxoft@gmail.com
7ee0667b75
Fixed rev 373 not compiling on linux
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@375 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-06 21:32:22 +00:00
faketruth
01577bed9d
Yay redstone repeaters!
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@374 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-06 21:06:51 +00:00
madmaxoft@gmail.com
5e4e89b6ee
World storage names are now case-INsensitive
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@373 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-06 19:40:05 +00:00
madmaxoft@gmail.com
e463ddc500
That was not a good place to use ARRAYCOUNT()
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@372 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-06 14:54:31 +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
faketruth
ea1ecd36db
Fixed bug FS#157 http://mc-server.org/support/index.php?do=details&task_id=157
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@370 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-06 13:25:14 +00:00
madmaxoft@gmail.com
0df305e226
Fixed a potential deadlock ( http://forum.mc-server.org/showthread.php?tid=374 )
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@369 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-05 17:15:56 +00:00
madmaxoft@gmail.com
e4043be593
Using a fixed-size array instead of AString for conversion. Conversion now runs ~10x faster :) (in debug mode)
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@368 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-05 17:00:35 +00:00
madmaxoft@gmail.com
01c5d6e128
WSS conversion quickfix: reserving memory so that AString doesn't need to re-alloc (but still uses painfully slow push_back()s )
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@366 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-05 16:43:06 +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
a655d7fdae
Removed redstone debugging: powered dirt blocks change into stone
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@364 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-04 16:59:39 +00:00
faketruth
ac5f1e8f30
Yay tiny commits XD fixed % sign
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@363 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-04 16:19:49 +00:00
faketruth
e1b9fb1ab4
Lowered the amount of logging while converting chunks
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@362 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-04 16:18:32 +00:00
faketruth
85ecca1cfa
Converted pak files were not marked 'dirty' and wouldn't be saved. Fixed now :)
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@361 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-04 16:15:04 +00:00
faketruth
9b7675f0e1
Forcing the use of the new redstone simulator
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@359 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-04 16:04:42 +00:00
faketruth
95eb3a7bd7
Should have complete support for 256 blocks high worlds. Old save files are converted to new ones at load.
...
BACK UP YOUR WORLD!
git-svn-id: http://mc-server.googlecode.com/svn/trunk@358 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-04 15:59:10 +00:00
faketruth
f1f762c4fa
The world can now truly be made higher by incrementing cChunk::c_ChunkHeight to 256. !!HOWEVER THIS WILL DESTROY YOUR SAVED WORLD!!
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@357 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-04 14:09:35 +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
5179588b65
Chunk light and metadata are also sent now, should take a load off of the client
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@353 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-02 13:58:31 +00:00
faketruth
eceead8394
Finally got the multiblock packet working! It seems the byte order was wrong
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@352 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-02 13:41:42 +00:00
faketruth
4dda2a5c2b
MultiBlock packet is working partly.. I really don't understand what's wrong with this packet :/
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@351 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-02 01:22:06 +00:00
faketruth
a2f6ab93b6
Chunks are successfully streamed to clients (in a bad a slow way, but whatever)
...
Fixed respawn packet for 1.2.2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@350 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-01 18:56:56 +00:00
faketruth
d24c07a550
Clients can join the server, but chunks are sent completely empty
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@349 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-01 18:08:53 +00:00
faketruth
4baa9e2709
Forgot to update packet size (though I'm not even sure it's used anymore)
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@348 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-01 17:14:23 +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
faketruth
867fc8ee0d
New redstone simulator. Should work without crashes!
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@345 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-01 15:18:59 +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
94132159be
Added validity checks to world broadcasting. Also added logging to cPlayer deletion to catch that stupid BugByBoo.
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@342 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-29 08:40:15 +00:00
madmaxoft@gmail.com
5d0da9a2c0
Improved threading performance by reducing thread-hopping in queue locks (cs unlocked before event set)
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@341 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-28 16:59:59 +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
faketruth
ac117959d3
Server uses ~40% less CPU now
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@339 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-28 14:22:03 +00:00
madmaxoft@gmail.com
0f88ed7c72
Linux compilation fix (y u no support const_iterator, gcc?)
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@338 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-28 12:37:46 +00:00
madmaxoft@gmail.com
013ae71c87
Chunk now has an indicator of load failure; Chunk generator uses cChunkStay
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@337 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-28 12:11:14 +00:00
madmaxoft@gmail.com
230f98a774
Implemented synchronous chunk loading; optimized cChunkStay interface for speed (though still unused ;)
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@336 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-28 10:45:53 +00:00
madmaxoft@gmail.com
67ffb8a1da
ChunkGenerator: fixed an inverted condition on chunk-skipping when the generator is overloaded; set the overload threshold to 500 chunks (from original 50 which is not enough even for a single player)
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@334 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-28 10:01:42 +00:00
madmaxoft@gmail.com
2c9198b208
Const-correctness for packet broadcasting (fixes GCC compilation)
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@333 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-28 08:10:51 +00:00
madmaxoft@gmail.com
dee0a12029
Fix for the perpetual load issue
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@332 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-27 14:23:16 +00:00
madmaxoft@gmail.com
1f88db187b
Implemented chunk loading without generating on load-failure
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@331 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-26 16:46:23 +00:00
madmaxoft@gmail.com
b902546863
New cChunkStay class for temporarily keeping chunks loaded even when then have no clients. For now unused, will be used by generator and lighting in the future.
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@330 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-26 16:15:09 +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