1
0

- implemented the fire simulation in native c++ (cFireSimulator)

- 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
This commit is contained in:
lapayo94@gmail.com
2011-12-28 21:00:35 +00:00
parent 143b8499e0
commit c6b4ee8c9f
14 changed files with 303 additions and 97 deletions

View File

@@ -830,4 +830,14 @@ const cPlayer::GroupList & cPlayer::GetGroups()
const char* cPlayer::GetLoadedWorldName()
{
return m_pState->LoadedWorldName.c_str();
}
void cPlayer::UseEquippedItem()
{
if(GetGameMode() != 1) //No damage in creative
if (GetInventory().GetEquippedItem().DamageItem())
{
LOG("Player %s Broke ID: %i", GetClientHandle()->GetUsername(), GetInventory().GetEquippedItem().m_ItemID);
GetInventory().RemoveItem( GetInventory().GetEquippedItem());
}
}