1
0
Fork 0
Commit Graph

68 Commits

Author SHA1 Message Date
madmaxoft c628ab03e9 Removed cServer::BroadcastChat() and cServer::SendMessage().
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.
2013-08-12 08:35:13 +02:00
Alexander Harkness 7d6bde3d93 Added back the required extra line in player.cpp 2013-08-10 17:40:52 +01:00
Tiger Wang 7035dbd7f1 Deleting cPlayer now does LOGD instead of LOG
Hopefully only prints in debug the debug message!
2013-08-10 16:59:48 +01:00
Alexander Harkness 33155a51e2 Merge pull request #55 from mc-server/falldamage-teleport
Keep players from taking damage when teleporting. (Hopefully).
2013-08-09 12:36:45 -07:00
Alexander Harkness e9b9f1861c Fixed stupid syntax error (thanks build system). 2013-08-09 17:17:04 +01:00
Alexander Harkness eaec6a4aab Keep players from taking damage when teleporting. (Hopefully).
Fixes #29
2013-08-09 16:18:24 +01:00
James Ravenscroft 6963e8119c Fixed some formatting issues I accidentally introduced 2013-08-09 08:57:24 +01:00
James Ravenscroft ffce5d143f Removed the need to recalculate whether player is under water in ApplyFoodExhaustion 2013-08-09 08:50:33 +01:00
James Ravenscroft dace1f7bd2 Added IsSwimming and IsSubmerged flags and access methods 2013-08-09 08:37:39 +01:00
James Ravenscroft 9f7db50de0 Fixed food handler for mushroom soup - proper food level and saturation are applied and the player receives a wooden bowl back after nomming 2013-08-08 16:32:14 +01:00
James Ravenscroft 864bdd2626 Made comments more readable by adding space between // and text content. Added /// doxygen syntax comments to declarations 2013-08-08 11:01:45 +01:00
James Ravenscroft 9a6442a206 Fixed the formatting issues in player cpp files 2013-08-08 10:57:36 +01:00
James Ravenscroft e6c33b0256 Made player drowning implementation 2013-08-08 10:32:34 +01:00
madmaxoft 3f4abe8c95 Addeed OnSpawningEntity, OnSpawnedEntity, OnSpawningMonster, OnSpawnedMonster hooks.
As requested in FS 418.
2013-08-08 09:13:13 +02:00
madmaxoft f481865c35 New players get full health
Fixes #28.
2013-08-01 09:51:25 +02:00
madmaxoft fedb803acb Fixed inverted sanity check in SetGameMode()
Fixes #22.
2013-07-30 14:48:18 +02:00
Alexander Harkness 53e22b1185 Changed everyting to Unix line endings. 2013-07-29 12:13:03 +01:00
madmaxoft 3bf4130e3f Player eating is now properly broadcast to other players.
Also fixed the API relating to food, determining player gamemode, and removed several unneeded API functions.
2013-07-28 22:55:09 +02:00
madmaxoft 4746d2251c Implemented basic eating support.
Food is now properly consumed and it takes 1.5 sec.
2013-07-28 19:15:03 +02:00
madmaxoft 0caadbb25c Hunger-per-distance is calculated only for the XZ distance 2013-07-28 11:54:37 +02:00
madmaxoft d155c1cb00 Player food level is reset on respawn 2013-07-28 11:52:24 +02:00
madmaxoft d3801c0296 Added cPlayer::IsGameModeXXX() and cWorld::IsGameModeXXX() functions.
These are the preferred way of determining the gamemode, you should use those instead of doing manual comparisons to the gamemode value.
2013-07-28 11:30:54 +02:00
STRWarrior 235c23d464 Hunger: If a player dies the food level resets. 2013-07-27 06:07:10 -07:00
madmaxoft@gmail.com 6b348717d8 Removed debug-logging the player movement in each tick
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1685 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-07-26 20:03:25 +00:00
madmaxoft@gmail.com 4fb771f3ff First implementation of movement-related hunger and API
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1673 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-07-12 20:01:25 +00:00
madmaxoft@gmail.com 0224a4f7fc Fixed sprinting in 1.6.1, made speeds available through API; fixed messages containing quotes.
Fixes FS #415

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1660 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-07-07 14:13:43 +00:00
madmaxoft@gmail.com b1d05b0f57 Improved function names for protocol packet sending; alpha-sorted the function lists
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1659 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-07-07 13:06:06 +00:00
madmaxoft@gmail.com eff79ee55f Fixed a crash when moving a player to a non-existent world (reported by tonibm19)
http://forum.mc-server.org/showthread.php?tid=434&pid=8865#pid8865 crashdump.zip/crash_mcs_165c.dmp

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1645 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-07-05 17:04:12 +00:00
madmaxoft@gmail.com f7b8a301f8 Fixed player moving between worlds.
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
2013-07-03 07:47:35 +00:00
madmaxoft@gmail.com 37276a4430 Rewritten entity-on-fire management ("forever on fire" bugs)
Fixes FS #297 and part of FS #403.
Added sizes to all entities.
Moved all damage-related functions from cPawn to cEntity
API change: renamed cPawn:TeleportTo() to cEntity:TeleportToCoords()

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1635 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-07-01 10:39:56 +00:00
nielsbreu@gmail.com b984da5a9e Added respawn screen when switching worlds.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1598 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-16 10:35:32 +00:00
madmaxoft@gmail.com dff77e8e56 Implemented proper player crouching.
Fixes FS #365

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1553 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-04 14:18:03 +00:00
madmaxoft@gmail.com 8ff22344af LuaWindow: Fixed memory leaks with unclosed windows
A player disconnecting will now force all windows to close, not respecting any plugin's overrides.
http://forum.mc-server.org/showthread.php?tid=1146&pid=8350#pid8350

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1543 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-02 21:59:25 +00:00
madmaxoft@gmail.com 2eb1240e14 Added the OnClosing callback to cLuaWindow API
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1534 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-30 20:40:43 +00:00
madmaxoft@gmail.com b58f0cabad Window contents are sent whenever the window is opened by a player.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1533 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-30 19:42:19 +00:00
madmaxoft@gmail.com 9684f90f83 LuaWindow: Initial code, the window can be opened, but not much manipulated
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1532 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-30 19:34:09 +00:00
madmaxoft@gmail.com 191479cd81 Implemented left-click inventory painting
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1529 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-30 08:40:13 +00:00
madmaxoft@gmail.com 9be27992e2 Moved BlockEntities to a separate folder
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1527 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-28 19:12:47 +00:00
madmaxoft@gmail.com cf87169737 Refactored cInventory to use cItemGrid for the actual Storage
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
2013-05-24 07:30:39 +00:00
madmaxoft@gmail.com 90c398a392 Inventory code cleanup, players can now see each other's armor
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1493 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-19 18:22:37 +00:00
madmaxoft@gmail.com 950d7f5f2d Empty permission is always granted
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1490 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-19 15:06:28 +00:00
madmaxoft@gmail.com 3292a0118f Replaced MIN / MAX with std::min and std::max (pt 2)
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1456 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-07 19:59:45 +00:00
keyboard.osh@gmail.com 0ceadbe7e0 cPlayer now uses BroadcastMovementUpdate during its Tick function
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1395 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-19 04:32:18 +00:00
madmaxoft@gmail.com f5842062d3 Proper entity removal functions
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1386 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-13 21:28:55 +00:00
madmaxoft@gmail.com a49c004278 Rewritten entities so that they are owned by individual chunks and ticked within their chunk's Tick()
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1385 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-13 21:02:10 +00:00
madmaxoft@gmail.com 4aed49a70f Fixed personal crafting grid not being tossed on inventory close.
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
2013-04-04 11:47:31 +00:00
madmaxoft@gmail.com 1406d80b2b Pawn, Player: fixed asserts when teleporting players outside of the world (setting spawn Y to 256)
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1346 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-01 18:05:41 +00:00
keyboard.osh@gmail.com b32a60106f Added helper functions AddSpeed, AddSpeedX, AddSpeedY, AddSpeedZ, AddPosition, AddPosX, AddPosY, AddPosZ. Made sure that all entites use these helper functions.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1299 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-23 04:33:47 +00:00
keyboard.osh@gmail.com 39e4bd3239 Implemented BroadcastMovementUpdate function. Moved m_Pos,m_Rot,m_Speed to private members and made sure that all classes uses the public functions to access these members.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1294 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-22 06:33:10 +00:00
madmaxoft@gmail.com 7593707713 Pickups are now being saved into Anvil.
Also changed cEntity rotation datatype to double

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1262 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-09 14:35:43 +00:00