1
0

Style: Normalized spaces after if, for and while.

This commit is contained in:
madmaxoft 2014-07-20 23:10:31 +02:00
parent 8593d48579
commit 6be79575fd
28 changed files with 137 additions and 135 deletions

View File

@ -656,7 +656,7 @@ template<
static int tolua_ForEach(lua_State * tolua_S) static int tolua_ForEach(lua_State * tolua_S)
{ {
int NumArgs = lua_gettop(tolua_S) - 1; /* This includes 'self' */ int NumArgs = lua_gettop(tolua_S) - 1; /* This includes 'self' */
if( NumArgs != 1 && NumArgs != 2) if ((NumArgs != 1) && (NumArgs != 2))
{ {
return lua_do_error(tolua_S, "Error in function call '#funcname#': Requires 1 or 2 arguments, got %i", NumArgs); return lua_do_error(tolua_S, "Error in function call '#funcname#': Requires 1 or 2 arguments, got %i", NumArgs);
} }
@ -1947,7 +1947,7 @@ static int tolua_cPluginLua_AddWebTab(lua_State * tolua_S)
} }
else else
{ {
LOGERROR("ERROR: cPluginLua:AddWebTab invalid function reference in 2nd argument (Title: \"%s\")", Title.c_str() ); LOGWARNING("cPluginLua:AddWebTab: invalid function reference in 2nd argument (Title: \"%s\")", Title.c_str());
} }
return 0; return 0;

View File

@ -119,7 +119,8 @@ public:
AddFaceDirection(a_BlockX, a_BlockY, a_BlockZ, Face, true); AddFaceDirection(a_BlockX, a_BlockY, a_BlockZ, Face, true);
BLOCKTYPE BlockInQuestion = a_ChunkInterface.GetBlock(a_BlockX, a_BlockY, a_BlockZ); BLOCKTYPE BlockInQuestion = a_ChunkInterface.GetBlock(a_BlockX, a_BlockY, a_BlockZ);
if ( // If on a block that can only hold a torch if torch is standing on it, return that face // If on a block that can only hold a torch if torch is standing on it, return that face
if (
((BlockInQuestion == E_BLOCK_GLASS) || ((BlockInQuestion == E_BLOCK_GLASS) ||
(BlockInQuestion == E_BLOCK_FENCE) || (BlockInQuestion == E_BLOCK_FENCE) ||
(BlockInQuestion == E_BLOCK_NETHER_BRICK_FENCE) || (BlockInQuestion == E_BLOCK_NETHER_BRICK_FENCE) ||

View File

@ -1530,11 +1530,12 @@ void cChunk::FastSetBlock(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_BlockT
m_ChunkData.SetBlock(a_RelX, a_RelY, a_RelZ, a_BlockType); m_ChunkData.SetBlock(a_RelX, a_RelY, a_RelZ, a_BlockType);
if ( // Queue block to be sent only if ... // Queue block to be sent only if ...
if (
a_SendToClients && // ... we are told to do so AND ... a_SendToClients && // ... we are told to do so AND ...
( (
(OldBlockMeta != a_BlockMeta) || // ... the meta value is different OR ... (OldBlockMeta != a_BlockMeta) || // ... the meta value is different OR ...
!( // ... the old and new blocktypes AREN'T liquids (because client doesn't need to distinguish betwixt them); see below for specifics: !( // ... the old and new blocktypes AREN'T liquids (because client doesn't need to distinguish betwixt them):
((OldBlockType == E_BLOCK_STATIONARY_WATER) && (a_BlockType == E_BLOCK_WATER)) || // Replacing stationary water with water ((OldBlockType == E_BLOCK_STATIONARY_WATER) && (a_BlockType == E_BLOCK_WATER)) || // Replacing stationary water with water
((OldBlockType == E_BLOCK_WATER) && (a_BlockType == E_BLOCK_STATIONARY_WATER)) || // Replacing water with stationary water ((OldBlockType == E_BLOCK_WATER) && (a_BlockType == E_BLOCK_STATIONARY_WATER)) || // Replacing water with stationary water
((OldBlockType == E_BLOCK_STATIONARY_LAVA) && (a_BlockType == E_BLOCK_LAVA)) || // Replacing stationary water with water ((OldBlockType == E_BLOCK_STATIONARY_LAVA) && (a_BlockType == E_BLOCK_LAVA)) || // Replacing stationary water with water