summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemLilypad.h
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-05-10 14:05:44 +0200
committerTycho <work.tycho+git@gmail.com>2014-05-10 14:05:44 +0200
commitd478e3cfb19c0347ba0b5513d3250af9d69443de (patch)
treeaaba81bda1ee2e53e5e4d9fdad0c2998ba8edb0f /src/Items/ItemLilypad.h
parentMaybe coverage working? (diff)
parentMerge pull request #992 from mc-server/coverity_fixes (diff)
downloadcuberite-d478e3cfb19c0347ba0b5513d3250af9d69443de.tar
cuberite-d478e3cfb19c0347ba0b5513d3250af9d69443de.tar.gz
cuberite-d478e3cfb19c0347ba0b5513d3250af9d69443de.tar.bz2
cuberite-d478e3cfb19c0347ba0b5513d3250af9d69443de.tar.lz
cuberite-d478e3cfb19c0347ba0b5513d3250af9d69443de.tar.xz
cuberite-d478e3cfb19c0347ba0b5513d3250af9d69443de.tar.zst
cuberite-d478e3cfb19c0347ba0b5513d3250af9d69443de.zip
Diffstat (limited to 'src/Items/ItemLilypad.h')
-rw-r--r--src/Items/ItemLilypad.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/Items/ItemLilypad.h b/src/Items/ItemLilypad.h
index 8fc1d8543..bc650cdbd 100644
--- a/src/Items/ItemLilypad.h
+++ b/src/Items/ItemLilypad.h
@@ -47,9 +47,9 @@ public:
public cBlockTracer::cCallbacks
{
public:
- cCallbacks(cWorld * a_CBWorld) :
- m_HasHitFluid(false),
- m_World(a_CBWorld)
+
+ cCallbacks(void) :
+ m_HasHitFluid(false)
{
}
@@ -62,10 +62,9 @@ public:
return false;
}
AddFaceDirection(a_CBBlockX, a_CBBlockY, a_CBBlockZ, BLOCK_FACE_YP); // Always place pad at top of water block
- BLOCKTYPE Block = m_World->GetBlock(a_CBBlockX, a_CBBlockY, a_CBBlockZ);
if (
- !IsBlockWater(Block) &&
- cBlockInfo::FullyOccupiesVoxel(Block)
+ !IsBlockWater(a_CBBlockType) &&
+ cBlockInfo::FullyOccupiesVoxel(a_CBBlockType)
)
{
// Can't place lilypad on air/in another block!
@@ -80,11 +79,10 @@ public:
Vector3i m_Pos;
bool m_HasHitFluid;
- cWorld * m_World;
};
- cCallbacks Callbacks(a_World);
+ cCallbacks Callbacks;
cLineBlockTracer Tracer(*a_Player->GetWorld(), Callbacks);
Vector3d Start(a_Player->GetEyePosition() + a_Player->GetLookVector());
Vector3d End(a_Player->GetEyePosition() + a_Player->GetLookVector() * 5);