diff options
author | Alexander Harkness <me@bearbin.net> | 2024-11-02 22:27:47 +0100 |
---|---|---|
committer | Alexander Harkness <me@bearbin.net> | 2024-11-02 22:27:47 +0100 |
commit | cb50ec10591c0e0e4b9915e642bc50d3d8d1fd0a (patch) | |
tree | f647b20e1823f1846af88e832cf82a4a02e96e69 /src/Blocks/BlockDoor.cpp | |
parent | Improve clang-format config file, remove automatically enforced code style from contrib guide. (diff) | |
download | cuberite-clang-format-codebase.tar cuberite-clang-format-codebase.tar.gz cuberite-clang-format-codebase.tar.bz2 cuberite-clang-format-codebase.tar.lz cuberite-clang-format-codebase.tar.xz cuberite-clang-format-codebase.tar.zst cuberite-clang-format-codebase.zip |
Diffstat (limited to 'src/Blocks/BlockDoor.cpp')
-rw-r--r-- | src/Blocks/BlockDoor.cpp | 41 |
1 files changed, 26 insertions, 15 deletions
diff --git a/src/Blocks/BlockDoor.cpp b/src/Blocks/BlockDoor.cpp index d97bd9696..c980a74c6 100644 --- a/src/Blocks/BlockDoor.cpp +++ b/src/Blocks/BlockDoor.cpp @@ -8,10 +8,12 @@ void cBlockDoorHandler::OnBroken( - cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, - Vector3i a_BlockPos, BLOCKTYPE a_OldBlockType, - NIBBLETYPE a_OldBlockMeta, - const cEntity * a_Digger + cChunkInterface & a_ChunkInterface, + cWorldInterface & a_WorldInterface, + Vector3i a_BlockPos, + BLOCKTYPE a_OldBlockType, + NIBBLETYPE a_OldBlockMeta, + const cEntity * a_Digger ) const { UNUSED(a_Digger); @@ -69,7 +71,12 @@ bool cBlockDoorHandler::OnUse( case E_BLOCK_OAK_DOOR: { ChangeDoor(a_ChunkInterface, a_BlockPos); - a_Player.GetWorld()->BroadcastSoundParticleEffect(EffectID::SFX_RANDOM_WOODEN_DOOR_OPEN, a_BlockPos, 0, a_Player.GetClientHandle()); + a_Player.GetWorld()->BroadcastSoundParticleEffect( + EffectID::SFX_RANDOM_WOODEN_DOOR_OPEN, + a_BlockPos, + 0, + a_Player.GetClientHandle() + ); break; } case E_BLOCK_IRON_DOOR: @@ -119,7 +126,14 @@ void cBlockDoorHandler::OnCancelRightClick( -cBoundingBox cBlockDoorHandler::GetPlacementCollisionBox(BLOCKTYPE a_XM, BLOCKTYPE a_XP, BLOCKTYPE a_YM, BLOCKTYPE a_YP, BLOCKTYPE a_ZM, BLOCKTYPE a_ZP) const +cBoundingBox cBlockDoorHandler::GetPlacementCollisionBox( + BLOCKTYPE a_XM, + BLOCKTYPE a_XP, + BLOCKTYPE a_YM, + BLOCKTYPE a_YP, + BLOCKTYPE a_ZM, + BLOCKTYPE a_ZP +) const { // Doors can be placed inside the player return cBoundingBox(0, 0, 0, 0, 0, 0); @@ -173,9 +187,9 @@ NIBBLETYPE cBlockDoorHandler::MetaMirrorXY(NIBBLETYPE a_Meta) const */ // Note: Currently, you can not properly mirror the hinges on a double door. The orientation of the door is stored - // in only the bottom tile while the hinge position is in the top tile. This function only operates on one tile at a time, - // so the function can only see either the hinge position or orientation, but not both, at any given time. The class itself - // needs extra datamembers. + // in only the bottom tile while the hinge position is in the top tile. This function only operates on one tile at + // a time, so the function can only see either the hinge position or orientation, but not both, at any given time. + // The class itself needs extra datamembers. if (a_Meta & 0x08) { return a_Meta; @@ -205,9 +219,9 @@ NIBBLETYPE cBlockDoorHandler::MetaMirrorYZ(NIBBLETYPE a_Meta) const // Return a_Meta if panel is a top panel (0x08 bit is set to 1) // Note: Currently, you can not properly mirror the hinges on a double door. The orientation of the door is stored - // in only the bottom tile while the hinge position is in the top tile. This function only operates on one tile at a time, - // so the function can only see either the hinge position or orientation, but not both, at any given time.The class itself - // needs extra datamembers. + // in only the bottom tile while the hinge position is in the top tile. This function only operates on one tile at + // a time, so the function can only see either the hinge position or orientation, but not both, at any given + // time.The class itself needs extra datamembers. if (a_Meta & 0x08) { @@ -227,6 +241,3 @@ NIBBLETYPE cBlockDoorHandler::MetaMirrorYZ(NIBBLETYPE a_Meta) const // Not Facing North or South; No change. return a_Meta; } - - - |