- 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:
@@ -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());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user