|
@@ -26,7 +26,7 @@ bool Block::updateVisibility()
|
|
|
for( int d = 0; d < 6; d++ )
|
|
|
{
|
|
|
if( IS_BLOCK( zNeighbours[ d ] ) )
|
|
|
- v |= zNeighbours[ d ]->isVisible() && ( zNeighbours[ d ]->transparent || zNeighbours[ d ]->passable );
|
|
|
+ v |= zNeighbours[ d ]->isVisible() && (zNeighbours[ d ]->transparent || zNeighbours[ d ]->passable);
|
|
|
else if( zNeighbours[ d ] )
|
|
|
v = 1;
|
|
|
}
|
|
@@ -41,7 +41,7 @@ bool Block::updateVisibility()
|
|
|
|
|
|
void Block::setNeighbour( Direction dir, Block *zN )
|
|
|
{
|
|
|
- zNeighbours[ dir ] = zN;
|
|
|
+ zNeighbours[ getDirectionIndex( dir ) ] = zN;
|
|
|
}
|
|
|
|
|
|
bool Block::isVisible() const
|
|
@@ -71,7 +71,7 @@ BasicBlockItemType::BasicBlockItemType( int id )
|
|
|
void BasicBlockItemType::loadSuperItem( Item *zItem, Framework::StreamReader *zReader ) const
|
|
|
{
|
|
|
ItemType::loadSuperItem( zItem, zReader );
|
|
|
- BasicBlockItem *item = dynamic_cast<BasicBlockItem *>( zItem );
|
|
|
+ BasicBlockItem *item = dynamic_cast<BasicBlockItem *>(zItem);
|
|
|
if( !item )
|
|
|
throw "BasicBlockItemType::loadSuperItem was called with an invalid item";
|
|
|
zReader->lese( (char *)&item->transparent, 1 );
|