Changed int parameters to vector parameters in cCuboid and simulators (#3874)
This commit is contained in:
@@ -20,26 +20,26 @@ cVaporizeFluidSimulator::cVaporizeFluidSimulator(cWorld & a_World, BLOCKTYPE a_F
|
||||
|
||||
|
||||
|
||||
void cVaporizeFluidSimulator::AddBlock(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk * a_Chunk)
|
||||
void cVaporizeFluidSimulator::AddBlock(Vector3i a_Block, cChunk * a_Chunk)
|
||||
{
|
||||
if (a_Chunk == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int RelX = a_BlockX - a_Chunk->GetPosX() * cChunkDef::Width;
|
||||
int RelZ = a_BlockZ - a_Chunk->GetPosZ() * cChunkDef::Width;
|
||||
BLOCKTYPE BlockType = a_Chunk->GetBlock(RelX, a_BlockY, RelZ);
|
||||
int RelX = a_Block.x - a_Chunk->GetPosX() * cChunkDef::Width;
|
||||
int RelZ = a_Block.z - a_Chunk->GetPosZ() * cChunkDef::Width;
|
||||
BLOCKTYPE BlockType = a_Chunk->GetBlock(RelX, a_Block.y, RelZ);
|
||||
if (
|
||||
(BlockType == m_FluidBlock) ||
|
||||
(BlockType == m_StationaryFluidBlock)
|
||||
)
|
||||
{
|
||||
a_Chunk->SetBlock(RelX, a_BlockY, RelZ, E_BLOCK_AIR, 0);
|
||||
a_Chunk->SetBlock(RelX, a_Block.y, RelZ, E_BLOCK_AIR, 0);
|
||||
a_Chunk->BroadcastSoundEffect(
|
||||
"block.fire.extinguish",
|
||||
static_cast<double>(a_BlockX),
|
||||
static_cast<double>(a_BlockY),
|
||||
static_cast<double>(a_BlockZ),
|
||||
static_cast<double>(a_Block.x),
|
||||
static_cast<double>(a_Block.y),
|
||||
static_cast<double>(a_Block.z),
|
||||
1.0f,
|
||||
0.6f
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user