summaryrefslogtreecommitdiffstats
path: root/source/Entities/Player.cpp (unfollow)
Commit message (Expand)AuthorFilesLines
2013-09-11Added player void damageTiger Wang1-3/+6
2013-08-30Moved throw pos and speed calculation from cProjectileEntity into cPlayer.madmaxoft1-0/+30
2013-08-30Shooting a bow kinda works.madmaxoft1-0/+44
2013-08-20Hotfix for #83.madmaxoft1-0/+6
2013-08-19Debuggers: Added continuous hunger reporting.madmaxoft1-2/+2
2013-08-19Moved entities into the Entities subfolder.madmaxoft1-23/+23
2013-08-19Fixed crash when the player is above the world.madmaxoft1-1/+1
2013-08-14Server counts the players correctly.madmaxoft1-0/+3
2013-08-14Fixed player swimstate crash.madmaxoft1-16/+35
2013-08-14Player counts are now properly handled.madmaxoft1-9/+6
2013-08-13Clients are now ticked in cServer first, then in cWorld once they get assigned a world.madmaxoft1-15/+19
2013-08-12Keep players from taking damage when teleporting.STRWarrior1-1/+1
2013-08-12Removed cServer::BroadcastChat() and cServer::SendMessage().madmaxoft1-6/+16
2013-08-10Added back the required extra line in player.cppAlexander Harkness1-0/+1
2013-08-10Deleting cPlayer now does LOGD instead of LOGTiger Wang1-2/+1
2013-08-09Fixed stupid syntax error (thanks build system).Alexander Harkness1-1/+1
2013-08-09Keep players from taking damage when teleporting. (Hopefully).Alexander Harkness1-0/+1
2013-08-09Fixed some formatting issues I accidentally introducedJames Ravenscroft1-11/+12
2013-08-09Removed the need to recalculate whether player is under water in ApplyFoodExhaustionJames Ravenscroft1-11/+3
2013-08-09Added IsSwimming and IsSubmerged flags and access methodsJames Ravenscroft1-9/+28
2013-08-08Fixed food handler for mushroom soup - proper food level and saturation are applied and the player receives a wooden bowl back after nommingJames Ravenscroft1-0/+7
2013-08-08Made comments more readable by adding space between // and text content. Added /// doxygen syntax comments to declarationsJames Ravenscroft1-7/+7
2013-08-08Fixed the formatting issues in player cpp filesJames Ravenscroft1-31/+30
2013-08-08Made player drowning implementationJames Ravenscroft1-1/+44
2013-08-08Addeed OnSpawningEntity, OnSpawnedEntity, OnSpawningMonster, OnSpawnedMonster hooks.madmaxoft1-3/+7
2013-08-01New players get full healthmadmaxoft1-4/+5
2013-07-30Fixed inverted sanity check in SetGameMode()madmaxoft1-1/+1
2013-07-29Changed everyting to Unix line endings.Alexander Harkness1-1423/+1423
2013-07-28Player eating is now properly broadcast to other players.madmaxoft1-1/+1
2013-07-28Implemented basic eating support.madmaxoft1-0/+58
2013-07-28Hunger-per-distance is calculated only for the XZ distancemadmaxoft1-0/+1
2013-07-28Player food level is reset on respawnmadmaxoft1-0/+4
2013-07-28Added cPlayer::IsGameModeXXX() and cWorld::IsGameModeXXX() functions.madmaxoft1-1/+35
2013-07-27Hunger: If a player dies the food level resets.STRWarrior1-1325/+1326
2013-07-26Removed debug-logging the player movement in each tickmadmaxoft@gmail.com1-1/+0
2013-07-12First implementation of movement-related hunger and APImadmaxoft@gmail.com1-69/+214
2013-07-07Fixed sprinting in 1.6.1, made speeds available through API; fixed messages containing quotes.madmaxoft@gmail.com1-0/+54
2013-07-07Improved function names for protocol packet sending; alpha-sorted the function listsmadmaxoft@gmail.com1-3/+3
2013-07-05Fixed a crash when moving a player to a non-existent world (reported by tonibm19)madmaxoft@gmail.com1-1/+1
2013-07-03Fixed player moving between worlds.madmaxoft@gmail.com1-19/+30
2013-07-01Rewritten entity-on-fire management ("forever on fire" bugs)madmaxoft@gmail.com1-11/+14
2013-06-16Added respawn screen when switching worlds.nielsbreu@gmail.com1-1/+2
2013-06-04Implemented proper player crouching.madmaxoft@gmail.com1-0/+18
2013-06-02LuaWindow: Fixed memory leaks with unclosed windowsmadmaxoft@gmail.com1-5/+5
2013-05-30Added the OnClosing callback to cLuaWindow APImadmaxoft@gmail.com1-5/+16
2013-05-30Window contents are sent whenever the window is opened by a player.madmaxoft@gmail.com1-0/+1
2013-05-30LuaWindow: Initial code, the window can be opened, but not much manipulatedmadmaxoft@gmail.com1-6/+23
2013-05-30Implemented left-click inventory paintingmadmaxoft@gmail.com1-0/+30
2013-05-28Moved BlockEntities to a separate foldermadmaxoft@gmail.com1-1/+1
2013-05-24Refactored cInventory to use cItemGrid for the actual Storagemadmaxoft@gmail.com1-13/+5
2013-05-19Inventory code cleanup, players can now see each other's armormadmaxoft@gmail.com1-10/+12
2013-05-19Empty permission is always grantedmadmaxoft@gmail.com1-1/+7
2013-05-07Replaced MIN / MAX with std::min and std::max (pt 2)madmaxoft@gmail.com1-9/+7
2013-04-19cPlayer now uses BroadcastMovementUpdate during its Tick functionkeyboard.osh@gmail.com1-40/+6
2013-04-13Proper entity removal functionsmadmaxoft@gmail.com1-1/+1
2013-04-13Rewritten entities so that they are owned by individual chunks and ticked within their chunk's Tick()madmaxoft@gmail.com1-8/+7
2013-04-04Fixed personal crafting grid not being tossed on inventory close.madmaxoft@gmail.com1-19/+0
2013-04-01Pawn, Player: fixed asserts when teleporting players outside of the world (setting spawn Y to 256)madmaxoft@gmail.com1-9/+20
2013-03-23Added helper functions AddSpeed, AddSpeedX, AddSpeedY, AddSpeedZ, AddPosition, AddPosX, AddPosY, AddPosZ. Made sure that all entites use these helper functions.keyboard.osh@gmail.com1-1/+1
2013-03-22Implemented 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.keyboard.osh@gmail.com1-29/+29
2013-03-09Pickups are now being saved into Anvil.madmaxoft@gmail.com1-1/+1
2013-03-05Fixed random teleporting into the void when leaving minecartsmadmaxoft@gmail.com1-4/+9
2013-03-03Player can sit in minecarts (but not move them yet)madmaxoft@gmail.com1-1/+11
2013-01-26Changed HOOK_PLAYER_MOVED to HOOK_PLAYER_MOVING to match the scheme used for names.madmaxoft@gmail.com1-1/+1
2013-01-12Merged branch "branches/hooks" into "trunk".madmaxoft@gmail.com1-2/+2
2012-12-22MTRand reference is now passed as a Tick() parameter so that it isn't created and destroyed over and over again. All entities will handle physics (empty callback for now)madmaxoft@gmail.com1-5/+2
2012-12-21Added more constants into eEntityType; made them a compulsory parameter to the constructor, so that all entities have proper type.madmaxoft@gmail.com1-2/+2
2012-12-21Reworked the IsA() / GetClass() framework to actually be useful. Added GetParentClass().madmaxoft@gmail.com1-6/+0
2012-12-21Refactored the TakeDamage API to take equipped weapon and armor into consideration (PvP untested)madmaxoft@gmail.com1-15/+24
2012-12-15Fixed fall damage againluksor111@gmail.com1-1/+1
2012-11-27Fixed warnings in Player.cppluksor111@gmail.com1-2/+2
2012-11-27Added initial adventure mode supportluksor111@gmail.com1-2/+6
2012-11-26Fixed certain blocks crashing clients when minedluksor111@gmail.com1-1/+1
2012-11-01Refactored the world time.madmaxoft@gmail.com1-5/+5
2012-10-24Fixed issues with pickups. sebi.noreply@gmail.com1-2/+9
2012-10-18Converted some const char*s and std::strings to AStringsfaketruth1-6/+35
2012-09-29Fixed initial player head rotation when a player is being spawned on another clientfaketruth1-1/+4
2012-09-29SocketThread: clients aren't double-removed anymore.madmaxoft@gmail.com1-1/+4
2012-09-24Source files cleanup: The rest of the files renamed.madmaxoft@gmail.com1-13/+13
2012-09-23Source files cleanup: OSSupport-related files in a separate subfolder, renamed.madmaxoft@gmail.com1-2/+2
2012-09-23Source files cleanup: UI files renamedmadmaxoft@gmail.com1-2/+2
2012-09-20UI: Added shift-click support to most slot areas, except crafting.madmaxoft@gmail.com1-0/+3
2012-09-20Refactored windows.madmaxoft@gmail.com1-76/+41
2012-09-04Fixed a possible race condition in cClientHandle's packet sending code; prepared for moving cSocket out of cClientHandle's ownership.madmaxoft@gmail.com1-1/+1
2012-08-31Progress on the 1.3.2 protocol.madmaxoft@gmail.com1-1/+1
2012-08-29Gotten completely rid of all cPackets. The cProtocol125 class now does all the parsing and writing by itself.madmaxoft@gmail.com1-2/+2
2012-08-28Moved all packet-serializing code into cProtocol125; half the packet classes aren't needed anymore.madmaxoft@gmail.com1-4/+4
2012-08-24Monster classes don't use cPackets. Chat messages are sent / broadcast without cPackets. BlockEntities don't use cPackets.madmaxoft@gmail.com1-32/+20
2012-08-19Almost all packets' handling is now rewritten not to use cPacket descendants elsewhere than in cClientHandle.madmaxoft@gmail.com1-107/+94
2012-08-10Fixed a crash in creative inventory (FS 235, patch submitted by l0udPL)madmaxoft@gmail.com1-20/+34
2012-08-06A bit of cleanup and documentation around the UI window handlingmadmaxoft@gmail.com1-9/+10
2012-07-17Simple health regeneration systemlapayo94@gmail.com1-72/+60
2012-07-13The gamemode is now only saved if it is different from the current gamemode.lapayo94@gmail.com1-3/+12
2012-07-12Save last gamemodelapayo94@gmail.com1-0/+2
2012-07-12fixed bug http://www.mc-server.org/support/index.php?do=details&task_id=212&project=2lapayo94@gmail.com1-1/+1
2012-06-14Attempt to bring sanity to newlines across systems.cedeel@gmail.com1-1062/+1062
2012-06-06Item-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.madmaxoft@gmail.com1-40/+61
2012-05-29Refactored item-eating from cClientHandle into cPlayermadmaxoft@gmail.com1-9/+63
2012-05-27Improved logging on mis-configuration in cPlayer and cWorldStoragemadmaxoft@gmail.com1-1/+3
2012-03-24Added the new 1.2.4's PlayerAbilities packet; restructures packet files for less files, more dense.madmaxoft@gmail.com1-2/+0
2012-03-24Removed the split between 1.2.3 and 1.1, left only 1.2.3 codemadmaxoft@gmail.com1-7/+0
2012-03-19Fixed player heads always pointing north (new EntityHeadLook packet)madmaxoft@gmail.com1-2/+8
2012-03-16Got rid of cPlayer::sPlayerStatefaketruth1-82/+34
2012-03-14Split chunk data into separate arrays; decoupled most sources from cChunk.h dependencymadmaxoft@gmail.com1-1/+0
2012-03-10Fixed a few obsoleted functionsmadmaxoft@gmail.com1-1/+4
2012-03-09cClientHandles have a unique ID now to distinguish themfaketruth1-1/+1
2012-03-07Fixed bug where cPlayer's cClientHandle was used after cPlayer was destroyed http://forum.mc-server.org/showthread.php?tid=380faketruth1-7/+17
2012-03-05ChunkSender: Chunks are now compressed and sent to clients from a separate threads, proper passive waiting between threads. Not much tested, just appears to work :)madmaxoft@gmail.com1-1/+7
2012-03-01Chunks are successfully streamed to clients (in a bad a slow way, but whatever)faketruth1-0/+2
2012-02-29Added validity checks to world broadcasting. Also added logging to cPlayer deletion to catch that stupid BugByBoo.madmaxoft@gmail.com1-1/+7
2012-02-26Attempt at fixing crashes with disconnecting playersmadmaxoft@gmail.com1-10/+6
2012-02-20Removed some more cChunkPtr usagemadmaxoft@gmail.com1-28/+37
2012-02-16cPlayer empty-handed spawn fixmadmaxoft@gmail.com1-1/+2
2012-02-16Chunk 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 properlymadmaxoft@gmail.com1-1/+1
2012-02-15No longer using pointers for Vector3(f/d/i) in cEntity's and cTracerfaketruth1-26/+26
2012-02-15New players no longer cause an assertfaketruth1-3/+3
2012-02-13Rewritten 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.madmaxoft@gmail.com1-83/+117
2012-02-02cClientHandle: gotten rid of the obnoxious m_pState, now using direct members insteadmadmaxoft@gmail.com1-7/+10
2012-02-02cSocket API fix (possible invalid pointer)madmaxoft@gmail.com1-1/+19
2012-02-01Rewritten cAuthenticator to make use of the new cIsThread architecture - now authentication runs in a single separate thread for all clients;madmaxoft@gmail.com1-6/+14
2012-02-01AString logging fix 2madmaxoft@gmail.com1-4/+4
2012-02-01sprintf() begone! Replaced with StringUtils' Printf()madmaxoft@gmail.com1-8/+8
2012-02-01Introducing StringUtils - the place to be if you are a generic string routine :) No more sprintf()!madmaxoft@gmail.com1-9/+15
2012-01-31Can now receive POST data in WebPlugins!faketruth1-2/+1
2012-01-30Replaced most FILE operations with a cFile objectmadmaxoft@gmail.com1-58/+66
2012-01-30Added a WebAdmin interface to view users their groups, and the permissions of groups.faketruth1-1/+22
2012-01-29VC2008 / VC2010: Enabled precompiled header through Globals.h; the header included in every module in the project. Compilation optimization.madmaxoft@gmail.com1-4/+3
2012-01-01CreativeInventory Updatelapayo94@gmail.com1-18/+38
2012-01-01- implemented separated inventory for creative mode (cSurvivalInventory and cCreativeInventory)lapayo94@gmail.com1-5/+12
2011-12-29 - Initial food handling by cedeelmtilden@gmail.com1-0/+21
2011-12-29 - Chests open and close on clients when opened/closedmtilden@gmail.com1-2/+19
2011-12-28- implemented the fire simulation in native c++ (cFireSimulator)lapayo94@gmail.com1-0/+10
2011-12-28 - Fixed ping displaying same for everyone, knew it was something I messed up with itr :(mtilden@gmail.com1-1/+1
2011-12-28- Implemented Drops from Burning animalslapayo94@gmail.com1-79/+26
2011-12-27Users file was pretty messed up with mixed unix and windows line endings. The ini failed to parse correctly under cygwin.faketruth1-0/+1
2011-12-27 - Added basic ping handling.mtilden@gmail.com1-4/+4
2011-12-26Players can switch worlds on the fly with the command /gotoworld [worldName]. This uses the function cPlayer::MoveToWorld()faketruth1-0/+27
2011-12-26 - Linux compatible fixes including updated makefilemtilden@gmail.com1-3/+5
2011-12-26 - 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 queuemtilden@gmail.com1-7/+14
2011-12-26 - Default Notchian Ping (static until ping implemented through keepalive send/receive)mtilden@gmail.com1-2/+2
2011-12-26 - 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)mtilden@gmail.com1-5/+2
2011-12-26 - Make Color was using 2 extra characters which took 2 characters off the 16 max (including color codes) for scoreboard displaymtilden@gmail.com1-2/+17
2011-12-25Hold item is now dropped when inventory is closedlapayo94@gmail.com1-3/+25
2011-12-25Chunks 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 :Ofaketruth1-0/+2
2011-12-22Fixes:lapayo94@gmail.com1-1/+1
2011-12-21- Crafting fixed in 1.0.0lapayo94@gmail.com1-6/+4
2011-11-10Can now set gamemode via lua.admin@omencraft.com1-1/+15
2011-11-10Made block action sanity checks more robust, water buckets, lava buckets and empty buckets should all now work.admin@omencraft.com1-0/+6
2011-11-09Added m_IP to player class and binding to get IP for LUA. (Probably should use m_pState)admin@omencraft.com1-0/+5
2011-11-06Patch with diff file created by Sebi (implemented some stuff like lava physics, drops are deleted when in lava, water is now slower, lava gives actual damage etc.). Pistons now work mostly as they should. They do not yet show the motion animation and do not emit sound. They do extend, push, and retract as they should though. Right now the only way to activate a piston is to light redstone wire adjacent to it with a redstone torch.admin@omencraft.com1-18/+28
2011-11-02Fixed some "Entity was not found in any chunk!" warningsfaketruth1-1/+10
2011-11-01You can now run multiple worlds by defining them in settings.ini . However there's no way to change worlds on the fly yetfaketruth1-24/+14
2011-11-01forogt to update all of cPlayer.cpp for player based gamemode.admin@omencraft.com1-1/+1
2011-11-01Put in some sanity checks to ensure players don't interact with blocks too quickly. Changed gamemode to be player based. (MCServer crashes when picking up an item. Need to find and fix bug.)admin@omencraft.com1-7/+23
2011-10-31Player data is saved and loaded as human readable JSON now.faketruth1-18/+63
2011-10-31Prepared some parts of the code for multi world support, I created lots of TODO'sfaketruth1-22/+21
2011-10-26Made several recomended changes. Gamemode is now world based. Need to add it to player.admin@omencraft.com1-2/+7
2011-10-26Moved GAMEMODE declaration to a single place... cPacket.h. Player can't take damage any more but can still sometimes die on spawn. Not sure why. Falling through the void does not kill you yet.admin@omencraft.com1-5/+7
2011-10-21Compiles for linuxfaketruth1-0/+1
2011-10-03MCServer c++ source filesfaketruth1-0/+713