Index: source/blocks.cpp =================================================================== --- source/blocks.cpp (revision 394) +++ source/blocks.cpp (working copy) @@ -8,7 +8,7 @@ #include "mining.h" #include #include -#define sizeOfArray(x) (sizeof(x)/4) +#define sizeOfArray(x) (sizeof(x)/sizeof(x[0])) int walkThroughBlocks[]={AIR,YELLOW_FLOWER,RED_FLOWER,SNOW_TOP,TORCH,LADDER,SHRUB,TALL_GRASS,MUSHROOM_BROWN,MUSHROOM_RED}; int renderBright[]={AIR,LOG,OAK_WOOD,BIRCH_WOOD,LEAF,YELLOW_FLOWER,RED_FLOWER,CACTUS,TORCH,REDWOOD_LEAF,GLASS,SHRUB,TALL_GRASS,MUSHROOM_RED,MUSHROOM_BROWN}; @@ -71,7 +71,7 @@ { int i; bool isWalkThrough=false; - for(i=0;(unsigned)i<=sizeOfArray(walkThroughBlocks);i++) + for(i=0;(unsigned)iCamX>-16 && x-world->CamX<256+16 && y-world->CamY>-32 && y-world->CamY<256) - if (animation==0) showGraphic(&MplayerMobGraphic[0],x-world->CamX - (facing ? 10:0),y-world->CamY,facing ? true:false); + { + if (animation==0) showGraphic(&MplayerMobGraphic[0],x-world->CamX - (facing ? 10:0),y-world->CamY,facing ? true:false); + } else if (animation==1) showGraphic(&MplayerMobGraphic[1],x-world->CamX - (facing ? 10:0),y-world->CamY,facing ? true:false); } void MplayerMob::sendWifiUpdate() Index: source/nifi.cpp =================================================================== --- source/nifi.cpp (revision 394) +++ source/nifi.cpp (working copy) @@ -244,7 +244,7 @@ { int test_id; int a, b, c, d, e, f; - sscanf(packet, "%*s %d %d %d %d %d %d %d %d", &test_id, &a, &b, &c, &d, &e, &f); + sscanf(packet, "%*s %d %d %d %d %d %d %d", &test_id, &a, &b, &c, &d, &e, &f); if (test_id == server_id) recievedMobUpdate(b, c, d, e, a, f); printmessage = false; } Index: source/worldRender.cpp =================================================================== --- source/worldRender.cpp (revision 394) +++ source/worldRender.cpp (working copy) @@ -14,7 +14,7 @@ #include "blocks.h" #include "graphics/graphics.h" #include -#define sizeOfArray(x) (sizeof(x)/4) +#define sizeOfArray(x) (sizeof(x)/sizeof(x[0])) //int execptions[]={AIR}; int sunlight; int xMin, xMax, yMin, yMax;