summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradmin@omencraft.com <admin@omencraft.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-11-01 23:27:09 +0100
committeradmin@omencraft.com <admin@omencraft.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-11-01 23:27:09 +0100
commitbf2806dcb8ee8012fa02c6782382a1edafa3cc14 (patch)
treeb23e7e2ca87088d842435c20d1f4afcf4cb23a21
parentAccidentally removed a line of code (diff)
downloadcuberite-bf2806dcb8ee8012fa02c6782382a1edafa3cc14.tar
cuberite-bf2806dcb8ee8012fa02c6782382a1edafa3cc14.tar.gz
cuberite-bf2806dcb8ee8012fa02c6782382a1edafa3cc14.tar.bz2
cuberite-bf2806dcb8ee8012fa02c6782382a1edafa3cc14.tar.lz
cuberite-bf2806dcb8ee8012fa02c6782382a1edafa3cc14.tar.xz
cuberite-bf2806dcb8ee8012fa02c6782382a1edafa3cc14.tar.zst
cuberite-bf2806dcb8ee8012fa02c6782382a1edafa3cc14.zip
-rw-r--r--source/cChunk.cpp2
-rw-r--r--source/cClientHandle.cpp4
-rw-r--r--source/cWorld.cpp5
3 files changed, 5 insertions, 6 deletions
diff --git a/source/cChunk.cpp b/source/cChunk.cpp
index c509e23b7..430fa6fc8 100644
--- a/source/cChunk.cpp
+++ b/source/cChunk.cpp
@@ -1387,4 +1387,4 @@ void cChunk::AddTickBlockEntity( cFurnaceEntity* a_Entity )
void cChunk::RemoveTickBlockEntity( cFurnaceEntity* a_Entity )
{
m_pState->m_TickBlockEntities.remove( a_Entity );
-} \ No newline at end of file
+}
diff --git a/source/cClientHandle.cpp b/source/cClientHandle.cpp
index dda2ce2a0..76e78083c 100644
--- a/source/cClientHandle.cpp
+++ b/source/cClientHandle.cpp
@@ -965,6 +965,10 @@ void cClientHandle::Tick(float a_Dt)
// Send health
Send( cPacket_UpdateHealth( (short)m_Player->GetHealth() ) );
+
+ //quick bugfix to prevent players from spawning in ground
+ m_Player->TeleportTo( cRoot::Get()->GetWorld()->GetSpawnX(), cRoot::Get()->GetWorld()->GetSpawnY()+1, cRoot::Get()->GetWorld()->GetSpawnZ() );
+
World->UnlockEntities();
}
}
diff --git a/source/cWorld.cpp b/source/cWorld.cpp
index 3d85fc0fb..1a8425476 100644
--- a/source/cWorld.cpp
+++ b/source/cWorld.cpp
@@ -317,7 +317,6 @@ void cWorld::Tick(float a_Dt)
RemoveEntity( *m_pState->m_RemoveEntityQueue.begin() );
}
-
if( m_bAnimals && ( m_Time - m_SpawnMonsterTime > m_SpawnMonsterRate ) ) // 10 seconds
{
m_SpawnMonsterTime = m_Time;
@@ -361,7 +360,6 @@ void cWorld::Tick(float a_Dt)
else if (nightRand == 9)
Monster = new cSkeleton();
//end random percent to spawn for night
-
} else {
if (dayRand == 0) //random percent to spawn for day
Monster = new cChicken();
@@ -398,7 +396,6 @@ void cWorld::GrowTree( int a_X, int a_Y, int a_Z )
int trunk = rand() % (7 - 5 + 1) + 5;
for (int i = 0; i < trunk; i++)
{
-
if( GetBlock( a_X, a_Y + i, a_Z ) == E_BLOCK_AIR )
FastSetBlock( a_X, a_Y + i, a_Z, E_BLOCK_LOG, 0 );
}
@@ -414,7 +411,6 @@ void cWorld::GrowTree( int a_X, int a_Y, int a_Z )
for (int k = a_Z-radius; k <= a_Z + radius; k++) {
// small chance to be missing a block to add a little random
if (k != a_Z || i != a_X && (rand() % 100 + 1) > 20) {
-
if( GetBlock( i, a_Y + j, k ) == E_BLOCK_AIR )
FastSetBlock(i, a_Y+j, k, E_BLOCK_LEAVES, 0 );
}
@@ -426,7 +422,6 @@ void cWorld::GrowTree( int a_X, int a_Y, int a_Z )
}
if( GetBlock( a_X, a_Y+j, a_Z ) == E_BLOCK_AIR )
FastSetBlock( a_X, a_Y+j, a_Z, E_BLOCK_LOG, 0 );
-
}
}