From 0040a88b9b40817c04e54259fcb61e31dc4f4213 Mon Sep 17 00:00:00 2001 From: STRWarrior Date: Sat, 15 Feb 2014 19:51:05 +0100 Subject: If a player is called "Notch" he drops an apple. http://minecraft.gamepedia.com/Notch --- src/Entities/Player.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp index 286d43cf6..cf5a8edfe 100644 --- a/src/Entities/Player.cpp +++ b/src/Entities/Player.cpp @@ -839,6 +839,12 @@ void cPlayer::KilledBy(cEntity * a_Killer) cItems Pickups; m_Inventory.CopyToItems(Pickups); m_Inventory.Clear(); + + if (GetName() == "Notch") + { + Pickups.Add(cItem(E_ITEM_RED_APPLE)); + } + m_World->SpawnItemPickups(Pickups, GetPosX(), GetPosY(), GetPosZ(), 10); SaveToDisk(); // Save it, yeah the world is a tough place ! -- cgit v1.2.3