1
0

Fixed a few warnings

git-svn-id: http://mc-server.googlecode.com/svn/trunk@799 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com 2012-08-28 21:58:33 +00:00
parent 4abaf24131
commit 0425d8c8a5
3 changed files with 4 additions and 6 deletions

View File

@ -261,10 +261,10 @@ void cBlockHandler::DropBlock(cWorld *a_World, int a_X, int a_Y, int a_Z)
cItems Drops; cItems Drops;
NIBBLETYPE Meta = a_World->GetBlockMeta(a_X, a_Y, a_Z); NIBBLETYPE Meta = a_World->GetBlockMeta(a_X, a_Y, a_Z);
char DropCount = GetDropCount(); char DropCount = GetDropCount();
int DropItem = GetDropID(); short DropItem = (short)GetDropID();
if(DropCount > 0 && DropItem != E_ITEM_EMPTY) if (DropCount > 0 && (DropItem != E_ITEM_EMPTY))
{ {
Drops.push_back(cItem((ENUM_ITEM_ID)DropItem, DropCount, GetDropMeta(Meta))); Drops.push_back(cItem(DropItem, DropCount, GetDropMeta(Meta)));
a_World->SpawnItemPickups(Drops, a_X, a_Y, a_Z); a_World->SpawnItemPickups(Drops, a_X, a_Y, a_Z);
} }
} }

View File

@ -31,8 +31,6 @@ public:
MTRand rand; MTRand rand;
NIBBLETYPE Meta = a_World->GetBlockMeta(a_X, a_Y, a_Z); NIBBLETYPE Meta = a_World->GetBlockMeta(a_X, a_Y, a_Z);
ENUM_ITEM_ID Drop = E_ITEM_EMPTY;
cItems Drops; cItems Drops;
if(Meta & 0x7) //Is Wheat if(Meta & 0x7) //Is Wheat

View File

@ -12,7 +12,7 @@
#define PROCESS_NEIGHBOR(x,y,z) \ #define PROCESS_NEIGHBOR(x,y,z) \
switch (a_Area.GetBlockType(x, y, z)) \ switch (a_Area.GetBlockType(x, y, z)) \
{ \ { \
case E_BLOCK_LEAVES: a_Area.SetBlockType(x, y, z, E_BLOCK_SPONGE + i + 1); break; \ case E_BLOCK_LEAVES: a_Area.SetBlockType(x, y, z, (BLOCKTYPE)(E_BLOCK_SPONGE + i + 1)); break; \
case E_BLOCK_LOG: return true; \ case E_BLOCK_LOG: return true; \
} }