1
0
Commit Graph

95 Commits

Author SHA1 Message Date
madmaxoft@gmail.com
e1b5f0af04 Renamed HOOK_WEATHER_CHANGE to HOOK_WEATHER_CHANGED, added the glue code for it to actually work
git-svn-id: http://mc-server.googlecode.com/svn/trunk@610 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-14 19:20:31 +00:00
cedeel@gmail.com
92c59963f8 Attempt to bring sanity to newlines across systems.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@606 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-14 13:06:06 +00:00
cedeel@gmail.com
0b29b3b3cf Added HOOK_WEATHER_CHANGE.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@605 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-14 12:24:39 +00:00
cedeel@gmail.com
900c26dc30 Revamped the weather system.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@599 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-13 00:46:23 +00:00
madmaxoft@gmail.com
a23e4f3177 Fixed a forgotten ini file read
git-svn-id: http://mc-server.googlecode.com/svn/trunk@590 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-09 16:23:01 +00:00
madmaxoft@gmail.com
47b675e47c More ini settings save their defaults
git-svn-id: http://mc-server.googlecode.com/svn/trunk@588 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-09 15:37:34 +00:00
madmaxoft@gmail.com
a9350c4361 New IniFile functionality: read value and set default if it isn't present (GetValueSet() ); used by cWorld
git-svn-id: http://mc-server.googlecode.com/svn/trunk@586 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-09 15:12:52 +00:00
madmaxoft@gmail.com
8189487258 Sugarcane and cactus max height can be set in world.ini.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@585 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-09 13:00:14 +00:00
madmaxoft@gmail.com
2c241bb9a4 Plants growable by bonemeal are settable in the world.ini. Default matches vanilla MC.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@584 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-09 12:44:02 +00:00
madmaxoft@gmail.com
ec61713221 Cacti grow by themselves and by bonemeal
git-svn-id: http://mc-server.googlecode.com/svn/trunk@583 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-09 12:03:49 +00:00
madmaxoft@gmail.com
0e236c03f9 Bonemeal is consumed in survival mode when used on growable blocks
git-svn-id: http://mc-server.googlecode.com/svn/trunk@582 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-09 11:32:34 +00:00
madmaxoft@gmail.com
6d36a82e19 Sugarcane grows and can be grown using bonemeal.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@578 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-08 14:17:33 +00:00
madmaxoft@gmail.com
876014b8e8 Bonemeal works on crops, melons, pumpkins, saplings and grass. Plant growing has been refactored into separate functions callable from Lua, too.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@573 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-07 21:07:21 +00:00
madmaxoft@gmail.com
c0a73ef89d Repeaters' delays can be set by rclk
git-svn-id: http://mc-server.googlecode.com/svn/trunk@570 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-07 11:57:51 +00:00
madmaxoft@gmail.com
1cca9b13b3 Item-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.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@561 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-06 20:18:50 +00:00
madmaxoft@gmail.com
7af3df03a0 Added support for SetNextBlockTick() function callable from Lua
git-svn-id: http://mc-server.googlecode.com/svn/trunk@527 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-05-30 21:29:51 +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
b69ac328c0 Reverted the previous commit - it is useless, since entities still depend heavily on cWorld
git-svn-id: http://mc-server.googlecode.com/svn/trunk@428 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-24 11:14:34 +00:00
madmaxoft@gmail.com
be31652c40 Encapsulated cWorld functions needed in cWorldStorage into an interface, so that cWorldStorage can actually be used outside of MC-Server (such as storage conversion tools and chunk analyzers)
git-svn-id: http://mc-server.googlecode.com/svn/trunk@427 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-23 21:12:48 +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
faketruth
38b219de62 Exposed a function to Lua to get a block's sky light value
git-svn-id: http://mc-server.googlecode.com/svn/trunk@416 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-16 15:48:40 +00:00
madmaxoft@gmail.com
b974b1ea59 Unified the chunk data to use the BLOCKDATA datatype.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@413 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-14 21:21:03 +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
10c8c75bb7 Added a flat terrain generator with settable terrain height
git-svn-id: http://mc-server.googlecode.com/svn/trunk@404 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-12 19:39:41 +00:00
madmaxoft@gmail.com
cb2de47247 Stopping the ChunkSender upon server stop
git-svn-id: http://mc-server.googlecode.com/svn/trunk@401 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-11 22:29:15 +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
1a5ebb44aa Fixed *nix threading issue;
Thread objects now use variable names consistent with MCS convention;
Fixed a few *nix threading cornercases

git-svn-id: http://mc-server.googlecode.com/svn/trunk@392 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-10 17:37:00 +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
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
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
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
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
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
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
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
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
faketruth
d9c25a161e Added a crude way of disabling redstone. It's necessary though, redstone is completely broken, crashes the server all the time
git-svn-id: http://mc-server.googlecode.com/svn/trunk@312 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-22 15:35:10 +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
b4a68e58a9 Fixed block-getting so that simulators work again
git-svn-id: http://mc-server.googlecode.com/svn/trunk@301 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-21 12:29:05 +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
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