1
0

- Added the "wait" music disc

- Vines can now be placed on leaves

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1045 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
luksor111@gmail.com 2012-11-15 18:57:47 +00:00
parent 635386faad
commit ea8545dff1
6 changed files with 15 additions and 12 deletions

View File

@ -452,7 +452,8 @@ enum ENUM_ITEM_ID
E_ITEM_STAL_DISC = 2263,
E_ITEM_STRAD_DISC = 2264,
E_ITEM_WARD_DISC = 2265,
E_ITEM_11_DISC = 2266
E_ITEM_11_DISC = 2266,
E_ITEM_WAIT_DISC = 2267
};

View File

@ -35,10 +35,12 @@ public:
return true;
}
if (g_BlockIsSolid[a_World->GetBlock( a_BlockX, a_BlockY + 1, a_BlockZ )])
BLOCKTYPE TopBlock = a_World->GetBlock( a_BlockX, a_BlockY + 1, a_BlockZ);
if (g_BlockIsSolid[TopBlock] || TopBlock==E_BLOCK_LEAVES)
{
AddDirection( a_BlockX, a_BlockY, a_BlockZ, a_Dir, true );
if (g_BlockIsSolid[a_World->GetBlock( a_BlockX, a_BlockY, a_BlockZ )]==false)
BLOCKTYPE BaseBlock = a_World->GetBlock( a_BlockX, a_BlockY, a_BlockZ);
if (g_BlockIsSolid[BaseBlock] == false && BaseBlock!=E_BLOCK_LEAVES)
{
AddDirection( a_BlockX, a_BlockY, a_BlockZ, a_Dir, false );
a_World->SetBlock( a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_VINES, 0);
@ -47,8 +49,8 @@ public:
}
AddDirection( a_BlockX, a_BlockY, a_BlockZ, a_Dir, true );
return g_BlockIsSolid[a_World->GetBlock( a_BlockX, a_BlockY, a_BlockZ)];
BLOCKTYPE BaseBlock = a_World->GetBlock( a_BlockX, a_BlockY, a_BlockZ);
return g_BlockIsSolid[BaseBlock] || BaseBlock==E_BLOCK_LEAVES;
}

View File

@ -67,7 +67,7 @@ inline bool IsValidBlock( int a_BlockType ) //tolua_export
inline bool IsValidItem( int a_ItemID ) //tolua_export
{ //tolua_export
if( (a_ItemID >= 256 && a_ItemID <= 388)
|| (a_ItemID >= 2256 && a_ItemID <= 2266) )
|| (a_ItemID >= 2256 && a_ItemID <= 2267) )
{
return true;
}

View File

@ -36,7 +36,7 @@
bool cItemHandler::m_HandlerInitialized = false;
cItemHandler * cItemHandler::m_ItemHandler[2266];
cItemHandler * cItemHandler::m_ItemHandler[2268];
@ -177,7 +177,7 @@ cItemHandler *cItemHandler::CreateItemHandler(int a_ItemType)
void cItemHandler::Deinit()
{
for(int i = 0; i < 2266; i++)
for(int i = 0; i < 2267; i++)
{
delete m_ItemHandler[i];
}

View File

@ -75,7 +75,7 @@ protected:
int m_ItemType;
static cItemHandler *CreateItemHandler(int m_ItemType);
static cItemHandler *m_ItemHandler[2266];
static cItemHandler *m_ItemHandler[2268];
static bool m_HandlerInitialized; //used to detect if the itemhandlers are initialized
};

View File

@ -21,7 +21,7 @@ cJukeboxEntity::cJukeboxEntity(int a_BlockX, int a_BlockY, int a_BlockZ, cWorld
cJukeboxEntity::~cJukeboxEntity()
{
if (m_Record >= 2256 && m_Record <= 2266)
if (m_Record >= 2256 && m_Record <= 2267)
{
EjectRecord();
m_Record = 0;
@ -37,14 +37,14 @@ void cJukeboxEntity::UsedBy( cPlayer * a_Player )
if (m_Record == 0)
{
const cItem & HeldItem = a_Player->GetEquippedItem();
if (HeldItem.m_ItemType >= 2256 && HeldItem.m_ItemType <= 2266)
if (HeldItem.m_ItemType >= 2256 && HeldItem.m_ItemType <= 2267)
{
m_Record = HeldItem.m_ItemType;
a_Player->UseEquippedItem();
PlayRecord();
}
}
else if (m_Record >= 2256 && m_Record <= 2266)
else if (m_Record >= 2256 && m_Record <= 2267)
{
EjectRecord();
m_Record = 0;