Skip to content

Commit

Permalink
Buckets: Be able to place fluids through other fluids. (cuberite#4331)
Browse files Browse the repository at this point in the history
  • Loading branch information
earboxer authored and peterbell10 committed May 7, 2019
1 parent 8b4d377 commit b9e7505
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Bindings/LuaServerHandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ cTCPLink::cCallbacksPtr cLuaServerHandle::OnIncomingConnection(const AString & a
cCSLock Lock(m_CSConnections);
m_Connections.push_back(res);

return res;
return std::move(res);
}


Expand Down
4 changes: 2 additions & 2 deletions src/Items/ItemBucket.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,12 @@ class cItemBucketHandler :

virtual bool OnNextBlock(int a_CBBlockX, int a_CBBlockY, int a_CBBlockZ, BLOCKTYPE a_CBBlockType, NIBBLETYPE a_CBBlockMeta, eBlockFace a_CBEntryFace) override
{
if (a_CBBlockType != E_BLOCK_AIR)
if ((a_CBBlockType != E_BLOCK_AIR) && !IsBlockLiquid(a_CBBlockType))
{
m_ReplacedBlockType = a_CBBlockType;
m_ReplacedBlockMeta = a_CBBlockMeta;
m_EntryFace = static_cast<eBlockFace>(a_CBEntryFace);
if (!cFluidSimulator::CanWashAway(a_CBBlockType) && !IsBlockLiquid(a_CBBlockType))
if (!cFluidSimulator::CanWashAway(a_CBBlockType))
{
AddFaceDirection(a_CBBlockX, a_CBBlockY, a_CBBlockZ, a_CBEntryFace); // Was an unwashawayable block, can't overwrite it!
}
Expand Down
2 changes: 1 addition & 1 deletion src/Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ cTCPLink::cCallbacksPtr cServer::OnConnectionAccepted(const AString & a_RemoteIP
NewHandle->SetSelf(NewHandle);
cCSLock Lock(m_CSClients);
m_Clients.push_back(NewHandle);
return NewHandle;
return std::move(NewHandle);
}


Expand Down

0 comments on commit b9e7505

Please sign in to comment.