Tasks that are Easy Enough for newcoming programmers
#22
(10-23-2012, 04:07 AM)xoft Wrote: In BlockID.h / .cpp, there are various arrays that can be used to determine whether a block has a specific property; I think nonsolidness is one of them. This might help you alleviate the bug.

Code:
NIBBLETYPE g_BlockLightValue[256];
NIBBLETYPE g_BlockSpreadLightFalloff[256];
bool       g_BlockTransparent[256];
bool       g_BlockOneHitDig[256];
bool       g_BlockPistonBreakable[256];
bool       g_BlockIsSnowable[256];
bool       g_BlockRequiresSpecialTool[256];

none of these arrays can determine nonsolidness Undecided
I think I should make something like:
bool g_BlockIsSolid[256];
and
bool cBlockHandle::CanBePlacedOnNonSolid();
Solid block is a full, nontransparent block.

This should be very userful for blocks like redstone, ladders, etc.
What are you think about it?

(10-23-2012, 04:07 AM)xoft Wrote: Also, I'm not sure but I think your code might have problems with Y == 255. Didn't test it; just by looking I see an addition to a Y-coord without a proper check for range.

Funcion cChunk::GetBlock(int,int,int) uses cliping on arguments.
Reply
Thanks given by:


Messages In This Thread
RE: Tasks that are Easy Enough for newcoming programmers - by funmaker - 10-23-2012, 05:13 AM



Users browsing this thread: 15 Guest(s)