1
0

Merge pull request #1465 from Masy98/blocks

Added barriers correctly
This commit is contained in:
Mattes D 2014-09-27 22:01:55 +02:00
commit a3b140cb44
2 changed files with 12 additions and 3 deletions

View File

@ -1888,6 +1888,7 @@ void cChunkMap::DoExplosionAt(double a_ExplosionSize, double a_BlockX, double a_
case E_BLOCK_OBSIDIAN:
case E_BLOCK_BEACON:
case E_BLOCK_BEDROCK:
case E_BLOCK_BARRIER:
case E_BLOCK_WATER:
case E_BLOCK_LAVA:
{

View File

@ -1148,10 +1148,18 @@ void cClientHandle::HandleBlockDigFinished(int a_BlockX, int a_BlockY, int a_Blo
FinishDigAnimation();
if (!m_Player->IsGameModeCreative() && (a_OldBlock == E_BLOCK_BEDROCK))
if (!m_Player->IsGameModeCreative())
{
Kick("You can't break a bedrock!");
return;
if (a_OldBlock == E_BLOCK_BEDROCK)
{
Kick("You can't break a bedrock!");
return;
}
if (a_OldBlock == E_BLOCK_BARRIER)
{
Kick("You can't break a barrier!");
return;
}
}
cWorld * World = m_Player->GetWorld();