From d73cdba1f66a92f011ac881b581595c0959139ef Mon Sep 17 00:00:00 2001 From: andrew Date: Sat, 1 Mar 2014 21:34:19 +0200 Subject: g_BlockXXX => cBlockInfo::XXX --- src/MobSpawner.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/MobSpawner.cpp') diff --git a/src/MobSpawner.cpp b/src/MobSpawner.cpp index c86268e63..7704f6cf3 100644 --- a/src/MobSpawner.cpp +++ b/src/MobSpawner.cpp @@ -145,7 +145,7 @@ bool cMobSpawner::CanSpawnHere(cChunk * a_Chunk, int a_RelX, int a_RelY, int a_R case cMonster::mtBat: { - return (a_RelY <= 63) && (BlockLight <= 4) && (SkyLight <= 4) && (TargetBlock == E_BLOCK_AIR) && (!g_BlockTransparent[BlockAbove]); + return (a_RelY <= 63) && (BlockLight <= 4) && (SkyLight <= 4) && (TargetBlock == E_BLOCK_AIR) && !cBlockInfo::IsTransparent(BlockAbove); } case cMonster::mtChicken: @@ -157,7 +157,7 @@ bool cMobSpawner::CanSpawnHere(cChunk * a_Chunk, int a_RelX, int a_RelY, int a_R return ( (TargetBlock == E_BLOCK_AIR) && (BlockAbove == E_BLOCK_AIR) && - (!g_BlockTransparent[BlockBelow]) && + (!cBlockInfo::IsTransparent(BlockBelow)) && (BlockBelow == E_BLOCK_GRASS) && (SkyLight >= 9) ); @@ -188,7 +188,7 @@ bool cMobSpawner::CanSpawnHere(cChunk * a_Chunk, int a_RelX, int a_RelY, int a_R (TargetBlock == E_BLOCK_AIR) && (BlockAbove == E_BLOCK_AIR) && (BlockTop == E_BLOCK_AIR) && - (!g_BlockTransparent[BlockBelow]) && + (!cBlockInfo::IsTransparent(BlockBelow)) && (SkyLight <= 7) && (BlockLight <= 7) ); @@ -215,7 +215,7 @@ bool cMobSpawner::CanSpawnHere(cChunk * a_Chunk, int a_RelX, int a_RelY, int a_R HaveFloor || ( a_Chunk->UnboundedRelGetBlockType(a_RelX + x, a_RelY - 1, a_RelZ + z, TargetBlock) && - !g_BlockTransparent[TargetBlock] + !cBlockInfo::IsTransparent(TargetBlock) ) ); } @@ -230,7 +230,7 @@ bool cMobSpawner::CanSpawnHere(cChunk * a_Chunk, int a_RelX, int a_RelY, int a_R return ( (TargetBlock == E_BLOCK_AIR) && (BlockAbove == E_BLOCK_AIR) && - (!g_BlockTransparent[BlockBelow]) && + (!cBlockInfo::IsTransparent(BlockBelow)) && (SkyLight <= 7) && (BlockLight <= 7) && (m_Random.NextInt(2, a_Biome) == 0) @@ -242,7 +242,7 @@ bool cMobSpawner::CanSpawnHere(cChunk * a_Chunk, int a_RelX, int a_RelY, int a_R return ( (TargetBlock == E_BLOCK_AIR) && (BlockAbove == E_BLOCK_AIR) && - (!g_BlockTransparent[BlockBelow]) && + (!cBlockInfo::IsTransparent(BlockBelow)) && ( (a_RelY <= 40) || (a_Biome == biSwampland) ) @@ -255,7 +255,7 @@ bool cMobSpawner::CanSpawnHere(cChunk * a_Chunk, int a_RelX, int a_RelY, int a_R return ( (TargetBlock == E_BLOCK_AIR) && (BlockAbove == E_BLOCK_AIR) && - (!g_BlockTransparent[BlockBelow]) && + (!cBlockInfo::IsTransparent(BlockBelow)) && (m_Random.NextInt(20, a_Biome) == 0) ); } -- cgit v1.2.3