1
0
Commit Graph

63 Commits

Author SHA1 Message Date
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
3d3c51b179 Improved logging on mis-configuration in cPlayer and cWorldStorage
git-svn-id: http://mc-server.googlecode.com/svn/trunk@505 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-05-27 10:49:17 +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
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
2786ad306a Fixed player heads always pointing north (new EntityHeadLook packet)
git-svn-id: http://mc-server.googlecode.com/svn/trunk@424 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-19 17:15:35 +00:00
faketruth
cbfca006f7 Got rid of cPlayer::sPlayerState
git-svn-id: http://mc-server.googlecode.com/svn/trunk@418 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-16 16:16:37 +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
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
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
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
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
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
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
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
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
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
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
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
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
865216b15a cSocket API fix (possible invalid pointer)
cMCLogger slight change (CS ptr -> member)

git-svn-id: http://mc-server.googlecode.com/svn/trunk@222 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-02 07:47:19 +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
cb1ce14169 AString logging fix 2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@218 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-01 14:08:12 +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
madmaxoft@gmail.com
bb49f0e021 Introducing StringUtils - the place to be if you are a generic string routine :) No more sprintf()!
git-svn-id: http://mc-server.googlecode.com/svn/trunk@209 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-01 09:12:54 +00:00
faketruth
c142424571 Can now receive POST data in WebPlugins!
Fixed Debug With optimized Noise in VS2010 by having it run the correct MCServer_debug.exe instead of MCServer.exe
Changed winsock.h to Winsock2.h in Globals.h so sockets can be graciously closed (See webserver Socket::Close() )

git-svn-id: http://mc-server.googlecode.com/svn/trunk@197 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-01-31 00:38:18 +00:00
madmaxoft@gmail.com
f4583fda98 Replaced most FILE operations with a cFile object
git-svn-id: http://mc-server.googlecode.com/svn/trunk@196 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-01-30 22:48:38 +00:00
faketruth
9dfa0f1f15 Added a WebAdmin interface to view users their groups, and the permissions of groups.
cChunk::Tick did an assertion in cCSLock, I used a cCSUnlock to fix it, but not sure if this is correct.

git-svn-id: http://mc-server.googlecode.com/svn/trunk@194 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-01-30 16:47:26 +00:00
madmaxoft@gmail.com
89afb970d8 VC2008 / VC2010: Enabled precompiled header through Globals.h; the header included in every module in the project. Compilation optimization.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@188 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-01-29 19:28:19 +00:00
lapayo94@gmail.com
ac63775297 CreativeInventory Update
- Fixed various problems with the new creative inventory (Crafting, furnace, etc)
- Creative inventory will now be saved to disk, so you keep your creative inventory also for the next sessions

git-svn-id: http://mc-server.googlecode.com/svn/trunk@162 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-01-01 18:45:28 +00:00
lapayo94@gmail.com
d7068b35a8 - implemented separated inventory for creative mode (cSurvivalInventory and cCreativeInventory)
(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-01 04:55:17 +00:00
mtilden@gmail.com
d7adbba59d - Initial food handling by cedeel
git-svn-id: http://mc-server.googlecode.com/svn/trunk@156 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-29 15:31:48 +00:00
mtilden@gmail.com
c4f4ae5c71 - Chests open and close on clients when opened/closed
- 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 13:16:23 +00:00
lapayo94@gmail.com
c6b4ee8c9f - implemented the fire simulation in native c++ (cFireSimulator)
- 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 21:00:35 +00:00
mtilden@gmail.com
1116cec667 - Fixed ping displaying same for everyone, knew it was something I messed up with itr :(
git-svn-id: http://mc-server.googlecode.com/svn/trunk@147 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-28 15:40:14 +00:00
lapayo94@gmail.com
1e9af56a67 - Implemented Drops from Burning animals
- added right monster health and attack strength
- refactored the Pawn/Monster/Player class a little bit
- changed some namings to fit the style

git-svn-id: http://mc-server.googlecode.com/svn/trunk@140 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-28 02:10:05 +00:00
faketruth
d57753cd68 Users file was pretty messed up with mixed unix and windows line endings. The ini failed to parse correctly under cygwin.
'Fixed' a 'bug' where MCServer would seemingly endlessly calculate lighting for an entire world (and then crash), when this entire world has 'wrong' lighting. This happens when running a converted map from Vanilla. Fixed this by only allowing a maximum of 50 chunks to recalculate their lighting per tick.
Fixed a small coding error in cChunkMap where it would check PakVersion twice, instead of also ChunkVersion.

DeNotch converter does not need the VS2010 runtime thingies anymore

git-svn-id: http://mc-server.googlecode.com/svn/trunk@138 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-27 22:57:33 +00:00
mtilden@gmail.com
59af89235b - Added basic ping handling.
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-27 18:39:06 +00:00
faketruth
eb942797b8 Players can switch worlds on the fly with the command /gotoworld [worldName]. This uses the function cPlayer::MoveToWorld()
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-26 21:54:08 +00:00
mtilden@gmail.com
c7fa610be3 - Linux compatible fixes including updated makefile
- 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 09:09:47 +00:00
mtilden@gmail.com
e2acb45d19 - Added timer to cPlayer PlayerListItem because sending the packets like minecraft does (every tick per player) is 20 pps per client to each client and was causing Kicks for having too high of a packet queue
git-svn-id: http://mc-server.googlecode.com/svn/trunk@120 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-26 04:06:29 +00:00
mtilden@gmail.com
f029b905d5 - Default Notchian Ping (static until ping implemented through keepalive send/receive)
- 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 03:05:31 +00:00
mtilden@gmail.com
a85ea1c9ac - 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)
git-svn-id: http://mc-server.googlecode.com/svn/trunk@116 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-26 02:35:49 +00:00
mtilden@gmail.com
bf838238e4 - Make Color was using 2 extra characters which took 2 characters off the 16 max (including color codes) for scoreboard display
- 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-26 01:07:35 +00:00
lapayo94@gmail.com
62737fd163 Hold item is now dropped when inventory is closed
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-25 14:03:01 +00:00
faketruth
2892a844d4 Chunks 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 :O
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-24 23:34:30 +00:00
lapayo94@gmail.com
e54373160b Fixes:
- Pickups fall through water now (Server-side they stayed in the water surface)
- Suppressed some warnings (int to short etc.)
- Water is now passable for cTracer

git-svn-id: http://mc-server.googlecode.com/svn/trunk@96 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-22 16:30:40 +00:00
lapayo94@gmail.com
02f05f7496 - Crafting fixed in 1.0.0
- 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-12-21 20:42:34 +00:00
admin@omencraft.com
993680a39e Can now set gamemode via lua.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@89 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-11-10 18:28:21 +00:00