faketruth
df39f12e30
Fixed assertion bug in NamedEntitySpawn packet, it used to assert when item ID is 0, but now 0 is allowed
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@296 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-19 19:31:38 +00:00
madmaxoft@gmail.com
3a8d2aa421
Substantial cWorld::FastSetBlock() speed up by queueing all such calls and processing them later chunk-wise (makes growing trees in the generator fast again)
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@295 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-18 20:10:57 +00:00
madmaxoft@gmail.com
993bdab1e8
Fixed previous commit: forgot to remove a debugging setting
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@294 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-18 19:20:05 +00:00
madmaxoft@gmail.com
76a92a21d1
Re-implemented tree-growing. May produce artefacts on old-world / new-world boundaries.
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@293 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-18 19:18:16 +00:00
madmaxoft@gmail.com
499745c1c7
Thread-safe chunk generation, storage and generator are queried for progress while initializing server
...
Note that this commit breaks foliage generation - there are no trees in the chunks generated!
git-svn-id: http://mc-server.googlecode.com/svn/trunk@292 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-18 17:53:22 +00:00
madmaxoft@gmail.com
57dedd585c
Logging: added thread ID to the log output in debug builds
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@291 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-18 17:51:34 +00:00
madmaxoft@gmail.com
a0c29514d2
Logging: added LOGD macro that logs only in debug builds
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@290 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-18 17:49:02 +00:00
madmaxoft@gmail.com
b173748c45
Moved stdarg.h inclusion into Globals.h
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@289 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-18 17:47:27 +00:00
madmaxoft@gmail.com
d2b229d227
cIsThread: Added support for getting current thread ID
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@288 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-18 17:43:20 +00:00
madmaxoft@gmail.com
7a9925f982
Added the skeleton of the cLightingThread object
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@286 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-17 18:24:34 +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
madmaxoft@gmail.com
a97774624a
Removed useless log messages
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@284 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-17 13:34:16 +00:00
madmaxoft@gmail.com
71097aa49b
Lots of logging added
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@282 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-17 11:40:14 +00:00
faketruth
4a7883a5e3
git-svn-id: http://mc-server.googlecode.com/svn/trunk@281 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-16 22:28:19 +00:00
madmaxoft@gmail.com
eefe71f593
New server command "unload" to manually unload unused chunks
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@280 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-16 19:32:31 +00:00
madmaxoft@gmail.com
2928cb6853
cWorldGenerator speedup - doesn't call GetChunk() anymore, not queueing the chunk it's generating to be loaded recursively.
...
cChunk fix - setting a block to the same value doesn't mark chunk dirty (resulted in un-unloadable chunks)
git-svn-id: http://mc-server.googlecode.com/svn/trunk@279 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-16 17:45:26 +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
415d4eaa68
Chunks are now marked as saved
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@277 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-16 16:50:11 +00:00
madmaxoft@gmail.com
44a6fd20c4
Marking chunk dirty after generating
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@276 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-16 15:53:52 +00:00
madmaxoft@gmail.com
cd2bb55176
cPlayer empty-handed spawn fix
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@275 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-16 15:51:40 +00:00
faketruth
bb396c8cc0
Heightmap is properly generated after loading chunks now, so /spawn and /top should work properly again
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@274 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-16 15:40:38 +00:00
madmaxoft@gmail.com
423f49d175
Chunk is now marked as dirty; saving only dirty chunks; rewritten load / save not to use cChunkPtr; set VC2008 project to level4 warnings; block entities are now loaded and saved properly
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@273 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-16 13:42:35 +00:00
faketruth
1c4122313f
Chunks are properly saved before being unloaded now
...
numchunks server command works again
git-svn-id: http://mc-server.googlecode.com/svn/trunk@272 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-16 13:23:54 +00:00
faketruth
85db35a3ba
cSocket::GetErrorString() now also compiles on Cygwin
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@270 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-16 11:15:00 +00:00
madmaxoft@gmail.com
3c4bfd9799
Fixed logging in cServer
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@269 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-16 09:35:33 +00:00
faketruth
d15d40ad69
No longer using pointers for Vector3(f/d/i) in cEntity's and cTracer
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@268 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-15 22:50:00 +00:00
faketruth
57a97e8036
New players no longer cause an assert
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@267 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-15 22:11:56 +00:00
faketruth
7a26fbe471
Can use the 'restart' command again. cAuthenticator no longer asserts because it properly stops when the server is stopped.
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@266 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-15 21:47:21 +00:00
faketruth
5958478c59
Fixed a deadlock in WorldStorage
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@265 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-15 21:35:59 +00:00
madmaxoft@gmail.com
01341e2788
Fixed logging formatting error in cWorld
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@264 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-15 14:26:37 +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
faketruth
5e1033c567
Can now pass any argument to cWorld:ForEachPlayer in Lua! But I'm not even using it.. lol
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@262 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-15 13:16:42 +00:00
madmaxoft@gmail.com
19e711a1e3
Slight cleanup - removed old code, some additional comments on dangerous functions
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@261 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-14 21:09:14 +00:00
faketruth
e7ea352f41
Got rid of cWorld::GetAllPlayers() and implemented ForEachPlayer() more or less in Lua
...
Core now uses ForEachPlayer() to interact with connected players
git-svn-id: http://mc-server.googlecode.com/svn/trunk@260 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-14 19:14:23 +00:00
faketruth
9f38c219e2
Updated fluid simulators with geser's patch file!
...
Fluids should behave more like Minecraft's fluids, and lava+water creates stone/cobble/obsidian!
git-svn-id: http://mc-server.googlecode.com/svn/trunk@257 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-14 13:37:13 +00:00
faketruth
5aeae0fd6d
m_World was never set in cBlockEntity's, now it is
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@255 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-14 13:15:09 +00:00
faketruth
dcce79b24d
Apparently the Fire plugin is depreciated since it's implemented in C++ :P
...
Using std::list instead of std::vector for fire, I think this would be faster due to all the adding and removing blocks from lists. Correct me if I'm wrong
git-svn-id: http://mc-server.googlecode.com/svn/trunk@254 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-14 12:54:54 +00:00
faketruth
504803cb6d
Fixed the same leak in FireSimulator
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@253 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-14 12:29:39 +00:00
faketruth
eaa17b6a84
Fixed a (pretty big) memory leak in cSandSimulator
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@252 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-14 12:23:02 +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
10752d2f35
Removed unused code
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@249 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-08 19:49:57 +00:00
madmaxoft@gmail.com
a204e33250
Added total chunk count to webadmin
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@248 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-08 18:57:04 +00:00
madmaxoft@gmail.com
356981a51d
cPluginManager: slight cleanup
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@247 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-08 17:38:02 +00:00
madmaxoft@gmail.com
6651343261
cMonsterConfig: removed excessive logging
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@246 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-08 17:14:12 +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
dcd82b6988
cSocket: final localhost fix - made it a function (forgotten file)
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@243 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-07 21:16:34 +00:00
madmaxoft@gmail.com
21f758c9c0
cSocket: final localhost fix - made it a function
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@242 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-07 21:16:03 +00:00
madmaxoft@gmail.com
5c8d7a75bf
Temporary fix for Linux compilation. (gcc won't accept a function call in global var initialization)
...
git-svn-id: http://mc-server.googlecode.com/svn/trunk@241 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-07 21:04:37 +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