summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/BiomeDef.cpp2
-rw-r--r--src/BlockEntities/ChestEntity.cpp4
-rw-r--r--src/BlockInfo.cpp4
-rw-r--r--src/CheckBasicStyle.lua69
-rw-r--r--src/ChunkMap.cpp4
-rw-r--r--src/ClientHandle.cpp7
-rw-r--r--src/Defines.h1
-rw-r--r--src/Entities/Player.cpp1
-rw-r--r--src/Generating/FinishGen.cpp4
-rw-r--r--src/Generating/HeiGen.cpp4
-rw-r--r--src/Generating/MineShafts.cpp1
-rw-r--r--src/Generating/StructGen.cpp1
-rw-r--r--src/HTTPServer/HTTPServer.cpp4
-rw-r--r--src/Mobs/Monster.cpp27
-rw-r--r--src/Mobs/Monster.h7
-rw-r--r--src/Mobs/Skeleton.cpp17
-rw-r--r--src/Mobs/Skeleton.h4
-rw-r--r--src/Mobs/Zombie.cpp2
-rw-r--r--src/Mobs/Zombie.h2
-rw-r--r--src/Protocol/ProtocolRecognizer.cpp2
-rw-r--r--src/RCONServer.cpp4
-rw-r--r--src/Server.cpp4
-rw-r--r--src/Simulator/IncrementalRedstoneSimulator.cpp4
23 files changed, 95 insertions, 84 deletions
diff --git a/src/BiomeDef.cpp b/src/BiomeDef.cpp
index 9852b3dd9..d680377e2 100644
--- a/src/BiomeDef.cpp
+++ b/src/BiomeDef.cpp
@@ -15,7 +15,7 @@ static struct {
const char * m_String;
} g_BiomeMap[] =
{
- {biOcean, "Ocean"} ,
+ {biOcean, "Ocean"},
{biPlains, "Plains"},
{biDesert, "Desert"},
{biExtremeHills, "ExtremeHills"},
diff --git a/src/BlockEntities/ChestEntity.cpp b/src/BlockEntities/ChestEntity.cpp
index 9f50365e9..21e1f6ba2 100644
--- a/src/BlockEntities/ChestEntity.cpp
+++ b/src/BlockEntities/ChestEntity.cpp
@@ -169,8 +169,8 @@ void cChestEntity::OpenNewWindow(void)
if (
m_World->DoWithChestAt(m_PosX - 1, m_PosY, m_PosZ, OpenDbl) ||
m_World->DoWithChestAt(m_PosX + 1, m_PosY, m_PosZ, OpenDbl) ||
- m_World->DoWithChestAt(m_PosX , m_PosY, m_PosZ - 1, OpenDbl) ||
- m_World->DoWithChestAt(m_PosX , m_PosY, m_PosZ + 1, OpenDbl)
+ m_World->DoWithChestAt(m_PosX, m_PosY, m_PosZ - 1, OpenDbl) ||
+ m_World->DoWithChestAt(m_PosX, m_PosY, m_PosZ + 1, OpenDbl)
)
{
// The double-chest window has been opened in the callback
diff --git a/src/BlockInfo.cpp b/src/BlockInfo.cpp
index b4b98a2f0..97e89359f 100644
--- a/src/BlockInfo.cpp
+++ b/src/BlockInfo.cpp
@@ -496,9 +496,6 @@ void cBlockInfo::Initialize(cBlockInfoArray & a_Info)
a_Info[E_BLOCK_CROPS ].m_IsSolid = false;
a_Info[E_BLOCK_DANDELION ].m_IsSolid = false;
a_Info[E_BLOCK_DETECTOR_RAIL ].m_IsSolid = false;
- a_Info[E_BLOCK_END_PORTAL ].m_IsSolid = false;
- a_Info[E_BLOCK_FENCE ].m_IsSolid = false;
- a_Info[E_BLOCK_FENCE_GATE ].m_IsSolid = false;
a_Info[E_BLOCK_FIRE ].m_IsSolid = false;
a_Info[E_BLOCK_FLOWER ].m_IsSolid = false;
a_Info[E_BLOCK_HEAVY_WEIGHTED_PRESSURE_PLATE].m_IsSolid = false;
@@ -530,7 +527,6 @@ void cBlockInfo::Initialize(cBlockInfoArray & a_Info)
a_Info[E_BLOCK_WATER ].m_IsSolid = false;
a_Info[E_BLOCK_WOODEN_BUTTON ].m_IsSolid = false;
a_Info[E_BLOCK_WOODEN_PRESSURE_PLATE].m_IsSolid = false;
- a_Info[E_BLOCK_WOODEN_SLAB ].m_IsSolid = false;
// Blocks that fully occupy their voxel - used as a guide for torch placeable blocks, amongst other things:
diff --git a/src/CheckBasicStyle.lua b/src/CheckBasicStyle.lua
index f9bb41975..6aad4125d 100644
--- a/src/CheckBasicStyle.lua
+++ b/src/CheckBasicStyle.lua
@@ -6,13 +6,16 @@ Checks that all source files (*.cpp, *.h) use the basic style requirements of th
- Tabs for indentation, spaces for alignment
- Trailing whitespace on non-empty lines
- Two spaces between code and line-end comment ("//")
- - (TODO) Spaces around +, -, (cannot check /, * or & due to their other usage - comment, ptr deref, address-of)
+ - Spaces after comma, not before (except in #define argument list)
- (TODO) Spaces before *, /, &
- - (TODO) Spaces after ,
- (TODO) Hex numbers with even digit length
- (TODO) Hex numbers in lowercase
- (TODO) Braces not on the end of line
- (TODO) Line dividers (////...) exactly 80 slashes
+ - (TODO) Not using "* "-style doxy comments continuation lines
+
+Violations that cannot be checked easily:
+ - Spaces around "+" (there are things like "a++", "++a", "a += 1", "X+", "stack +1" and ascii-drawn tables)
Reports all violations on stdout in a form that is readable by Visual Studio's parser, so that dblclicking
the line brings the editor directly to the violation.
@@ -85,6 +88,45 @@ end
+--- Searches for the specified pattern, if found, reports it as a violation with the given message
+local function ReportViolationIfFound(a_Line, a_FileName, a_LineNum, a_Pattern, a_Message)
+ local patStart, patEnd = a_Line:find(a_Pattern)
+ if not(patStart) then
+ return
+ end
+ ReportViolation(a_FileName, a_LineNum, a_Message .. "(" .. patStart .. " .. " .. patEnd .. ")")
+end
+
+
+
+
+
+local g_ViolationPatterns =
+{
+ -- Check against indenting using spaces:
+ {"^\t* +", "Indenting with a space"},
+
+ -- Check against alignment using tabs:
+ {"[^%s]\t+[^%s]", "Aligning with a tab"},
+
+ -- Check against trailing whitespace:
+ {"[^%s]%s+\n", "Trailing whitespace"},
+
+ -- Check that all "//"-style comments have at least two spaces in front (unless alone on line):
+ {"[^%s] //", "Needs at least two spaces in front of a \"//\"-style comment"},
+
+ -- Check that all "//"-style comments have at least one spaces after:
+ {"%s//[^%s/*<]", "Needs a space after a \"//\"-style comment"},
+
+ -- Check that all commas have spaces after them and not in front of them:
+ {" ,", "Extra space before a \",\""},
+ {"^\t*[^#].*,[^%s]", "Needs a space after a \",\""}, -- Anywhere except lines starting with "#" - avoid #define params
+}
+
+
+
+
+
--- Processes one file
local function ProcessFile(a_FileName)
assert(type(a_FileName) == "string")
@@ -113,26 +155,11 @@ local function ProcessFile(a_FileName)
all:gsub("\r\n", "\n") -- normalize CRLF into LF-only
string.gsub(all .. "\n", "[^\n]*\n", -- Iterate over each line, while preserving empty lines
function(a_Line)
- -- Check against indenting using spaces:
- if (a_Line:find("^\t* +")) then -- Find any number of tabs at the start of line (incl 0), followed by a space
- ReportViolation(a_FileName, lineCounter, "Indenting with a space")
- end
- -- Check against alignment using tabs:
- if (a_Line:find("[^%s]\t+[^%s]")) then -- Find any number of tabs after non-whitespace followed by non-whitespace
- ReportViolation(a_FileName, lineCounter, "Aligning with a tab")
- end
- -- Check against trailing whitespace:
- if (a_Line:find("[^%s]%s+\n")) then -- Find any whitespace after non-whitespace at the end of line
- ReportViolation(a_FileName, lineCounter, "Trailing whitespace")
- end
- -- Check that all "//"-style comments have at least two spaces in front (unless alone on line):
- if (a_Line:find("[^%s] //")) then
- ReportViolation(a_FileName, lineCounter, "Needs at least two spaces in front of a \"//\"-style comment")
- end
- -- Check that all "//"-style comments have at least one spaces after:
- if (a_Line:find("%s//[^%s/*<]")) then
- ReportViolation(a_FileName, lineCounter, "Needs a space after a \"//\"-style comment")
+ -- Check against each violation pattern:
+ for _, pat in ipairs(g_ViolationPatterns) do
+ ReportViolationIfFound(a_Line, a_FileName, lineCounter, pat[1], pat[2])
end
+
lineCounter = lineCounter + 1
end
)
diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp
index 9f280f1c5..e91f77d27 100644
--- a/src/ChunkMap.cpp
+++ b/src/ChunkMap.cpp
@@ -2762,8 +2762,8 @@ cChunkPtr cChunkMap::cChunkLayer::GetChunk( int a_ChunkX, int a_ChunkY, int a_Ch
{
cChunk * neixm = (LocalX > 0) ? m_Chunks[Index - 1] : m_Parent->FindChunk(a_ChunkX - 1, a_ChunkZ);
cChunk * neixp = (LocalX < LAYER_SIZE - 1) ? m_Chunks[Index + 1] : m_Parent->FindChunk(a_ChunkX + 1, a_ChunkZ);
- cChunk * neizm = (LocalZ > 0) ? m_Chunks[Index - LAYER_SIZE] : m_Parent->FindChunk(a_ChunkX , a_ChunkZ - 1);
- cChunk * neizp = (LocalZ < LAYER_SIZE - 1) ? m_Chunks[Index + LAYER_SIZE] : m_Parent->FindChunk(a_ChunkX , a_ChunkZ + 1);
+ cChunk * neizm = (LocalZ > 0) ? m_Chunks[Index - LAYER_SIZE] : m_Parent->FindChunk(a_ChunkX, a_ChunkZ - 1);
+ cChunk * neizp = (LocalZ < LAYER_SIZE - 1) ? m_Chunks[Index + LAYER_SIZE] : m_Parent->FindChunk(a_ChunkX, a_ChunkZ + 1);
m_Chunks[Index] = new cChunk(a_ChunkX, 0, a_ChunkZ, m_Parent, m_Parent->GetWorld(), neixm, neixp, neizm, neizp, m_Pool);
}
return m_Chunks[Index];
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp
index 97466c331..58247a836 100644
--- a/src/ClientHandle.cpp
+++ b/src/ClientHandle.cpp
@@ -1209,11 +1209,12 @@ void cClientHandle::HandleRightClick(int a_BlockX, int a_BlockY, int a_BlockZ, e
{
HandlePlaceBlock(a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ, *ItemHandler);
}
- else if ((ItemHandler->IsFood() || ItemHandler->IsDrinkable(EquippedDamage)) && !m_Player->IsGameModeCreative())
+ else if ((ItemHandler->IsFood() || ItemHandler->IsDrinkable(EquippedDamage)))
{
- if (m_Player->IsSatiated() && !ItemHandler->IsDrinkable(EquippedDamage))
+ if ((m_Player->IsSatiated() || m_Player->IsGameModeCreative()) &&
+ ItemHandler->IsFood())
{
- // The player is satiated, they cannot eat
+ // The player is satiated or in creative, and trying to eat
return;
}
m_Player->StartEating();
diff --git a/src/Defines.h b/src/Defines.h
index 877970ab8..f57e63c7f 100644
--- a/src/Defines.h
+++ b/src/Defines.h
@@ -1,7 +1,6 @@
#pragma once
-#include "ChatColor.h"
#include <limits>
#include <cmath>
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index 5c3303cb2..ea11926b8 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -2,6 +2,7 @@
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
#include "Player.h"
+#include "../ChatColor.h"
#include "../Server.h"
#include "../UI/Window.h"
#include "../UI/WindowOwner.h"
diff --git a/src/Generating/FinishGen.cpp b/src/Generating/FinishGen.cpp
index 13871bbd8..00a93023d 100644
--- a/src/Generating/FinishGen.cpp
+++ b/src/Generating/FinishGen.cpp
@@ -193,8 +193,8 @@ bool cFinishGenSprinkleFoliage::TryAddSugarcane(cChunkDesc & a_ChunkDesc, int a_
if (
!IsWater(a_ChunkDesc.GetBlockType(a_RelX - 1, a_RelY, a_RelZ)) &&
!IsWater(a_ChunkDesc.GetBlockType(a_RelX + 1, a_RelY, a_RelZ)) &&
- !IsWater(a_ChunkDesc.GetBlockType(a_RelX , a_RelY, a_RelZ - 1)) &&
- !IsWater(a_ChunkDesc.GetBlockType(a_RelX , a_RelY, a_RelZ + 1))
+ !IsWater(a_ChunkDesc.GetBlockType(a_RelX, a_RelY, a_RelZ - 1)) &&
+ !IsWater(a_ChunkDesc.GetBlockType(a_RelX, a_RelY, a_RelZ + 1))
)
{
return false;
diff --git a/src/Generating/HeiGen.cpp b/src/Generating/HeiGen.cpp
index b02e06951..3df1a90ff 100644
--- a/src/Generating/HeiGen.cpp
+++ b/src/Generating/HeiGen.cpp
@@ -283,7 +283,7 @@ void cHeiGenClassic::GenHeightMap(int a_ChunkX, int a_ChunkZ, cChunkDef::HeightM
{
hei = 250;
}
- cChunkDef::SetHeight(a_HeightMap, x , z, hei);
+ cChunkDef::SetHeight(a_HeightMap, x, z, hei);
} // for x
} // for z
}
@@ -345,7 +345,7 @@ void cHeiGenMountains::GenHeightMap(int a_ChunkX, int a_ChunkZ, cChunkDef::Heigh
{
hei = 250;
}
- cChunkDef::SetHeight(a_HeightMap, x , z, hei);
+ cChunkDef::SetHeight(a_HeightMap, x, z, hei);
} // for x
} // for z
}
diff --git a/src/Generating/MineShafts.cpp b/src/Generating/MineShafts.cpp
index e951b90fa..0532aff39 100644
--- a/src/Generating/MineShafts.cpp
+++ b/src/Generating/MineShafts.cpp
@@ -997,7 +997,6 @@ cMineShaft * cMineShaftCrossing::CreateAndFit(
BoundingBox.p2.y -= 4;
}
}
- rnd >>= 2;
switch (a_Direction)
{
case dirXP: BoundingBox.p2.x += 4; BoundingBox.p1.z -= 2; BoundingBox.p2.z += 2; break;
diff --git a/src/Generating/StructGen.cpp b/src/Generating/StructGen.cpp
index 5deded17d..054eec345 100644
--- a/src/Generating/StructGen.cpp
+++ b/src/Generating/StructGen.cpp
@@ -484,7 +484,6 @@ void cStructGenLakes::CreateLakeImage(int a_ChunkX, int a_ChunkZ, cBlockArea & a
const int BubbleY = 4 + (Rnd & 0x01); // 4 .. 5
Rnd >>= 1;
const int BubbleZ = BubbleR + (Rnd % Range);
- Rnd >>= 4;
const int HalfR = BubbleR / 2; // 1 .. 2
const int RSquared = BubbleR * BubbleR;
for (int y = -HalfR; y <= HalfR; y++)
diff --git a/src/HTTPServer/HTTPServer.cpp b/src/HTTPServer/HTTPServer.cpp
index b7edf7829..8eabe5cb2 100644
--- a/src/HTTPServer/HTTPServer.cpp
+++ b/src/HTTPServer/HTTPServer.cpp
@@ -122,8 +122,8 @@ class cDebugCallbacks :
// cHTTPServer:
cHTTPServer::cHTTPServer(void) :
- m_ListenThreadIPv4(*this, cSocket::IPv4, "WebServer IPv4"),
- m_ListenThreadIPv6(*this, cSocket::IPv6, "WebServer IPv6"),
+ m_ListenThreadIPv4(*this, cSocket::IPv4, "WebServer"),
+ m_ListenThreadIPv6(*this, cSocket::IPv6, "WebServer"),
m_Callbacks(NULL)
{
}
diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp
index ba901df4e..1369746df 100644
--- a/src/Mobs/Monster.cpp
+++ b/src/Mobs/Monster.cpp
@@ -115,8 +115,6 @@ void cMonster::TickPathFinding()
const int PosY = POSY_TOINT;
const int PosZ = POSZ_TOINT;
- m_FinalDestination.y = (double)FindFirstNonAirBlockPosition(m_FinalDestination.x, m_FinalDestination.z);
-
std::vector<Vector3d> m_PotentialCoordinates;
m_TraversedCoordinates.push_back(Vector3i(PosX, PosY, PosZ));
@@ -201,19 +199,6 @@ void cMonster::TickPathFinding()
-void cMonster::MoveToPosition(const Vector3f & a_Position)
-{
- FinishPathFinding();
-
- m_FinalDestination = a_Position;
- m_bMovingToDestination = true;
- TickPathFinding();
-}
-
-
-
-
-
void cMonster::MoveToPosition(const Vector3d & a_Position)
{
FinishPathFinding();
@@ -227,15 +212,7 @@ void cMonster::MoveToPosition(const Vector3d & a_Position)
bool cMonster::IsCoordinateInTraversedList(Vector3i a_Coords)
{
- for (std::vector<Vector3i>::const_iterator itr = m_TraversedCoordinates.begin(); itr != m_TraversedCoordinates.end(); ++itr)
- {
- if (itr->Equals(a_Coords))
- {
- return true;
- }
- }
-
- return false;
+ return (std::find(m_TraversedCoordinates.begin(), m_TraversedCoordinates.end(), a_Coords) != m_TraversedCoordinates.end());
}
@@ -296,8 +273,6 @@ void cMonster::Tick(float a_Dt, cChunk & a_Chunk)
{
if (m_bOnGround)
{
- m_Destination.y = FindFirstNonAirBlockPosition(m_Destination.x, m_Destination.z);
-
if (DoesPosYRequireJump((int)floor(m_Destination.y)))
{
m_bOnGround = false;
diff --git a/src/Mobs/Monster.h b/src/Mobs/Monster.h
index 750040468..4af7cf4f1 100644
--- a/src/Mobs/Monster.h
+++ b/src/Mobs/Monster.h
@@ -76,9 +76,9 @@ public:
enum MPersonality{PASSIVE,AGGRESSIVE,COWARDLY} m_EMPersonality;
/** Creates the mob object.
- * If a_ConfigName is not empty, the configuration is loaded using GetMonsterConfig()
- * a_MobType is the type of the mob (also used in the protocol ( http://wiki.vg/Entities#Mobs , 2012_12_22))
- * a_SoundHurt and a_SoundDeath are assigned into m_SoundHurt and m_SoundDeath, respectively
+ If a_ConfigName is not empty, the configuration is loaded using GetMonsterConfig()
+ a_MobType is the type of the mob (also used in the protocol ( http://wiki.vg/Entities#Mobs 2012_12_22))
+ a_SoundHurt and a_SoundDeath are assigned into m_SoundHurt and m_SoundDeath, respectively
*/
cMonster(const AString & a_ConfigName, eType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, double a_Width, double a_Height);
@@ -92,7 +92,6 @@ public:
virtual void KilledBy(TakeDamageInfo & a_TDI) override;
- virtual void MoveToPosition(const Vector3f & a_Position);
virtual void MoveToPosition(const Vector3d & a_Position); // tolua_export
virtual bool ReachedDestination(void);
diff --git a/src/Mobs/Skeleton.cpp b/src/Mobs/Skeleton.cpp
index 0641a3d57..cd707f4bb 100644
--- a/src/Mobs/Skeleton.cpp
+++ b/src/Mobs/Skeleton.cpp
@@ -4,6 +4,7 @@
#include "Skeleton.h"
#include "../World.h"
#include "../Entities/ArrowEntity.h"
+#include "ClientHandle.h"
@@ -47,7 +48,7 @@ void cSkeleton::GetDrops(cItems & a_Drops, cEntity * a_Killer)
-void cSkeleton::MoveToPosition(const Vector3f & a_Position)
+void cSkeleton::MoveToPosition(const Vector3d & a_Position)
{
// If the destination is sufficiently skylight challenged AND the skeleton isn't on fire then block the movement
if (
@@ -90,3 +91,17 @@ void cSkeleton::Attack(float a_Dt)
m_AttackInterval = 0.0;
}
}
+
+
+
+
+
+void cSkeleton::SpawnOn(cClientHandle & a_ClientHandle)
+{
+ super::SpawnOn(a_ClientHandle);
+ a_ClientHandle.SendEntityEquipment(*this, 0, cItem(E_ITEM_BOW));
+}
+
+
+
+
diff --git a/src/Mobs/Skeleton.h b/src/Mobs/Skeleton.h
index 8f31b42e1..efb670c83 100644
--- a/src/Mobs/Skeleton.h
+++ b/src/Mobs/Skeleton.h
@@ -18,8 +18,10 @@ public:
CLASS_PROTODEF(cSkeleton);
virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override;
- virtual void MoveToPosition(const Vector3f & a_Position) override;
+ virtual void MoveToPosition(const Vector3d & a_Position) override;
virtual void Attack(float a_Dt) override;
+ virtual void SpawnOn(cClientHandle & a_ClientHandle) override;
+
bool IsWither(void) const { return m_bIsWither; };
private:
diff --git a/src/Mobs/Zombie.cpp b/src/Mobs/Zombie.cpp
index 725790ed9..30225c32d 100644
--- a/src/Mobs/Zombie.cpp
+++ b/src/Mobs/Zombie.cpp
@@ -42,7 +42,7 @@ void cZombie::GetDrops(cItems & a_Drops, cEntity * a_Killer)
-void cZombie::MoveToPosition(const Vector3f & a_Position)
+void cZombie::MoveToPosition(const Vector3d & a_Position)
{
// If the destination is sufficiently skylight challenged AND the skeleton isn't on fire then block the movement
if (
diff --git a/src/Mobs/Zombie.h b/src/Mobs/Zombie.h
index 1ba368f9c..c56409570 100644
--- a/src/Mobs/Zombie.h
+++ b/src/Mobs/Zombie.h
@@ -17,7 +17,7 @@ public:
CLASS_PROTODEF(cZombie);
virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override;
- virtual void MoveToPosition(const Vector3f & a_Position) override;
+ virtual void MoveToPosition(const Vector3d & a_Position) override;
bool IsVillagerZombie(void) const {return m_IsVillagerZombie; }
bool IsConverting (void) const {return m_IsConverting; }
diff --git a/src/Protocol/ProtocolRecognizer.cpp b/src/Protocol/ProtocolRecognizer.cpp
index d3aae65fe..3991b84de 100644
--- a/src/Protocol/ProtocolRecognizer.cpp
+++ b/src/Protocol/ProtocolRecognizer.cpp
@@ -953,7 +953,6 @@ bool cProtocolRecognizer::TryRecognizeLengthlessProtocol(void)
bool cProtocolRecognizer::TryRecognizeLengthedProtocol(UInt32 a_PacketLengthRemaining)
{
UInt32 PacketType;
- UInt32 NumBytesRead = (UInt32)m_Buffer.GetReadableSpace();
if (!m_Buffer.ReadVarInt(PacketType))
{
return false;
@@ -972,7 +971,6 @@ bool cProtocolRecognizer::TryRecognizeLengthedProtocol(UInt32 a_PacketLengthRema
{
return false;
}
- NumBytesRead -= (UInt32)m_Buffer.GetReadableSpace();
switch (ProtocolVersion)
{
case PROTO_VERSION_1_7_2:
diff --git a/src/RCONServer.cpp b/src/RCONServer.cpp
index 28cb1e03b..141c67d1b 100644
--- a/src/RCONServer.cpp
+++ b/src/RCONServer.cpp
@@ -78,8 +78,8 @@ protected:
cRCONServer::cRCONServer(cServer & a_Server) :
m_Server(a_Server),
- m_ListenThread4(*this, cSocket::IPv4, "RCON IPv4"),
- m_ListenThread6(*this, cSocket::IPv6, "RCON IPv6")
+ m_ListenThread4(*this, cSocket::IPv4, "RCON"),
+ m_ListenThread6(*this, cSocket::IPv6, "RCON")
{
}
diff --git a/src/Server.cpp b/src/Server.cpp
index bc9644804..10a354a36 100644
--- a/src/Server.cpp
+++ b/src/Server.cpp
@@ -105,8 +105,8 @@ void cServer::cTickThread::Execute(void)
// cServer:
cServer::cServer(void) :
- m_ListenThreadIPv4(*this, cSocket::IPv4, "Client IPv4"),
- m_ListenThreadIPv6(*this, cSocket::IPv6, "Client IPv6"),
+ m_ListenThreadIPv4(*this, cSocket::IPv4, "Client"),
+ m_ListenThreadIPv6(*this, cSocket::IPv6, "Client"),
m_PlayerCount(0),
m_PlayerCountDiff(0),
m_ClientViewDistance(0),
diff --git a/src/Simulator/IncrementalRedstoneSimulator.cpp b/src/Simulator/IncrementalRedstoneSimulator.cpp
index 8e5e40fb5..3dd6417dc 100644
--- a/src/Simulator/IncrementalRedstoneSimulator.cpp
+++ b/src/Simulator/IncrementalRedstoneSimulator.cpp
@@ -724,7 +724,7 @@ void cIncrementalRedstoneSimulator::HandleRedstoneRepeater(int a_RelBlockX, int
X Axis ---->
- Repeater directions, values from a cWorld::GetBlockMeta(a_RelBlockX , a_RelBlockY, a_RelBlockZ) lookup:
+ Repeater directions, values from a cWorld::GetBlockMeta(a_RelBlockX, a_RelBlockY, a_RelBlockZ) lookup:
East (Right) (X+): 0x1
West (Left) (X-): 0x3
@@ -1723,7 +1723,7 @@ bool cIncrementalRedstoneSimulator::IsWirePowered(int a_RelBlockX, int a_RelBloc
{
continue;
}
- a_PowerLevel = std::max(itr->a_PowerLevel , a_PowerLevel); // Get the highest power level (a_PowerLevel is initialised already and there CAN be multiple levels for one block)
+ a_PowerLevel = std::max(itr->a_PowerLevel, a_PowerLevel); // Get the highest power level (a_PowerLevel is initialised already and there CAN be multiple levels for one block)
}
for (LinkedBlocksList::const_iterator itr = m_LinkedPoweredBlocks->begin(); itr != m_LinkedPoweredBlocks->end(); ++itr) // Check linked powered list