summaryrefslogtreecommitdiffstats
path: root/source/ClientHandle.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Client can no longer place blocks outside the Y range of the world.madmaxoft2013-08-241-1/+6
| | | | Fixes #128.
* Another fix for #31.madmaxoft2013-08-221-0/+6
| | | | This seems to have done it, no more crashes for me.
* Added a delay between the kick packet and socket close.madmaxoft2013-08-201-2/+17
| | | | This should have helped #31, but the client disagrees.
* Fixed player spawning.madmaxoft2013-08-201-0/+10
| | | | Now the player is spawned only after the chunk they're in is sent to the client. Hopefully no more falling-through-terrain-while-loggin-in.
* Fixed the extreme strain on the world tick thread.madmaxoft2013-08-191-0/+2
| | | | Block changes were sent even with empty changesets, causing a lot of lost CPU cycles.
* Moved entities into the Entities subfolder.madmaxoft2013-08-191-3/+2
|
* Added cWindow property manipulation API.madmaxoft2013-08-181-17/+17
| | | | Now enchantment table and furnace properties can be set by a plugin
* ClientHandle no longer queues chat messages.madmaxoft2013-08-141-47/+17
| | | | It is no longer needed to queue chat messages, because the protocol is parsed within the Tick thread itself, without holding any SocketThread CS.
* Player counts are now properly handled.madmaxoft2013-08-141-1/+37
| | | | Fixes #80
* Clients are now ticked in cServer first, then in cWorld once they get assigned a world.madmaxoft2013-08-131-31/+32
|
* Removed cServer::BroadcastChat() and cServer::SendMessage().madmaxoft2013-08-121-6/+8
| | | | These two functions make it difficult to move to the new ticking system, and they aren't used anyway. If so required, they can be emulated by ForEachWorld / ForEachPlayer calls.
* Moved MaxPlayers and Description from cWorld to cServer.madmaxoft2013-08-111-7/+7
| | | | Also started creating a new cWorld::cTickThread class, but not used yet.
* Added OnPlayerAnimation() hook.madmaxoft2013-08-111-0/+6
| | | | Initial patch by @STR_Warrior, updated to account for different animation packets.
* Removed extra disconnect messageTiger Wang2013-08-101-5/+0
| | | There seems to be already one in the HandleDisconnect hook function.
* Fixed some formatting issues I accidentally introducedJames Ravenscroft2013-08-091-0/+2
|
* Added IsSwimming and IsSubmerged flags and access methodsJames Ravenscroft2013-08-091-4/+2
|
* Fixed the jump food exhaustion being added when player is swimmingJames Ravenscroft2013-08-081-3/+8
|
* Implemented OnPlayerRightClickingEntity() hookmadmaxoft2013-08-021-0/+4
| | | | Fixes FS 425
* Implemented the actual tab completion for commands and playernames.madmaxoft2013-07-311-1/+1
| | | | Each command is reported only if the player has the permission to use it.
* Tab completion packet is handled and sent.madmaxoft2013-07-301-0/+26
| | | | This only handles the network comm and the overall design logic, the actual completion is not yet implemented, only dummy values are returned for now.
* Added the "Edit Sign" packet sent to the client placing a sign.madmaxoft2013-07-291-0/+9
| | | | Fixes issue #20. The 1.6.2 client wouldn't open the sign editor UI unless it receives a special packet
* Player eating is now properly broadcast to other players.madmaxoft2013-07-281-0/+5
| | | | Also fixed the API relating to food, determining player gamemode, and removed several unneeded API functions.
* Implemented basic eating support.madmaxoft2013-07-281-12/+8
| | | | Food is now properly consumed and it takes 1.5 sec.
* First implementation of movement-related hunger and APImadmaxoft@gmail.com2013-07-121-9/+19
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1673 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Color codes are stripped from the DC messagemadmaxoft@gmail.com2013-07-081-1/+1
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1670 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Fixed sprinting in 1.6.1, made speeds available through API; fixed messages containing quotes.madmaxoft@gmail.com2013-07-071-0/+11
| | | | | | Fixes FS #415 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1660 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Improved function names for protocol packet sending; alpha-sorted the function listsmadmaxoft@gmail.com2013-07-071-148/+157
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1659 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Unmounting vehicles implemented in the 1.6.1 waymadmaxoft@gmail.com2013-07-051-0/+13
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1650 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Fixed 1.6.1's movement speedmadmaxoft@gmail.com2013-07-051-0/+3
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1649 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Fixed player moving between worlds.madmaxoft@gmail.com2013-07-031-13/+54
| | | | | | | Fixes FS #407. Also fixes a few possible deadlocks between SocketThreads and TickThread git-svn-id: http://mc-server.googlecode.com/svn/trunk@1641 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Fixed crouch-placing unplaceable items (FS #399)madmaxoft@gmail.com2013-06-291-1/+1
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1632 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Plugins can modify message in the OnChat() hook handler.madmaxoft@gmail.com2013-06-221-2/+3
| | | | | | FS #376 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1622 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Crouching will allow block placement on otherwise functional blocks.madmaxoft@gmail.com2013-06-181-2/+2
| | | | | | Fixes FS #382 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1607 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Added a crude limiter for explosions sent to client.madmaxoft@gmail.com2013-06-181-1/+27
| | | | | | Now the client can survive even 3000k TNT blocks exploding without jerking much. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1606 0a769ca7-a7f5-676a-18bf-c427514a06d6
* More TNT fixes.madmaxoft@gmail.com2013-06-181-1/+1
| | | | | | | | Chain-reaction TNTs are spawned in proper coordinates (FS #390) Centralized Primed TNT entity spawning and made available to the plugins. Internal changes for better TNT performance. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1604 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Added an elaborative comment on the deadlock prevention codemadmaxoft@gmail.com2013-06-161-1/+12
| | | | | | (FS #375) git-svn-id: http://mc-server.googlecode.com/svn/trunk@1597 0a769ca7-a7f5-676a-18bf-c427514a06d6
* First attempt at fixing the inter-threading deadlocks between the tick thread and the socket threadmadmaxoft@gmail.com2013-06-151-1/+11
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1591 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Removed cLadder, cSign, cStairs, cTorch and cVine classes, moved their functionality into the appropriate BlockHandlers / ItemHandlersmadmaxoft@gmail.com2013-06-041-4/+0
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1555 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Implemented proper player crouching.madmaxoft@gmail.com2013-06-041-4/+18
| | | | | | Fixes FS #365 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1553 0a769ca7-a7f5-676a-18bf-c427514a06d6
* LuaWindow: Initial code, the window can be opened, but not much manipulatedmadmaxoft@gmail.com2013-05-301-1/+1
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1532 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Moved BlockEntities to a separate foldermadmaxoft@gmail.com2013-05-281-2/+2
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1527 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Refactored cInventory to use cItemGrid for the actual Storagemadmaxoft@gmail.com2013-05-241-4/+3
| | | | | | This makes the API more orthogonal and is easier to use in the plugins. Also changes in the inventory are now propagated to the needed places (armor updates to BroadcastEntityEquipment etc.) even when the inventory is changed by a plugin. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1503 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Inventory code cleanup, players can now see each other's armormadmaxoft@gmail.com2013-05-191-5/+5
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1493 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Refactored window clicking code to use different click actionsmadmaxoft@gmail.com2013-05-081-5/+5
| | | | | | First part of solving FS #371; should fix #370. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1459 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Fixed Linux compilation, slight code cleanupmadmaxoft@gmail.com2013-04-191-2/+2
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1396 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Initial implementation of explosions and TNT blockkeyboard.osh@gmail.com2013-04-181-0/+9
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1392 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Rewritten entities so that they are owned by individual chunks and ticked within their chunk's Tick()madmaxoft@gmail.com2013-04-131-16/+14
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1385 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Fixed personal crafting grid not being tossed on inventory close.madmaxoft@gmail.com2013-04-041-4/+4
| | | | | | FS #355, http://www.mc-server.org/support/index.php?do=details&task_id=355 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1358 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Added support for head yaw tracking and packet sending and fixed bug in BroadcastMovementUpdatekeyboard.osh@gmail.com2013-04-021-0/+2
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1350 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Added support for the packet #28 (0x1C): ENTITY_VELOCITYkeyboard.osh@gmail.com2013-03-181-0/+11
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1283 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Player can sit in minecarts (but not move them yet)madmaxoft@gmail.com2013-03-031-1/+25
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1249 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Made FAST_FLOOR_DIV work correctly, replaced all floorf() divisions with it.madmaxoft@gmail.com2013-02-271-2/+2
| | | | | | Still not perfect - chunk and region calculations can be made into a single CPU instruction - SAR - but not all compilers are known to support that (">>" operator on signed datatypes needs to perform arithmetic shift, C/C++ standard makes it implementation-specific; MSVC and GCC do what we need, LLVM unknown) git-svn-id: http://mc-server.googlecode.com/svn/trunk@1224 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Moved the Speed member into cEntity class instead of its descendants.madmaxoft@gmail.com2013-02-211-2/+2
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1222 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Minecarts can now be placed.madmaxoft@gmail.com2013-02-181-0/+9
| | | | | | No interaction, no physics, though. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1219 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Fixed one-hit-blocks not being broken server-sidemadmaxoft@gmail.com2013-02-141-2/+4
| | | | | | FS #301 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1213 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Added missing dig status.luksor111@gmail.com2013-01-131-0/+6
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1141 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Merged branch "branches/hooks" into "trunk".madmaxoft@gmail.com2013-01-121-171/+307
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1139 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Not sending multiple DC packets to the client.madmaxoft@gmail.com2013-01-051-6/+9
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1120 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Fixed OnBlockPlace hookluksor111@gmail.com2012-12-271-10/+10
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1113 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Adjusted the protocol framework to support different types of falling block spawning.madmaxoft@gmail.com2012-12-261-0/+9
| | | | | | | In brief, with cProtocol, "say what you want done, not how you want me to do it". But still 1.4.6 crashes on falling block spawning. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1104 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Added the 1.4.6 protocolmadmaxoft@gmail.com2012-12-241-2/+2
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1099 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Refactored the TakeDamage API to take equipped weapon and armor into consideration (PvP untested)madmaxoft@gmail.com2012-12-211-6/+4
| | | | | | http://forum.mc-server.org/showthread.php?tid=625 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1087 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Removed chat messages from consoleluksor111@gmail.com2012-12-201-1/+0
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1082 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Added dispensers (they can't dispense items yet)luksor111@gmail.com2012-12-191-15/+21
| | | | | | | | Fixed crash when digging snow Moved BlockPlace hook check, so Core plugin will no longer block item usage Player chat messages are now visible in the console git-svn-id: http://mc-server.googlecode.com/svn/trunk@1081 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Fixed wrong c++ standard assumptions about bools.madmaxoft@gmail.com2012-11-181-2/+4
| | | | | | | Should fix FS #265. http://forum.mc-server.org/showthread.php?tid=629&pid=5415#pid5415 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1053 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Fixed boolean comparison.madmaxoft@gmail.com2012-11-161-1/+1
| | | | | | Don't compare booleans to false / true, use them directly. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1048 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Removed log message when spawning players on a client.madmaxoft@gmail.com2012-11-161-1/+1
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1047 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Fixed block breaking in survival.luksor111@gmail.com2012-11-121-4/+15
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1038 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Hopefully a fix for crash when chunks are added to a client being destroyed.madmaxoft@gmail.com2012-11-111-4/+21
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1032 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Refactored the world time.madmaxoft@gmail.com2012-11-011-7/+10
| | | | | | Now it is stored in two values - WorldAge (only incremented, plugins cannot change) and TimeOfDay (plugins can change). Since sub-tick precision is needed in Tick(), we store it both as number of seconds (double) and number of ticks (Int64) is calculated off of that. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1022 0a769ca7-a7f5-676a-18bf-c427514a06d6
* You can now see particles and hear sounds when other players are destroying blocks.luksor111@gmail.com2012-10-221-0/+1
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1004 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Added jukeboxes (patch contributed by Luksor)madmaxoft@gmail.com2012-10-211-0/+9
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@994 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Converted some const char*s and std::strings to AStringsfaketruth2012-10-181-0/+9
| | | | | | | Added a cPlayer:RemoveFromGroup() so players can be removed from groups programmatically Added a cClientHandle:SetUsername to be used by Lua. I'm curious what ThuGie can do with his plugin. git-svn-id: http://mc-server.googlecode.com/svn/trunk@978 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Fixed a vulnerability in cClientHandle::HandleRespawn()faketruth2012-10-171-1/+9
| | | | | | | | Changed some hook locations: Moved HOOK_PLAYER_JOIN to where HOOK_PLAYER_SPAWN was (before player is added to the world) Added HOOK_PLAYER_SPAWN to after a player's initial spawn and after a player is re-spawned after death git-svn-id: http://mc-server.googlecode.com/svn/trunk@972 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Added an option to disable/enable PVP on a per world basisfaketruth2012-10-101-0/+9
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@944 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Fixed an invalid direction to AddDirection()madmaxoft@gmail.com2012-10-061-8/+11
| | | | | | ( http://forum.mc-server.org/showthread.php?tid=571&pid=4821#pid4821 ) git-svn-id: http://mc-server.googlecode.com/svn/trunk@939 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Completely removed the old (buggy) redstone simulator.madmaxoft@gmail.com2012-10-061-1/+0
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@937 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Slight refactoring of BlockHandlers - dropping unneeded virtual functionsmadmaxoft@gmail.com2012-10-011-3/+3
| | | | | | ( http://forum.mc-server.org/showthread.php?tid=434&pid=4734#pid4734 ) git-svn-id: http://mc-server.googlecode.com/svn/trunk@917 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Added falling block entities. Sand and gravel now properly fall downfaketruth2012-09-301-0/+8
| | | | | | | | | | Implemented the PACKET_SPAWN_OBJECT packet Made some things use BLOCKTYPE instead of char Android: Requests WebAdmin port when pressing the configure button git-svn-id: http://mc-server.googlecode.com/svn/trunk@915 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Removed a rogue cSleep from ClientHandle. Since sockets are owned by sockethreads, the client can safely Destroy() itself right after sending a packet.madmaxoft@gmail.com2012-09-291-4/+0
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@912 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Beds can be slept in now (it doesn't change the time though)faketruth2012-09-291-0/+27
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@911 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Unified folder name-casingmadmaxoft@gmail.com2012-09-291-2/+2
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@902 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Added the block dig animation packet (patch contributed by l0udPL)madmaxoft@gmail.com2012-09-251-2/+45
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@892 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Sockets are now owned by SocketThreads instead of ClientHandle (FS #246 and FS #247)madmaxoft@gmail.com2012-09-251-27/+12
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@891 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Source files cleanup: The rest of the files renamed.madmaxoft@gmail.com2012-09-241-0/+1651
git-svn-id: http://mc-server.googlecode.com/svn/trunk@887 0a769ca7-a7f5-676a-18bf-c427514a06d6