From e54373160b69c342dd1a625a841bda3707ba7acf Mon Sep 17 00:00:00 2001 From: "lapayo94@gmail.com" Date: Thu, 22 Dec 2011 16:30:40 +0000 Subject: Fixes: - Pickups fall through water now (Server-side they stayed in the water surface) - Suppressed some warnings (int to short etc.) - Water is now passable for cTracer git-svn-id: http://mc-server.googlecode.com/svn/trunk@96 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cTracer.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source/cTracer.cpp') diff --git a/source/cTracer.cpp b/source/cTracer.cpp index 28e5c49b5..2dce341b4 100644 --- a/source/cTracer.cpp +++ b/source/cTracer.cpp @@ -9,6 +9,8 @@ #include "cMCLogger.h" #include "cEntity.h" +#include "Defines.h" + #ifndef _WIN32 #include // abs() #endif @@ -209,7 +211,8 @@ int cTracer::Trace( const Vector3f & a_Start, const Vector3f & a_Direction, int } char BlockID = m_World->GetBlock( pos->x, pos->y, pos->z ); - if ( BlockID != E_BLOCK_AIR ) + //No collision with water ;) + if ( BlockID != E_BLOCK_AIR || IsBlockWater(BlockID)) { *BlockHitPosition = pos; int Normal = GetHitNormal(a_Start, End, *pos ); @@ -280,7 +283,7 @@ int cTracer::GetHitNormal(const Vector3f & start, const Vector3f & end, const Ve Vector3i SmallBlockPos = a_BlockPos; char BlockID = m_World->GetBlock( a_BlockPos.x, a_BlockPos.y, a_BlockPos.z ); - if( BlockID == E_BLOCK_AIR ) + if( BlockID == E_BLOCK_AIR || IsBlockWater(BlockID)) return 0; Vector3f BlockPos; -- cgit v1.2.3