1
0

More trailing whitespace fixes.

This commit is contained in:
madmaxoft 2014-07-17 22:59:02 +02:00
parent 488ecb6912
commit d0cc9aedb3
13 changed files with 25 additions and 25 deletions

View File

@ -12,17 +12,17 @@
class cBlockLadderHandler : class cBlockLadderHandler :
public cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x07, 0x02, 0x05, 0x03, 0x04> > public cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x07, 0x02, 0x05, 0x03, 0x04> >
{ {
typedef cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x07, 0x02, 0x05, 0x03, 0x04> > super; typedef cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x07, 0x02, 0x05, 0x03, 0x04> > super;
public: public:
cBlockLadderHandler(BLOCKTYPE a_BlockType) cBlockLadderHandler(BLOCKTYPE a_BlockType)
: super(a_BlockType) : super(a_BlockType)
{ {
} }
virtual bool GetPlacementBlockTypeMeta( virtual bool GetPlacementBlockTypeMeta(
cChunkInterface & a_ChunkInterface, cPlayer * a_Player, cChunkInterface & a_ChunkInterface, cPlayer * a_Player,
int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace,
int a_CursorX, int a_CursorY, int a_CursorZ, int a_CursorX, int a_CursorY, int a_CursorZ,
BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta
) override ) override

View File

@ -640,7 +640,7 @@ void cEntity::HandlePhysics(float a_Dt, cChunk & a_Chunk)
if ((BlockY >= cChunkDef::Height) || (BlockY < 0)) if ((BlockY >= cChunkDef::Height) || (BlockY < 0))
{ {
// Outside of the world // Outside of the world
AddSpeedY(m_Gravity * a_Dt); AddSpeedY(m_Gravity * a_Dt);
AddPosition(GetSpeed() * a_Dt); AddPosition(GetSpeed() * a_Dt);
return; return;
@ -858,7 +858,7 @@ void cEntity::TickBurning(cChunk & a_Chunk)
if (POSY_TOINT > m_World->GetHeight(POSX_TOINT, POSZ_TOINT)) if (POSY_TOINT > m_World->GetHeight(POSX_TOINT, POSZ_TOINT))
{ {
m_TicksLeftBurning = 0; m_TicksLeftBurning = 0;
} }
} }
// Do the burning damage: // Do the burning damage:

View File

@ -493,7 +493,7 @@ void cMinecart::HandlePoweredRailPhysics(NIBBLETYPE a_RailMeta)
SetSpeedY(-GetSpeedX()); SetSpeedY(-GetSpeedX());
} }
break; break;
} }
case E_META_RAIL_ASCEND_XP: // ASCEND WEST case E_META_RAIL_ASCEND_XP: // ASCEND WEST
{ {
SetYaw(180); SetYaw(180);
@ -513,7 +513,7 @@ void cMinecart::HandlePoweredRailPhysics(NIBBLETYPE a_RailMeta)
} }
} }
break; break;
} }
case E_META_RAIL_ASCEND_ZM: // ASCEND NORTH case E_META_RAIL_ASCEND_ZM: // ASCEND NORTH
{ {
SetYaw(270); SetYaw(270);
@ -787,7 +787,7 @@ bool cMinecart::TestBlockCollision(NIBBLETYPE a_RailMeta)
} }
} }
break; break;
} }
case E_META_RAIL_CURVED_ZM_XM: case E_META_RAIL_CURVED_ZM_XM:
case E_META_RAIL_CURVED_ZM_XP: case E_META_RAIL_CURVED_ZM_XP:
case E_META_RAIL_CURVED_ZP_XM: case E_META_RAIL_CURVED_ZP_XM:
@ -883,7 +883,7 @@ bool cMinecart::TestEntityCollision(NIBBLETYPE a_RailMeta)
} }
} }
return true; return true;
} }
case E_META_RAIL_CURVED_ZM_XM: case E_META_RAIL_CURVED_ZM_XM:
case E_META_RAIL_CURVED_ZM_XP: case E_META_RAIL_CURVED_ZM_XP:
case E_META_RAIL_CURVED_ZP_XM: case E_META_RAIL_CURVED_ZP_XM:

View File

@ -143,7 +143,7 @@ void cPickup::Tick(float a_Dt, cChunk & a_Chunk)
m_bCollected = true; m_bCollected = true;
m_Timer = 0; // We have to reset the timer. m_Timer = 0; // We have to reset the timer.
m_Timer += a_Dt; // In case we have to destroy the pickup in the same tick. m_Timer += a_Dt; // In case we have to destroy the pickup in the same tick.
if (m_Timer > 500.f) if (m_Timer > 500.f)
{ {
Destroy(true); Destroy(true);
return; return;

View File

@ -497,7 +497,7 @@ void cPlayer::SetTouchGround(bool a_bTouchGround)
// Fall particles // Fall particles
GetWorld()->BroadcastSoundParticleEffect(2006, POSX_TOINT, (int)GetPosY() - 1, POSZ_TOINT, Damage /* Used as particle effect speed modifier */); GetWorld()->BroadcastSoundParticleEffect(2006, POSX_TOINT, (int)GetPosY() - 1, POSZ_TOINT, Damage /* Used as particle effect speed modifier */);
} }
m_LastGroundHeight = (float)GetPosY(); m_LastGroundHeight = (float)GetPosY();
} }

View File

@ -94,7 +94,7 @@ public:
bool PlaceFluid(cWorld * a_World, cPlayer * a_Player, const cItem & a_Item, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, BLOCKTYPE a_FluidBlock) bool PlaceFluid(cWorld * a_World, cPlayer * a_Player, const cItem & a_Item, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, BLOCKTYPE a_FluidBlock)
{ {
if (a_BlockFace != BLOCK_FACE_NONE) if (a_BlockFace != BLOCK_FACE_NONE)
{ {
return false; return false;
@ -209,14 +209,14 @@ public:
} }
m_Pos.Set(a_BlockX, a_BlockY, a_BlockZ); // (Block could be washed away, replace it) m_Pos.Set(a_BlockX, a_BlockY, a_BlockZ); // (Block could be washed away, replace it)
return true; // Abort tracing return true; // Abort tracing
} }
return false; return false;
} }
} Callbacks; } Callbacks;
cLineBlockTracer Tracer(*a_World, Callbacks); cLineBlockTracer Tracer(*a_World, Callbacks);
Vector3d Start(a_Player->GetEyePosition()); Vector3d Start(a_Player->GetEyePosition());
Vector3d End(a_Player->GetEyePosition() + a_Player->GetLookVector() * 5); Vector3d End(a_Player->GetEyePosition() + a_Player->GetLookVector() * 5);
// cTracer::Trace returns true when whole line was traversed. By returning true when we hit something, we ensure that this never happens if liquid could be placed // cTracer::Trace returns true when whole line was traversed. By returning true when we hit something, we ensure that this never happens if liquid could be placed
// Use this to judge whether the position is valid // Use this to judge whether the position is valid
@ -227,6 +227,6 @@ public:
return true; return true;
} }
return false; return false;
} }
}; };

View File

@ -91,7 +91,7 @@ public:
/** Can the anvil repair this item, when a_Item is the second input? */ /** Can the anvil repair this item, when a_Item is the second input? */
virtual bool CanRepairWithRawMaterial(short a_ItemType); virtual bool CanRepairWithRawMaterial(short a_ItemType);
/** Called before a block is placed into a world. /** Called before a block is placed into a world.
The handler should return true to allow placement, false to refuse. The handler should return true to allow placement, false to refuse.
Also, the handler should set a_BlockType and a_BlockMeta to correct values for the newly placed block. Also, the handler should set a_BlockType and a_BlockMeta to correct values for the newly placed block.
*/ */

View File

@ -40,7 +40,7 @@ public:
case E_ITEM_CARROT: return FoodInfo(4, 4.8); case E_ITEM_CARROT: return FoodInfo(4, 4.8);
case E_ITEM_POTATO: return FoodInfo(1, 0.6); case E_ITEM_POTATO: return FoodInfo(1, 0.6);
default: return FoodInfo(0, 0); default: return FoodInfo(0, 0);
} }
} }
virtual bool GetPlacementBlockTypeMeta( virtual bool GetPlacementBlockTypeMeta(

View File

@ -37,7 +37,7 @@ void cCreeper::Tick(float a_Dt, cChunk & a_Chunk)
{ {
if (m_bIsBlowing) if (m_bIsBlowing)
{ {
m_ExplodingTimer += 1; m_ExplodingTimer += 1;
} }
if (m_ExplodingTimer == 30) if (m_ExplodingTimer == 30)

View File

@ -63,7 +63,7 @@ void cHorse::Tick(float a_Dt, cChunk & a_Chunk)
m_Attachee->Detach(); m_Attachee->Detach();
m_bIsRearing = true; m_bIsRearing = true;
} }
} }
else else
{ {
m_bIsTame = true; m_bIsTame = true;

View File

@ -281,7 +281,7 @@ void cIncrementalRedstoneSimulator::SimulateChunk(float a_Dt, int a_ChunkX, int
if (ShouldUpdateSimulateOnceBlocks) if (ShouldUpdateSimulateOnceBlocks)
{ {
switch (dataitr->Data) switch (dataitr->Data)
{ {
case E_BLOCK_REDSTONE_WIRE: HandleRedstoneWire(dataitr->x, dataitr->y, dataitr->z); break; case E_BLOCK_REDSTONE_WIRE: HandleRedstoneWire(dataitr->x, dataitr->y, dataitr->z); break;
case E_BLOCK_COMMAND_BLOCK: HandleCommandBlock(dataitr->x, dataitr->y, dataitr->z); break; case E_BLOCK_COMMAND_BLOCK: HandleCommandBlock(dataitr->x, dataitr->y, dataitr->z); break;
case E_BLOCK_NOTE_BLOCK: HandleNoteBlock(dataitr->x, dataitr->y, dataitr->z); break; case E_BLOCK_NOTE_BLOCK: HandleNoteBlock(dataitr->x, dataitr->y, dataitr->z); break;
@ -392,7 +392,7 @@ void cIncrementalRedstoneSimulator::HandleRedstoneTorch(int a_RelBlockX, int a_R
if (a_MyState == E_BLOCK_REDSTONE_TORCH_ON) if (a_MyState == E_BLOCK_REDSTONE_TORCH_ON)
{ {
// Check if the block the torch is on is powered // Check if the block the torch is on is powered
int X = a_RelBlockX; int Y = a_RelBlockY; int Z = a_RelBlockZ; int X = a_RelBlockX; int Y = a_RelBlockY; int Z = a_RelBlockZ;
AddFaceDirection(X, Y, Z, cBlockTorchHandler::MetaDataToDirection(m_Chunk->GetMeta(a_RelBlockX, a_RelBlockY, a_RelBlockZ)), true); // Inverse true to get the block torch is on AddFaceDirection(X, Y, Z, cBlockTorchHandler::MetaDataToDirection(m_Chunk->GetMeta(a_RelBlockX, a_RelBlockY, a_RelBlockZ)), true); // Inverse true to get the block torch is on
@ -448,7 +448,7 @@ void cIncrementalRedstoneSimulator::HandleRedstoneTorch(int a_RelBlockX, int a_R
} }
else else
{ {
// Check if the block the torch is on is powered // Check if the block the torch is on is powered
int X = a_RelBlockX; int Y = a_RelBlockY; int Z = a_RelBlockZ; int X = a_RelBlockX; int Y = a_RelBlockY; int Z = a_RelBlockZ;
AddFaceDirection(X, Y, Z, cBlockTorchHandler::MetaDataToDirection(m_Chunk->GetMeta(a_RelBlockX, a_RelBlockY, a_RelBlockZ)), true); // Inverse true to get the block torch is on AddFaceDirection(X, Y, Z, cBlockTorchHandler::MetaDataToDirection(m_Chunk->GetMeta(a_RelBlockX, a_RelBlockY, a_RelBlockZ)), true); // Inverse true to get the block torch is on
@ -803,7 +803,7 @@ void cIncrementalRedstoneSimulator::HandleRedstoneRepeaterDelays()
} }
else if (Block != E_BLOCK_REDSTONE_REPEATER_OFF) else if (Block != E_BLOCK_REDSTONE_REPEATER_OFF)
{ {
m_Chunk->SetBlock(RelBlockX, RelBlockY, RelBlockZ, E_BLOCK_REDSTONE_REPEATER_OFF, Meta); m_Chunk->SetBlock(RelBlockX, RelBlockY, RelBlockZ, E_BLOCK_REDSTONE_REPEATER_OFF, Meta);
} }
itr = m_RepeatersDelayList->erase(itr); itr = m_RepeatersDelayList->erase(itr);
} }

View File

@ -145,7 +145,7 @@ void cWindow::GetSlots(cPlayer & a_Player, cItems & a_Slots) const
{ {
int NumSlots = (*itr)->GetNumSlots(); int NumSlots = (*itr)->GetNumSlots();
for (int i = 0; i < NumSlots; i++) for (int i = 0; i < NumSlots; i++)
{ {
const cItem * Item = (*itr)->GetSlot(i, a_Player); const cItem * Item = (*itr)->GetSlot(i, a_Player);
if (Item == NULL) if (Item == NULL)
{ {

View File

@ -630,7 +630,7 @@ void cNBTChunkSerializer::AddProjectileEntity(cProjectileEntity * a_Projectile)
{ {
ASSERT(!"Unsaved projectile entity!"); ASSERT(!"Unsaved projectile entity!");
} }
} // switch (ProjectileKind) } // switch (ProjectileKind)
if (!a_Projectile->GetCreatorName().empty()) if (!a_Projectile->GetCreatorName().empty())
{ {