summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2014-09-12Added extra mushroom handler.Howaner1-7/+0
2014-09-06Fixed player spawning in unknown world.Mattes D1-0/+4
This may happen if the admin removes a world.
2014-09-05Fixed security: Player cannot spawn in a disabled world.Mattes D1-1/+1
2014-08-31Fixed styleJaume Aloy1-0/+3
2014-08-30Fixed potion removing in creative mode.Howaner1-4/+2
2014-08-24RankMgr: Default rank is applied to players without any rank.Mattes D1-1/+5
2014-08-21Removed cGroup and cGroupManager.Mattes D1-2/+0
2014-08-21Protection Enchantments, some fixesJaume Aloy1-1/+1
- Protection echantments (fire, blast, feather falling, protection and projectile). It isn't finished, add secondary effects and optimize the code. - Removed some brackets. - Silk touch fixed.
2014-08-19cPlayer reads ranks from cRankManager.Mattes D1-201/+55
2014-08-19Added more enchantments and some fixesJaume Aloy1-0/+20
- Removed Debug messages - Added Punch enchantment effect - Added Silk Touch enchantment - Added Unbreaking enchantment effect
2014-08-18Player: Silenced a few type conversion warnings.Mattes D1-2/+2
2014-08-17Player saving creates the "players" folder, if needed.Mattes D1-0/+1
Fixes #1268.
2014-08-16Better OnPlayerMoving hook.Howaner1-2/+10
2014-08-11Fixed tolua error with static initializationarchshift1-0/+9
2014-08-11Player.cpp: change unnamed enum to constant integersarchshift1-1/+1
2014-08-10SpacesTycho1-1/+1
2014-08-10Fixed potential crash in Player.cppTycho1-0/+4
Fixes CID 71780 If ShouldBroadcastDeathMessages is false the pointer would fall through to a check agaist it being a player
2014-08-10Fixed swing arm animation when you ate.Howaner1-4/+2
2014-08-03Code reduction and clarity fixesarchshift1-10/+7
2014-08-03Removed unused cPlayer::FoodPoison functionarchshift1-9/+0
2014-07-31Fixed hunger bugs, Implemented golden apple, added jump statistic, added correct food effects.Howaner1-17/+36
2014-07-31Fixed UUIDs handling in cPlayer.madmaxoft1-5/+8
The loading expected dashed UUIDs, MCS uses short UUIDs throughout.
2014-07-29Slight cleanup after portalsTiger Wang1-1/+1
2014-07-27Add "Broadcasting" settings to world.iniHowaner1-6/+8
2014-07-23SuggestionsTiger Wang1-1/+1
2014-07-23Fix item durability.Howaner1-2/+2
Fixes #1181
2014-07-22Speed improvements, crash fixes, & self-suggestionsTiger Wang1-2/+4
2014-07-21SuggestionsTiger Wang1-20/+5
2014-07-21Style: Normalized to no spaces before closing parenthesis.madmaxoft1-54/+54
2014-07-21Style: Normalized spaces after if, for and while.madmaxoft1-28/+28
2014-07-20Bug and crash fixesTiger Wang1-18/+17
* Fixes end portals' solidity * Fixed crashes to do with multithreading and removing an entity from the wrong world * Fixed crashes due to bad merge * Fixed crashes due to an object being deleted twice * Simplified cWorld::Start() and added comments to configuration files
2014-07-19Removed references to deprecated cChatColor::Colorarchshift1-1/+1
2014-07-19Code style: Fixed braces on separate lines.madmaxoft1-1/+2
2014-07-19Fixed clamping issuesarchshift1-4/+1
2014-07-18Fix failed merge and other issuesTiger Wang1-32/+8
2014-07-18Moved ChatColor.h out of defines where it was not neededarchshift1-0/+1
2014-07-17Fixed NULL being passed instead of a double to AddEntityEffectarchshift1-1/+1
2014-07-17Fixed tabs used for alignment.madmaxoft1-4/+4
2014-07-17More trailing whitespace fixes.madmaxoft1-1/+1
2014-07-17Player.cpp: Fixed compile errorarchshift1-1/+1
2014-07-17Player.cpp: Added Wither death messagearchshift1-0/+1
2014-07-17Basic style fixes.madmaxoft1-5/+5
2014-07-17Normalized comments.madmaxoft1-21/+21
This was mostly done automatically and then visually inspected for obvious errors. All //-style comments should have a 2-space separation from the code, and 1 space after the comment sign.
2014-07-16Another fix for excessive food drainTiger Wang1-0/+9
2014-07-14Player properties are now retrievedTiger Wang1-2/+2
2014-07-13Changed BroadcastSoundEffect function to take floating pos.Howaner1-1/+1
2014-07-11Simplified the player data loading.madmaxoft1-9/+8
2014-07-11Player data filenames are based on UUID.madmaxoft1-54/+111
2014-07-11Fixed a missing return value.madmaxoft1-0/+2
2014-07-11Preparation for player UUID-based storage: LoadFromFile()madmaxoft1-21/+33
2014-07-04Tailored death messagesTiger Wang1-7/+28
2014-07-02SuggestionTiger Wang1-13/+13
2014-07-02Fixed player teleport food drainTiger Wang1-1/+9
2014-06-30Fixes.Howaner1-3/+3
2014-06-30Add new hook: HOOK_PLAYER_FOOD_LEVEL_CHANGEHowaner1-26/+24
2014-06-29Fixed respawningTiger Wang1-1/+1
* Fixes #1103
2014-06-29Properly implemented enderchestsTiger Wang1-0/+7
2014-06-28Likely fixed too quick food depletionTiger Wang1-1/+1
* Fixes FS427 properly, hopefully
2014-06-21Fixed invalid iteratorsTiger Wang1-0/+1
2014-06-21More suggestionsTiger Wang1-1/+1
2014-06-19Nullify deleted pointers.archshift1-0/+1
2014-06-19EntityEffects.x -> EntityEffect.x, Object-Oriented effectsarchshift1-37/+0
Changed effect map to take a pointer of the effect as a result.
2014-06-17Entity Effects: Clarified user, added it to AddEntityEffectarchshift1-1/+1
Added second AddEntityEffect with a pass-by-value of the class.
2014-06-17Changed the AddEntityEffect() params for easier calls.madmaxoft1-1/+1
2014-06-17Pawn: renamed HandleEntityEffects to HandleEntityEffectarchshift1-2/+2
Exported entity effect functions for ToLua and documented them in APIDesc.lua
2014-06-17Entity effect type: use 'eff' as a prefix instead of 'ef'archshift1-6/+6
2014-06-17Implemented milk, added documentation to Pawn.harchshift1-1/+1
2014-06-17Pawn.cpp: fixed effect iterator BAD_ACCESSarchshift1-1/+1
Erasure was occurring before the iterator increased, causing a bad access. Solved by storing map pairs in variables and manually updating iterator before erasure. Fixed mix-up in function arguments on food poisoning
2014-06-17EntityEffect: read-only getters, added user and distance modifier fieldsarchshift1-1/+1
User: the pawn that uses or produces the entity effect (drinks/throws a potion) Distance modifier: the potency modifier from splash potion effectivity radius
2014-06-17Player: Removed food-poisoning-specific code, set duration to 30 secondsarchshift1-20/+1
http://minecraft.gamepedia.com/Hunger#Behavior
2014-06-17Entity effects: Added handlers for entity effectsarchshift1-13/+38
Implemented hunger, instant health, damage, poison, regen Added "template" entity effect implementations
2014-06-17Moved Effects.h to EntityEffects.h, added initial implarchshift1-3/+3
2014-06-16Add bow charging animationHowaner1-1/+5
2014-06-16Merge branch 'master' of github.com:mc-server/MCServerTycho1-1/+29
2014-06-16Implemented PR suggestionsarchshift1-1/+1
Furnace.txt: newline BlockID: removed extraneous dimension mapping cEntity: fixed typo cPlayer: WorldPtr typedef
2014-06-15Players are saved regularlyTiger Wang1-1/+18
* Fixes #1076
2014-06-14Refactored speed-setting to use a common function for all cases.madmaxoft1-56/+2
2014-06-12Portals animate and delay correctlyTiger Wang1-15/+6
2014-06-08Fixed deadlock when moving players to other worlds.Mattes D1-8/+10
Fixes #1039, fixes #851
2014-06-08Added queue for adding entities to cWorld.Mattes D1-2/+0
This alone doesn't work properly yet, further changes to cPlayer are needed.
2014-06-05Fixed compilationTiger Wang1-1/+1
2014-06-04SuggestionsTiger Wang1-0/+1
2014-06-04Configurable portalsTiger Wang1-1/+1
2014-06-04SuggestionsTiger Wang1-1/+1
2014-06-03Player permissions aren't logged to console anymore.madmaxoft1-7/+0
This was only logspam on most servers and there are alternative ways to list players' permissions.
2014-06-01Implemented bed homesTiger Wang1-13/+22
+ Implemented bed home positions * Fixed some inventory and health server/client mismatches after world change
2014-05-31Implemented end and nether portalsTiger Wang1-10/+26
2014-05-29Revert "Fixed a food saturation issue"Tiger Wang1-1/+1
This reverts commit 67308e4337b422ebefb249049e662266072b0ba2.
2014-05-25Fixed a food saturation issueTiger Wang1-1/+1
2014-05-22cPlayer overrides the SetSpeedXX functionsSTRWarrior1-0/+45
Fixed compile error
2014-05-22Both SetSpeed functions are now overridden by cPlayerSTRWarrior1-0/+20
2014-05-20Cleaned up cPlayer::UpdateMovementStats; Wither achievementsandrew1-14/+57
2014-05-20Update Player.cppAlexander Harkness1-19/+19
2014-05-19Added client translation to achievementsTiger Wang1-4/+4
2014-05-18There's no "round" function in MSVC2008.madmaxoft1-3/+3
2014-05-13Fixesandrew1-10/+11
2014-05-12Movement Statisticsandrew1-9/+77
2014-05-12cEntity::Killed(cEntity *) Handler; Achievement triggers; cPlayer::AwardAchievement()andrew1-4/+66
2014-05-11Fixed stat serializationandrew1-10/+21
2014-05-11Statistic Managerandrew1-2/+19
2014-05-06Suggestions'd #2Tiger Wang1-1/+1
2014-05-06Suggestions'dTiger Wang1-1/+1
2014-04-27A tiny speed improvement in ApplyFoodExhaustion()Tiger Wang1-5/+5
2014-04-26Add entity invulnerableHowaner1-9/+12
2014-04-23Some change to Entity.cppTiger Wang1-16/+6
* Added comments to BroadcastMovementUpdate() and the collision tracer
2014-04-19Fixed Flint and Steel, reverted Minecart change, renamed a parameter namejfhumann1-2/+2
2014-04-18Did some static analysis, fixed some bugs and optimized a lot of codejfhumann1-4/+5
2014-04-17Added new AI rulesTiger Wang1-18/+14
+ Added new AI rules handling cacti and large heights * Fixed cIniFile not recognising comments in cIniFile::ReadFile() * Fixed users.ini not being properly generated * Changed all instances of (int)floor(GetPosXXX()) to POSXXX_TOINT
2014-04-12Entities handle chunks properly againTiger Wang1-1/+1
* Entities properly handle chunks * Changed EntityStatus enums to be less shouty
2014-04-05Added cPlayer:SendRotation() API function.madmaxoft1-0/+11
2014-03-29Fixed #721 and FS439Tiger Wang1-0/+1
2014-03-20Plugins can set flying speed.madmaxoft1-3/+30
2014-03-20Rewritten player speeds to be relative unit-less.madmaxoft1-2/+2
Value of 1 means "default speed", 2 means "double the speed", 0.5 means "half the speed". This allows for easier plugins and is more future-proof.
2014-03-11Unified Vector classesandrew1-0/+1
2014-03-09CheckBlockInteractionsRate() fixed & enabledTiger Wang1-25/+0
2014-03-01g_BlockXXX => cBlockInfo::XXXandrew1-1/+1
2014-03-01Shortened enumsandrew1-2/+2
2014-03-01Exported and documented cScoreboardandrew1-18/+3
2014-02-28Moved common cGroupManager code to a separate function.madmaxoft1-7/+11
This fixes my concerns in PR #709.
2014-02-27Removed unneeded includes in Player.cppTiger Wang1-7/+0
2014-02-21Remove users.ini generation in Player.cpp and use the CheckUsers() FunctionHowaner1-6/+1
2014-02-21Add 'Group not found', when the Server load the users.ini and add auto generate from users.iniHowaner1-1/+5
2014-02-17Map item handler; Fixed several bugsandrew1-0/+3
2014-02-16Fixed minor formatting issues from #682Tiger Wang1-10/+1
- Removed unused PlaySoundEffect * Simplified and parenthesised code
2014-02-16Add Exp Bottle EffectsHowaner1-0/+9
2014-02-16Disable Hunger DeathHowaner1-1/+7
2014-02-15If a player is called "Notch" he drops an apple. http://minecraft.gamepedia.com/NotchSTRWarrior1-0/+6
2014-02-12Made player jump reset less ambiguousTiger Wang1-1/+2
2014-02-11Fixed #627Tiger Wang1-2/+2
- Attack() is now called from cAggressive instead of cMonster * Monsters can no longer attack through walls * Should fix last remnants of player damage after teleporting (that both STR and bearbin contributed fixes to :P)
2014-02-07Improved chat messaging functionsTiger Wang1-10/+0
* Moved string manipulation into cClientHandle and therefore... + Added configuration option for prefixes. * Cleaned up code. * Updated documentation for API.
2014-02-06Server internally uses new functionsTiger Wang1-6/+4
2014-02-05Removed deprecated HasCommand functionSTRWarrior1-13/+0
2014-02-05Fixed annoying creative on fire bugTiger Wang1-0/+17
2014-02-03Fixed a crash bugTiger Wang1-3/+3
2014-02-03Server now handles join messages alsoTiger Wang1-1/+7
* Revised as well hook documentation
2014-02-02Creative players take Plugin damageTiger Wang1-2/+2
2014-02-01Removed "player destroying" hookdaniel09161-3/+1
2014-01-25Two minor changesTiger Wang1-5/+3
2014-01-25Implemented fall damage for mobsTiger Wang1-4/+2
+ Implemented mobile fall damage * Formatting fixes + Defined new Position->Integer macros
2014-01-25Added "player destroying" and "player destroyed" hooksdaniel09161-0/+4
Hooks: HOOK_PLAYER_DESTROYING HOOK_PLAYER_DESTROYED Idea from: https://github.com/mc-server/MCServer/issues/473
2014-01-25All mobs now drown (fixes #54)Tiger Wang1-103/+14
* Implemented mob drowning * Iron Golems and squids are excluded
2014-01-24removed hook from enchanting commitdaniel09161-4/+0
2014-01-24Some updates for enchantingdaniel09161-0/+4
2014-01-24Fixed indentation once and for all.Mike Hunsinger1-31/+31
2014-01-24Fixed indentation and doxygen comments... For real this time.Mike Hunsinger1-3/+3
2014-01-24Fixed spacing and doxycomments.Mike Hunsinger1-3/+3
2014-01-23Split TossItem into three Toss functions (Held, Equipped and Pickup)Mike Hunsinger1-49/+58
2014-01-22Fixed compilation on VC2008tonibm191-0/+1
2014-01-21Scoreboard protocol supportandrew1-6/+11
2014-01-20Scoreboard deserializationandrew1-1/+21
2014-01-19Scoreboard improvementsandrew1-4/+4
2014-01-19Basic scoreboard implementationandrew1-0/+52
2014-01-17Removed internal cEntity::GetRot() usage.madmaxoft1-2/+2
2014-01-16Removed obsoleted functionsTiger Wang1-3/+3
2014-01-15Implemented Ctrl-Q drop stackTiger Wang1-3/+8
Also fixed an issue with TossItems not respecting count.
2014-01-14Yes newline at end of file :DTiger Wang1-1/+5
2014-01-13Detaching improvementsTiger Wang1-0/+26
* Players now search for an area around themselves to teleport to when detaching from something
2013-12-31Fixed a cPlayer::IsGameModeAdventure. It was determined based off of gmCreate rather than gmAdventure.Morgan Redshaw1-2/+2
2013-12-26Server now handles death messagesTiger Wang1-0/+16
2013-12-25Braced up some codeTiger Wang1-0/+2
2013-12-25Used IsGamemodeCreative() functionTiger Wang1-1/+1
2013-12-24Fixed comments in main.cpp and Player.cppTiger Wang1-1/+1
2013-12-24finally removed them all?Alexander Harkness1-1/+1
2013-12-23Improved player fall particle positionsTiger Wang1-5/+2
2013-12-23Clarified some code in Player.cppTiger Wang1-2/+5
2013-12-22Implemented fall particlesTiger Wang1-3/+18
2013-12-21Floater now dissapears when the player doesn't have an fishing rod equipped.STRWarrior1-0/+29
2013-12-20Sorted a few constructors to remove warnings.madmaxoft1-21/+22
2013-12-19Fixed PlayerAbilities and creativeTiger Wang1-0/+18
2013-12-19Implented IsFishing, SetIsFishing and GetFloaterID().STRWarrior1-0/+2
2013-12-16Fixed cClientHandle::Tick() being called from two threads.madmaxoft1-22/+0
When the player was initialized, the Tick() function continued to stream chunk, while the cWorld called Tick() from its tick thread. Final fix for #187.
2013-12-15Server saves if a player is flying.STRWarrior1-1/+3
2013-12-15Renamed ShootTo function to ForceSetSpeed.STRWarrior1-1/+1
2013-12-15This adds a function that allows you to 'shoot' a player towards a direction.STRWarrior1-0/+10
2013-12-15Added m_IsFlying and m_CanFly. Both have a Get and Set function. Added cClientHandle::SendPlayerAbilities() functionSTRWarrior1-0/+32
2013-12-15cPlayer is using the broadcast functions.STRWarrior1-3/+3
2013-12-14Added E_EFFECT_<Effect>STRWarrior1-3/+3
2013-12-14Added SendEntityEffect and SendRemoveEntityEffect. Also a Player now gets the hunger effect when he has food poison.STRWarrior1-1/+9
2013-12-14Improved player permissions loggingTiger Wang1-1/+1
2013-12-14Fixes to redstone wire and torchesTiger Wang1-1/+1
+ Wires now power blocks around the block beneath * Torches no longer power off if it is on a linked powered block * Enhanced code, split functions, etc.
2013-12-14Groups.ini and Users.ini are now generatedTiger Wang1-1/+6
2013-12-08Moved bindings-related to a Bindings subfolder.madmaxoft1-1/+1
Ref.: #407
2013-12-07Renamed animation functionTiger Wang1-3/+3
Renamed BroadcastPlayerAnimation to BroadcastEntityAnimation. Not just players can have animations, you know.
2013-12-06Puking now uses GetEyeHeight()Tiger Wang1-1/+1
2013-12-06Fixed eating using wrong animationTiger Wang1-1/+1
2013-12-06Tools make a sound when breaking, fixes #266Tiger Wang1-1/+4
2013-11-27Fixed VC2008 compilation, normalized include paths.madmaxoft1-1/+1
2013-11-27Fixed some of tiger's derpyness.Alexander Harkness1-2/+2
2013-11-26Hopefully fixed last of the Linux compile errorsTiger Wang1-1/+1
2013-11-24Attempt to fix compilationTiger Wang1-2/+2
2013-11-24Moved source to srcAlexander Harkness1-0/+0
2013-11-21Exported static XP calculation to Lua API.madmaxoft1-8/+7
2013-11-16minor change in LOGD callDaniel O'Brien1-2/+2
2013-11-16removed magic numberDaniel O'Brien1-2/+2
2013-11-16edited comment and changed error behavior of DeltaXpDaniel O'Brien1-3/+9
2013-11-16updated plugin again...Daniel O'Brien1-4/+4
2013-11-16removed SpendExperience and changed AddExperience to handle removing XpDaniel O'Brien1-29/+8
2013-11-16fixed bug and added SpendExperience()Daniel O'Brien1-4/+37
2013-11-16fix possible threadlock issue, changed function names to be closer to standardDaniel O'Brien1-18/+30
2013-11-15alignment fixes :)Daniel O'Brien1-1/+1
2013-11-15finished #143 I believeDaniel O'Brien1-3/+16
2013-11-15added cProtocol function to pass xp to clientDaniel O'Brien1-13/+19
2013-11-14fixed XpGetPercentageDaniel O'Brien1-1/+3
2013-11-14fixed function nameDaniel O'Brien1-1/+1
2013-11-13fixed commentDaniel O'Brien1-1/+1
2013-11-13changed function nameDaniel O'Brien1-1/+1
2013-11-13minor changesDaniel O'Brien1-5/+5
2013-11-13changed name conventionDaniel O'Brien1-2/+2
2013-11-13Fixed problems with code style etcDaniel O'Brien1-30/+68
2013-11-13Player Xp, includes get/set and addExperienceDaniel O'Brien1-1/+2
2013-11-13Player XpDaniel O'Brien1-3/+71
2013-11-02Fixed bow damage in creativeTiger Wang1-1/+1
Also reverted indenting change
2013-11-02Multiple fixesTiger Wang1-12/+9
* Fixed #282 * Fixed bow not taking damage * Enhanced Player.cpp code
2013-10-25cIniFile doesn't store filename internally anymore.madmaxoft1-4/+4
2013-10-24Unified cPlayer's Heal() function with cEntity's.madmaxoft1-5/+2
2013-10-24Pickups now have collection delay when vomitedTiger Wang1-1/+1
Implements FS#394.
2013-10-09Moved cMakeDir::MakeDir to cFile::CreateFolder.madmaxoft1-2/+1
And exported to Lua.
2013-09-16Attempt at fixing linux crash on player login.Matyas Dolak1-1/+11
Ref.: http://forum.mc-server.org/showthread.php?tid=1244
2013-09-11Better player gamemode detectionTiger Wang1-1/+1
2013-09-11Added player void damageTiger Wang1-3/+6
2013-09-08Removed the "charging bow" debug message.madmaxoft1-1/+0
2013-09-04Players toss a little furtherTiger Wang1-1/+1
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
The arrow is released, but sometimes hits wrong blocks or disappears completely.
2013-08-20Hotfix for #83.madmaxoft1-0/+6
Do not tick the player while their chunk is invalid.
2013-08-19Debuggers: Added continuous hunger reporting.madmaxoft1-2/+2
Showcases the OnWorldTick() hook to fire events at regular intervals. Will be used for debugging the issues related to hyper-hunger.
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
Fixes #53.
2013-08-14Server counts the players correctly.madmaxoft1-0/+3
Was missing the PlayerDestroying() call, so players weren't removed from the playercount.
2013-08-14Fixed player swimstate crash.madmaxoft1-16/+35
The check for swimming / submersion checks the Y coord first. Fixes #63.
2013-08-14Player counts are now properly handled.madmaxoft1-9/+6
Fixes #80
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
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-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
Hopefully only prints in debug the debug message!
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
Fixes #29
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
As requested in FS 418.
2013-08-01New players get full healthmadmaxoft1-4/+5
Fixes #28.
2013-07-30Fixed inverted sanity check in SetGameMode()madmaxoft1-1/+1
Fixes #22.
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
Also fixed the API relating to food, determining player gamemode, and removed several unneeded API functions.
2013-07-28Implemented basic eating support.madmaxoft1-0/+58
Food is now properly consumed and it takes 1.5 sec.
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
These are the preferred way of determining the gamemode, you should use those instead of doing manual comparisons to the gamemode value.
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1685 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-07-12First implementation of movement-related hunger and APImadmaxoft@gmail.com1-69/+214
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1673 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-07-07Fixed sprinting in 1.6.1, made speeds available through API; fixed messages containing quotes.madmaxoft@gmail.com1-0/+54
Fixes FS #415 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1660 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-07-07Improved function names for protocol packet sending; alpha-sorted the function listsmadmaxoft@gmail.com1-3/+3
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1659 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-07-05Fixed a crash when moving a player to a non-existent world (reported by tonibm19)madmaxoft@gmail.com1-1/+1
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-03Fixed player moving between worlds.madmaxoft@gmail.com1-19/+30
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-01Rewritten entity-on-fire management ("forever on fire" bugs)madmaxoft@gmail.com1-11/+14
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-06-16Added respawn screen when switching worlds.nielsbreu@gmail.com1-1/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1598 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-04Implemented proper player crouching.madmaxoft@gmail.com1-0/+18
Fixes FS #365 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1553 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-02LuaWindow: Fixed memory leaks with unclosed windowsmadmaxoft@gmail.com1-5/+5
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-05-30Added the OnClosing callback to cLuaWindow APImadmaxoft@gmail.com1-5/+16
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1534 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-30Window contents are sent whenever the window is opened by a player.madmaxoft@gmail.com1-0/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1533 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-30LuaWindow: Initial code, the window can be opened, but not much manipulatedmadmaxoft@gmail.com1-6/+23
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1532 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-30Implemented left-click inventory paintingmadmaxoft@gmail.com1-0/+30
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1529 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-28Moved BlockEntities to a separate foldermadmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1527 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-24Refactored cInventory to use cItemGrid for the actual Storagemadmaxoft@gmail.com1-13/+5
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-19Inventory code cleanup, players can now see each other's armormadmaxoft@gmail.com1-10/+12
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1493 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-19Empty permission is always grantedmadmaxoft@gmail.com1-1/+7
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1490 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-07Replaced MIN / MAX with std::min and std::max (pt 2)madmaxoft@gmail.com1-9/+7
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1456 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-19cPlayer now uses BroadcastMovementUpdate during its Tick functionkeyboard.osh@gmail.com1-40/+6
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1395 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-13Proper entity removal functionsmadmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1386 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-13Rewritten entities so that they are owned by individual chunks and ticked within their chunk's Tick()madmaxoft@gmail.com1-8/+7
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1385 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-04Fixed personal crafting grid not being tossed on inventory close.madmaxoft@gmail.com1-19/+0
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-01Pawn, Player: fixed asserts when teleporting players outside of the world (setting spawn Y to 256)madmaxoft@gmail.com1-9/+20
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1346 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1299 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1294 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-09Pickups are now being saved into Anvil.madmaxoft@gmail.com1-1/+1
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-05Fixed random teleporting into the void when leaving minecartsmadmaxoft@gmail.com1-4/+9
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1259 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-03Player can sit in minecarts (but not move them yet)madmaxoft@gmail.com1-1/+11
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1249 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-01-26Changed HOOK_PLAYER_MOVED to HOOK_PLAYER_MOVING to match the scheme used for names.madmaxoft@gmail.com1-1/+1
-ING means the event is being processed and may be refused by a plugin, -ED means it has already happenned and the plugin cannot do anything about it. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1174 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-01-12Merged branch "branches/hooks" into "trunk".madmaxoft@gmail.com1-2/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1139 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1096 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
Also added a few utility functions to cEntity for distinguishing the types (IsPlayer(), IsPickup() etc.) git-svn-id: http://mc-server.googlecode.com/svn/trunk@1092 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-12-21Reworked the IsA() / GetClass() framework to actually be useful. Added GetParentClass().madmaxoft@gmail.com1-6/+0
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1090 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-12-21Refactored the TakeDamage API to take equipped weapon and armor into consideration (PvP untested)madmaxoft@gmail.com1-15/+24
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
2012-12-15Fixed fall damage againluksor111@gmail.com1-1/+1
Added sound effects to pistons git-svn-id: http://mc-server.googlecode.com/svn/trunk@1074 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-11-27Fixed warnings in Player.cppluksor111@gmail.com1-2/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1071 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-11-27Added initial adventure mode supportluksor111@gmail.com1-2/+6
Added missing Emerald crafting recipe You get more fall damage when jumping Torch no longer protects players from fall damage Fixed Ender Chest drops git-svn-id: http://mc-server.googlecode.com/svn/trunk@1070 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-11-26Fixed certain blocks crashing clients when minedluksor111@gmail.com1-1/+1
Fixed rail duplication glitch Fixed fall damage calculation Glass no longer drops glass git-svn-id: http://mc-server.googlecode.com/svn/trunk@1068 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-11-01Refactored the world time.madmaxoft@gmail.com1-5/+5
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
2012-10-24Fixed issues with pickups. sebi.noreply@gmail.com1-2/+9
* Now when picking up max. stack amount is checked. * Added cInventory::AddItemAnyAmount() which will not fail if it cannot add all items (it will just modify amount) * If there is no space in inventory and picking up stacked items, it will try to fill stacks already in inventory, partially picking up the item. * When closing inventory player will drop any items it's currently 'dragging' git-svn-id: http://mc-server.googlecode.com/svn/trunk@1008 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-18Converted some const char*s and std::strings to AStringsfaketruth1-6/+35
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
2012-09-29Fixed initial player head rotation when a player is being spawned on another clientfaketruth1-1/+4
Fixed showing correct item in the player hand when spawned on another client (it didn't include metadata/health before) Fixed player head rotation when moving and looking around at the same time git-svn-id: http://mc-server.googlecode.com/svn/trunk@914 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-29SocketThread: clients aren't double-removed anymore.madmaxoft@gmail.com1-1/+4
git-svn-id: http://mc-server.googlecode.com/svn/trunk@909 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-24Source files cleanup: The rest of the files renamed.madmaxoft@gmail.com1-13/+13
git-svn-id: http://mc-server.googlecode.com/svn/trunk@887 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-23Source files cleanup: OSSupport-related files in a separate subfolder, renamed.madmaxoft@gmail.com1-2/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@885 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-23Source files cleanup: UI files renamedmadmaxoft@gmail.com1-2/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@878 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-20UI: Added shift-click support to most slot areas, except crafting.madmaxoft@gmail.com1-0/+3
Also fixed survival inventory's crafting grid not working. git-svn-id: http://mc-server.googlecode.com/svn/trunk@868 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-20Refactored windows.madmaxoft@gmail.com1-76/+41
As described on the forum: http://forum.mc-server.org/showthread.php?tid=561 For now, only basic clicking works; shift-click not implemented yet. git-svn-id: http://mc-server.googlecode.com/svn/trunk@867 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@832 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-31Progress on the 1.3.2 protocol.madmaxoft@gmail.com1-1/+1
Sometimes the client lets the player through, but most of the times the connection breaks for no apparent reason. git-svn-id: http://mc-server.googlecode.com/svn/trunk@812 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@802 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-28Moved all packet-serializing code into cProtocol125; half the packet classes aren't needed anymore.madmaxoft@gmail.com1-4/+4
git-svn-id: http://mc-server.googlecode.com/svn/trunk@800 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@783 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-19Almost all packets' handling is now rewritten not to use cPacket descendants elsewhere than in cClientHandle.madmaxoft@gmail.com1-107/+94
git-svn-id: http://mc-server.googlecode.com/svn/trunk@761 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-10Fixed a crash in creative inventory (FS 235, patch submitted by l0udPL)madmaxoft@gmail.com1-20/+34
git-svn-id: http://mc-server.googlecode.com/svn/trunk@722 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-06A bit of cleanup and documentation around the UI window handlingmadmaxoft@gmail.com1-9/+10
git-svn-id: http://mc-server.googlecode.com/svn/trunk@716 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-17Simple health regeneration systemlapayo94@gmail.com1-72/+60
Prepared for food git-svn-id: http://mc-server.googlecode.com/svn/trunk@679 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-13The gamemode is now only saved if it is different from the current gamemode.lapayo94@gmail.com1-3/+12
Default gamemode now depends on the joined world, not on the default world git-svn-id: http://mc-server.googlecode.com/svn/trunk@661 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-12Save last gamemodelapayo94@gmail.com1-0/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@660 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-12fixed bug http://www.mc-server.org/support/index.php?do=details&task_id=212&project=2lapayo94@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@658 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-14Attempt to bring sanity to newlines across systems.cedeel@gmail.com1-1062/+1062
git-svn-id: http://mc-server.googlecode.com/svn/trunk@606 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@561 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-05-29Refactored item-eating from cClientHandle into cPlayermadmaxoft@gmail.com1-9/+63
git-svn-id: http://mc-server.googlecode.com/svn/trunk@519 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-05-27Improved logging on mis-configuration in cPlayer and cWorldStoragemadmaxoft@gmail.com1-1/+3
git-svn-id: http://mc-server.googlecode.com/svn/trunk@505 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-24Added the new 1.2.4's PlayerAbilities packet; restructures packet files for less files, more dense.madmaxoft@gmail.com1-2/+0
git-svn-id: http://mc-server.googlecode.com/svn/trunk@431 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-24Removed the split between 1.2.3 and 1.1, left only 1.2.3 codemadmaxoft@gmail.com1-7/+0
git-svn-id: http://mc-server.googlecode.com/svn/trunk@429 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-19Fixed player heads always pointing north (new EntityHeadLook packet)madmaxoft@gmail.com1-2/+8
git-svn-id: http://mc-server.googlecode.com/svn/trunk@424 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-16Got rid of cPlayer::sPlayerStatefaketruth1-82/+34
git-svn-id: http://mc-server.googlecode.com/svn/trunk@418 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-14Split chunk data into separate arrays; decoupled most sources from cChunk.h dependencymadmaxoft@gmail.com1-1/+0
git-svn-id: http://mc-server.googlecode.com/svn/trunk@411 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-10Fixed a few obsoleted functionsmadmaxoft@gmail.com1-1/+4
git-svn-id: http://mc-server.googlecode.com/svn/trunk@397 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-09cClientHandles have a unique ID now to distinguish themfaketruth1-1/+1
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-07Fixed bug where cPlayer's cClientHandle was used after cPlayer was destroyed http://forum.mc-server.org/showthread.php?tid=380faketruth1-7/+17
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-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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@365 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-01Chunks are successfully streamed to clients (in a bad a slow way, but whatever)faketruth1-0/+2
Fixed respawn packet for 1.2.2 git-svn-id: http://mc-server.googlecode.com/svn/trunk@350 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-29Added validity checks to world broadcasting. Also added logging to cPlayer deletion to catch that stupid BugByBoo.madmaxoft@gmail.com1-1/+7
git-svn-id: http://mc-server.googlecode.com/svn/trunk@342 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-26Attempt at fixing crashes with disconnecting playersmadmaxoft@gmail.com1-10/+6
git-svn-id: http://mc-server.googlecode.com/svn/trunk@329 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-20Removed some more cChunkPtr usagemadmaxoft@gmail.com1-28/+37
git-svn-id: http://mc-server.googlecode.com/svn/trunk@298 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-16cPlayer empty-handed spawn fixmadmaxoft@gmail.com1-1/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@275 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@273 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-15No longer using pointers for Vector3(f/d/i) in cEntity's and cTracerfaketruth1-26/+26
git-svn-id: http://mc-server.googlecode.com/svn/trunk@268 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-15New players no longer cause an assertfaketruth1-3/+3
git-svn-id: http://mc-server.googlecode.com/svn/trunk@267 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@251 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-02cClientHandle: gotten rid of the obnoxious m_pState, now using direct members insteadmadmaxoft@gmail.com1-7/+10
git-svn-id: http://mc-server.googlecode.com/svn/trunk@228 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-02cSocket API fix (possible invalid pointer)madmaxoft@gmail.com1-1/+19
cMCLogger slight change (CS ptr -> member) git-svn-id: http://mc-server.googlecode.com/svn/trunk@222 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
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-01AString logging fix 2madmaxoft@gmail.com1-4/+4
git-svn-id: http://mc-server.googlecode.com/svn/trunk@218 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-01sprintf() begone! Replaced with StringUtils' Printf()madmaxoft@gmail.com1-8/+8
git-svn-id: http://mc-server.googlecode.com/svn/trunk@216 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-01Introducing StringUtils - the place to be if you are a generic string routine :) No more sprintf()!madmaxoft@gmail.com1-9/+15
git-svn-id: http://mc-server.googlecode.com/svn/trunk@209 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-01-31Can now receive POST data in WebPlugins!faketruth1-2/+1
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-30Replaced most FILE operations with a cFile objectmadmaxoft@gmail.com1-58/+66
git-svn-id: http://mc-server.googlecode.com/svn/trunk@196 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-01-30Added a WebAdmin interface to view users their groups, and the permissions of groups.faketruth1-1/+22
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-29VC2008 / VC2010: Enabled precompiled header through Globals.h; the header included in every module in the project. Compilation optimization.madmaxoft@gmail.com1-4/+3
git-svn-id: http://mc-server.googlecode.com/svn/trunk@188 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-01-01CreativeInventory Updatelapayo94@gmail.com1-18/+38
- 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- implemented separated inventory for creative mode (cSurvivalInventory and cCreativeInventory)lapayo94@gmail.com1-5/+12
(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
2011-12-29 - Initial food handling by cedeelmtilden@gmail.com1-0/+21
git-svn-id: http://mc-server.googlecode.com/svn/trunk@156 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-29 - Chests open and close on clients when opened/closedmtilden@gmail.com1-2/+19
- 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-28- implemented the fire simulation in native c++ (cFireSimulator)lapayo94@gmail.com1-0/+10
- 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 - Fixed ping displaying same for everyone, knew it was something I messed up with itr :(mtilden@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@147 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-28- Implemented Drops from Burning animalslapayo94@gmail.com1-79/+26
- 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-27Users file was pretty messed up with mixed unix and windows line endings. The ini failed to parse correctly under cygwin.faketruth1-0/+1
'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 - Added basic ping handling.mtilden@gmail.com1-4/+4
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-26Players can switch worlds on the fly with the command /gotoworld [worldName]. This uses the function cPlayer::MoveToWorld()faketruth1-0/+27
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 - Linux compatible fixes including updated makefilemtilden@gmail.com1-3/+5
- 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 - 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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@120 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-26 - Default Notchian Ping (static until ping implemented through keepalive send/receive)mtilden@gmail.com1-2/+2
- 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 - 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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@116 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
- 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-25Hold item is now dropped when inventory is closedlapayo94@gmail.com1-3/+25
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-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
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-22Fixes:lapayo94@gmail.com1-1/+1
- 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-21- Crafting fixed in 1.0.0lapayo94@gmail.com1-6/+4
- 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-11-10Can now set gamemode via lua.admin@omencraft.com1-1/+15
git-svn-id: http://mc-server.googlecode.com/svn/trunk@89 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@87 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@82 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@67 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-11-02Fixed some "Entity was not found in any chunk!" warningsfaketruth1-1/+10
Player's current world is saved in the player file. When a player joins the server, the player joins the last world he was in. It seems MCServer can finally run multiple worlds! It just needs functionality to switch between them git-svn-id: http://mc-server.googlecode.com/svn/trunk@46 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
Players are now stored in separate folder /players instead of in the world folder (!so move the folder!) Fixed a memory leak/error in cPickup.cpp Multiple worlds are stored in cRoot cClientHandle lists are taken out of cWorld and now stored in cServer Worlds now have names to distinguish them by Some functions in the Core plugin now distinguish between worlds git-svn-id: http://mc-server.googlecode.com/svn/trunk@40 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-11-01forogt to update all of cPlayer.cpp for player based gamemode.admin@omencraft.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@39 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@38 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-10-31Player data is saved and loaded as human readable JSON now.faketruth1-18/+63
cFileFormatUpdate will loop through old files and convert them to new files (should replace legacy old format loading code) cItem has two new functions to load from Json and output Json, this will keep the items in Json standard ChestEntity and FurnaceEntity use the new functions in cItem git-svn-id: http://mc-server.googlecode.com/svn/trunk@35 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-10-31Prepared some parts of the code for multi world support, I created lots of TODO'sfaketruth1-22/+21
git-svn-id: http://mc-server.googlecode.com/svn/trunk@29 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-10-26Made several recomended changes. Gamemode is now world based. Need to add it to player.admin@omencraft.com1-2/+7
git-svn-id: http://mc-server.googlecode.com/svn/trunk@18 0a769ca7-a7f5-676a-18bf-c427514a06d6
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
git-svn-id: http://mc-server.googlecode.com/svn/trunk@17 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-10-21Compiles for linuxfaketruth1-0/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@6 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-10-03MCServer c++ source filesfaketruth1-0/+713
git-svn-id: http://mc-server.googlecode.com/svn/trunk@3 0a769ca7-a7f5-676a-18bf-c427514a06d6