1
0

Style: Normalized to no spaces before closing parenthesis.

This commit is contained in:
madmaxoft 2014-07-21 15:19:48 +02:00
parent 6be79575fd
commit 93d29555e5
94 changed files with 541 additions and 535 deletions

View File

@ -254,7 +254,7 @@ cBlockHandler * cBlockHandler::CreateBlockHandler(BLOCKTYPE a_BlockType)
case E_BLOCK_NEW_LOG: return new cBlockSidewaysHandler (a_BlockType); case E_BLOCK_NEW_LOG: return new cBlockSidewaysHandler (a_BlockType);
case E_BLOCK_NOTE_BLOCK: return new cBlockNoteHandler (a_BlockType); case E_BLOCK_NOTE_BLOCK: return new cBlockNoteHandler (a_BlockType);
case E_BLOCK_PISTON: return new cBlockPistonHandler (a_BlockType); case E_BLOCK_PISTON: return new cBlockPistonHandler (a_BlockType);
case E_BLOCK_PISTON_EXTENSION: return new cBlockPistonHeadHandler ( ); case E_BLOCK_PISTON_EXTENSION: return new cBlockPistonHeadHandler;
case E_BLOCK_PLANKS: return new cBlockPlanksHandler (a_BlockType); case E_BLOCK_PLANKS: return new cBlockPlanksHandler (a_BlockType);
case E_BLOCK_POTATOES: return new cBlockCropsHandler (a_BlockType); case E_BLOCK_POTATOES: return new cBlockCropsHandler (a_BlockType);
case E_BLOCK_POWERED_RAIL: return new cBlockRailHandler (a_BlockType); case E_BLOCK_POWERED_RAIL: return new cBlockRailHandler (a_BlockType);

View File

@ -31,14 +31,14 @@ public:
static const char * Yellow; static const char * Yellow;
static const char * White; static const char * White;
// Styles ( source: http://wiki.vg/Chat ) // Styles
// source: http://wiki.vg/Chat
static const char * Random; static const char * Random;
static const char * Bold; static const char * Bold;
static const char * Strikethrough; static const char * Strikethrough;
static const char * Underlined; static const char * Underlined;
static const char * Italic; static const char * Italic;
static const char * Plain; static const char * Plain;
}; };
// tolua_end // tolua_end

View File

@ -781,7 +781,7 @@ void cChunk::CheckBlocks()
void cChunk::TickBlocks(void) void cChunk::TickBlocks(void)
{ {
// Tick dem blocks // Tick dem blocks
// _X: We must limit the random number or else we get a nasty int overflow bug ( http://forum.mc-server.org/showthread.php?tid=457 ) // _X: We must limit the random number or else we get a nasty int overflow bug - http://forum.mc-server.org/showthread.php?tid=457
int RandomX = m_World->GetTickRandomNumber(0x00ffffff); int RandomX = m_World->GetTickRandomNumber(0x00ffffff);
int RandomY = m_World->GetTickRandomNumber(0x00ffffff); int RandomY = m_World->GetTickRandomNumber(0x00ffffff);
int RandomZ = m_World->GetTickRandomNumber(0x00ffffff); int RandomZ = m_World->GetTickRandomNumber(0x00ffffff);

View File

@ -1170,7 +1170,7 @@ void cClientHandle::HandleRightClick(int a_BlockX, int a_BlockY, int a_BlockZ, e
{ {
// Only compare ItemType, not meta (torches have different metas) // Only compare ItemType, not meta (torches have different metas)
// The -1 check is there because sometimes the client sends -1 instead of the held item // The -1 check is there because sometimes the client sends -1 instead of the held item
// ( http://forum.mc-server.org/showthread.php?tid=549&pid=4502#pid4502 ) // Ref.: http://forum.mc-server.org/showthread.php?tid=549&pid=4502#pid4502
LOGWARN("Player %s tried to place a block that was not equipped (exp %d, got %d)", LOGWARN("Player %s tried to place a block that was not equipped (exp %d, got %d)",
m_Username.c_str(), Equipped.m_ItemType, a_HeldItem.m_ItemType m_Username.c_str(), Equipped.m_ItemType, a_HeldItem.m_ItemType
); );

View File

@ -274,7 +274,7 @@ private:
/** The type used for storing the names of registered plugin channels. */ /** The type used for storing the names of registered plugin channels. */
typedef std::set<AString> cChannels; typedef std::set<AString> cChannels;
/** Number of chunks the player can see in each direction; 4 is the minimum ( http://wiki.vg/Protocol_FAQ#.E2.80.A6all_connecting_clients_spasm_and_jerk_uncontrollably.21 ) */ /** Number of chunks the player can see in each direction */
int m_ViewDistance; int m_ViewDistance;
/** Server generates this many chunks AHEAD of player sight. */ /** Server generates this many chunks AHEAD of player sight. */

View File

@ -40,7 +40,7 @@ Serialization will never put zero-level enchantments into the stringspec and wil
class cEnchantments class cEnchantments
{ {
public: public:
/** Individual enchantment IDs, corresponding to their NBT IDs ( http://www.minecraftwiki.net/wiki/Data_Values#Enchantment_IDs ) /** Individual enchantment IDs, corresponding to their NBT IDs: http://www.minecraftwiki.net/wiki/Data_Values#Enchantment_IDs
*/ */
enum enum

View File

@ -398,7 +398,7 @@ void cServer::TickClients(float a_Dt)
{ {
if ((*itr)->IsDestroyed()) if ((*itr)->IsDestroyed())
{ {
// Remove the client later, when CS is not held, to avoid deadlock ( http://forum.mc-server.org/showthread.php?tid=374 ) // Remove the client later, when CS is not held, to avoid deadlock: http://forum.mc-server.org/showthread.php?tid=374
RemoveClients.push_back(*itr); RemoveClients.push_back(*itr);
itr = m_Clients.erase(itr); itr = m_Clients.erase(itr);
continue; continue;

View File

@ -448,15 +448,21 @@ cWSSCompact::cPAKFile::cPAKFile(const AString & a_FileName, int a_LayerX, int a_
switch (m_ChunkVersion) switch (m_ChunkVersion)
{ {
case 1: case 1:
{
m_ChunkSize.Set(16, 128, 16); m_ChunkSize.Set(16, 128, 16);
break; break;
}
case 2: case 2:
case 3: case 3:
{
m_ChunkSize.Set(16, 256, 16); m_ChunkSize.Set(16, 256, 16);
break; break;
}
default: default:
{
LOGERROR("File \"%s\" is in an unknown chunk format (%d)", m_FileName.c_str(), m_ChunkVersion); LOGERROR("File \"%s\" is in an unknown chunk format (%d)", m_FileName.c_str(), m_ChunkVersion);
return; return;
}
}; };
short NumChunks = 0; short NumChunks = 0;