summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-07-17 22:59:02 +0200
committermadmaxoft <github@xoft.cz>2014-07-17 23:16:54 +0200
commitd0cc9aedb3e63d39324c52b6385406f362ab41b7 (patch)
tree20aed08f8932927b94735cf6d996f7d6ea375f46 /src
parentPlayer.cpp: Fixed compile error (diff)
downloadcuberite-d0cc9aedb3e63d39324c52b6385406f362ab41b7.tar
cuberite-d0cc9aedb3e63d39324c52b6385406f362ab41b7.tar.gz
cuberite-d0cc9aedb3e63d39324c52b6385406f362ab41b7.tar.bz2
cuberite-d0cc9aedb3e63d39324c52b6385406f362ab41b7.tar.lz
cuberite-d0cc9aedb3e63d39324c52b6385406f362ab41b7.tar.xz
cuberite-d0cc9aedb3e63d39324c52b6385406f362ab41b7.tar.zst
cuberite-d0cc9aedb3e63d39324c52b6385406f362ab41b7.zip
Diffstat (limited to 'src')
-rw-r--r--src/Blocks/BlockLadder.h6
-rw-r--r--src/Entities/Entity.cpp4
-rw-r--r--src/Entities/Minecart.cpp8
-rw-r--r--src/Entities/Pickup.cpp2
-rw-r--r--src/Entities/Player.cpp2
-rw-r--r--src/Items/ItemBucket.h8
-rw-r--r--src/Items/ItemHandler.h2
-rw-r--r--src/Items/ItemSeeds.h2
-rw-r--r--src/Mobs/Creeper.cpp2
-rw-r--r--src/Mobs/Horse.cpp2
-rw-r--r--src/Simulator/IncrementalRedstoneSimulator.cpp8
-rw-r--r--src/UI/Window.cpp2
-rw-r--r--src/WorldStorage/NBTChunkSerializer.cpp2
13 files changed, 25 insertions, 25 deletions
diff --git a/src/Blocks/BlockLadder.h b/src/Blocks/BlockLadder.h
index 2c41083e7..72acced41 100644
--- a/src/Blocks/BlockLadder.h
+++ b/src/Blocks/BlockLadder.h
@@ -12,17 +12,17 @@
class cBlockLadderHandler :
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:
cBlockLadderHandler(BLOCKTYPE a_BlockType)
: super(a_BlockType)
{
- }
+ }
virtual bool GetPlacementBlockTypeMeta(
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,
BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta
) override
diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp
index 0ff3ff102..7d130aa47 100644
--- a/src/Entities/Entity.cpp
+++ b/src/Entities/Entity.cpp
@@ -640,7 +640,7 @@ void cEntity::HandlePhysics(float a_Dt, cChunk & a_Chunk)
if ((BlockY >= cChunkDef::Height) || (BlockY < 0))
{
- // Outside of the world
+ // Outside of the world
AddSpeedY(m_Gravity * a_Dt);
AddPosition(GetSpeed() * a_Dt);
return;
@@ -858,7 +858,7 @@ void cEntity::TickBurning(cChunk & a_Chunk)
if (POSY_TOINT > m_World->GetHeight(POSX_TOINT, POSZ_TOINT))
{
m_TicksLeftBurning = 0;
- }
+ }
}
// Do the burning damage:
diff --git a/src/Entities/Minecart.cpp b/src/Entities/Minecart.cpp
index 6502ae45a..03850c8a7 100644
--- a/src/Entities/Minecart.cpp
+++ b/src/Entities/Minecart.cpp
@@ -493,7 +493,7 @@ void cMinecart::HandlePoweredRailPhysics(NIBBLETYPE a_RailMeta)
SetSpeedY(-GetSpeedX());
}
break;
- }
+ }
case E_META_RAIL_ASCEND_XP: // ASCEND WEST
{
SetYaw(180);
@@ -513,7 +513,7 @@ void cMinecart::HandlePoweredRailPhysics(NIBBLETYPE a_RailMeta)
}
}
break;
- }
+ }
case E_META_RAIL_ASCEND_ZM: // ASCEND NORTH
{
SetYaw(270);
@@ -787,7 +787,7 @@ bool cMinecart::TestBlockCollision(NIBBLETYPE a_RailMeta)
}
}
break;
- }
+ }
case E_META_RAIL_CURVED_ZM_XM:
case E_META_RAIL_CURVED_ZM_XP:
case E_META_RAIL_CURVED_ZP_XM:
@@ -883,7 +883,7 @@ bool cMinecart::TestEntityCollision(NIBBLETYPE a_RailMeta)
}
}
return true;
- }
+ }
case E_META_RAIL_CURVED_ZM_XM:
case E_META_RAIL_CURVED_ZM_XP:
case E_META_RAIL_CURVED_ZP_XM:
diff --git a/src/Entities/Pickup.cpp b/src/Entities/Pickup.cpp
index ab0f856dd..18df1a210 100644
--- a/src/Entities/Pickup.cpp
+++ b/src/Entities/Pickup.cpp
@@ -143,7 +143,7 @@ void cPickup::Tick(float a_Dt, cChunk & a_Chunk)
m_bCollected = true;
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.
- if (m_Timer > 500.f)
+ if (m_Timer > 500.f)
{
Destroy(true);
return;
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index a1dfed39c..6e7623f4a 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -497,7 +497,7 @@ void cPlayer::SetTouchGround(bool a_bTouchGround)
// Fall particles
GetWorld()->BroadcastSoundParticleEffect(2006, POSX_TOINT, (int)GetPosY() - 1, POSZ_TOINT, Damage /* Used as particle effect speed modifier */);
- }
+ }
m_LastGroundHeight = (float)GetPosY();
}
diff --git a/src/Items/ItemBucket.h b/src/Items/ItemBucket.h
index 4cdfab0fe..6d7926fa4 100644
--- a/src/Items/ItemBucket.h
+++ b/src/Items/ItemBucket.h
@@ -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)
- {
+ {
if (a_BlockFace != BLOCK_FACE_NONE)
{
return false;
@@ -209,14 +209,14 @@ public:
}
m_Pos.Set(a_BlockX, a_BlockY, a_BlockZ); // (Block could be washed away, replace it)
return true; // Abort tracing
- }
+ }
return false;
}
} Callbacks;
cLineBlockTracer Tracer(*a_World, Callbacks);
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
// Use this to judge whether the position is valid
@@ -227,6 +227,6 @@ public:
return true;
}
- return false;
+ return false;
}
};
diff --git a/src/Items/ItemHandler.h b/src/Items/ItemHandler.h
index 3ea04d1cb..c7362c5f4 100644
--- a/src/Items/ItemHandler.h
+++ b/src/Items/ItemHandler.h
@@ -91,7 +91,7 @@ public:
/** Can the anvil repair this item, when a_Item is the second input? */
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.
Also, the handler should set a_BlockType and a_BlockMeta to correct values for the newly placed block.
*/
diff --git a/src/Items/ItemSeeds.h b/src/Items/ItemSeeds.h
index 4c9e82ae0..54a1183d7 100644
--- a/src/Items/ItemSeeds.h
+++ b/src/Items/ItemSeeds.h
@@ -40,7 +40,7 @@ public:
case E_ITEM_CARROT: return FoodInfo(4, 4.8);
case E_ITEM_POTATO: return FoodInfo(1, 0.6);
default: return FoodInfo(0, 0);
- }
+ }
}
virtual bool GetPlacementBlockTypeMeta(
diff --git a/src/Mobs/Creeper.cpp b/src/Mobs/Creeper.cpp
index 495f1dd25..02718edf8 100644
--- a/src/Mobs/Creeper.cpp
+++ b/src/Mobs/Creeper.cpp
@@ -37,7 +37,7 @@ void cCreeper::Tick(float a_Dt, cChunk & a_Chunk)
{
if (m_bIsBlowing)
{
- m_ExplodingTimer += 1;
+ m_ExplodingTimer += 1;
}
if (m_ExplodingTimer == 30)
diff --git a/src/Mobs/Horse.cpp b/src/Mobs/Horse.cpp
index 9d130301f..67a09d4ab 100644
--- a/src/Mobs/Horse.cpp
+++ b/src/Mobs/Horse.cpp
@@ -63,7 +63,7 @@ void cHorse::Tick(float a_Dt, cChunk & a_Chunk)
m_Attachee->Detach();
m_bIsRearing = true;
}
- }
+ }
else
{
m_bIsTame = true;
diff --git a/src/Simulator/IncrementalRedstoneSimulator.cpp b/src/Simulator/IncrementalRedstoneSimulator.cpp
index 6249e0cdd..eb12c08e0 100644
--- a/src/Simulator/IncrementalRedstoneSimulator.cpp
+++ b/src/Simulator/IncrementalRedstoneSimulator.cpp
@@ -281,7 +281,7 @@ void cIncrementalRedstoneSimulator::SimulateChunk(float a_Dt, int a_ChunkX, int
if (ShouldUpdateSimulateOnceBlocks)
{
switch (dataitr->Data)
- {
+ {
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_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)
{
- // 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;
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
{
- // 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;
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)
{
- 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);
}
diff --git a/src/UI/Window.cpp b/src/UI/Window.cpp
index 6606beda2..2558d15b8 100644
--- a/src/UI/Window.cpp
+++ b/src/UI/Window.cpp
@@ -145,7 +145,7 @@ void cWindow::GetSlots(cPlayer & a_Player, cItems & a_Slots) const
{
int NumSlots = (*itr)->GetNumSlots();
for (int i = 0; i < NumSlots; i++)
- {
+ {
const cItem * Item = (*itr)->GetSlot(i, a_Player);
if (Item == NULL)
{
diff --git a/src/WorldStorage/NBTChunkSerializer.cpp b/src/WorldStorage/NBTChunkSerializer.cpp
index 3f79a6572..e68903b26 100644
--- a/src/WorldStorage/NBTChunkSerializer.cpp
+++ b/src/WorldStorage/NBTChunkSerializer.cpp
@@ -630,7 +630,7 @@ void cNBTChunkSerializer::AddProjectileEntity(cProjectileEntity * a_Projectile)
{
ASSERT(!"Unsaved projectile entity!");
}
- } // switch (ProjectileKind)
+ } // switch (ProjectileKind)
if (!a_Projectile->GetCreatorName().empty())
{