summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ByteBuffer.cpp10
-rw-r--r--src/Entities/Pawn.cpp2
2 files changed, 7 insertions, 5 deletions
diff --git a/src/ByteBuffer.cpp b/src/ByteBuffer.cpp
index 127227180..80be9baee 100644
--- a/src/ByteBuffer.cpp
+++ b/src/ByteBuffer.cpp
@@ -117,8 +117,8 @@ bool cByteBuffer::Write(const void * a_Bytes, size_t a_Count)
size_t CurFreeSpace = GetFreeSpace();
#ifndef NDEBUG
size_t CurReadableSpace = GetReadableSpace();
+ size_t WrittenBytes = 0;
#endif
- size_t WrittenBytes = 0;
if (CurFreeSpace < a_Count)
{
@@ -135,7 +135,9 @@ bool cByteBuffer::Write(const void * a_Bytes, size_t a_Count)
memcpy(m_Buffer + m_WritePos, Bytes, TillEnd);
Bytes += TillEnd;
a_Count -= TillEnd;
- WrittenBytes = TillEnd;
+ #ifndef NDEBUG
+ WrittenBytes = TillEnd;
+ #endif
}
m_WritePos = 0;
}
@@ -145,7 +147,9 @@ bool cByteBuffer::Write(const void * a_Bytes, size_t a_Count)
{
memcpy(m_Buffer + m_WritePos, Bytes, a_Count);
m_WritePos += a_Count;
- WrittenBytes += a_Count;
+ #ifndef NDEBUG
+ WrittenBytes += a_Count;
+ #endif
}
ASSERT(GetFreeSpace() == CurFreeSpace - WrittenBytes);
diff --git a/src/Entities/Pawn.cpp b/src/Entities/Pawn.cpp
index e227dca6f..760c9c0e6 100644
--- a/src/Entities/Pawn.cpp
+++ b/src/Entities/Pawn.cpp
@@ -324,7 +324,6 @@ void cPawn::HandleFalling(void)
/* We initialize these with what the foot is really IN, because for sampling we will move down with the epsilon above */
bool IsFootInWater = IsBlockWater(BlockAtFoot);
- bool IsFootInLiquid = IsFootInWater || IsBlockLava(BlockAtFoot) || (BlockAtFoot == E_BLOCK_COBWEB); // okay so cobweb is not _technically_ a liquid...
bool IsFootOnSlimeBlock = false;
/* The "cross" we sample around to account for the player width/girth */
@@ -377,7 +376,6 @@ void cPawn::HandleFalling(void)
if (j == 0)
{
IsFootInWater |= IsBlockWater(BlockType);
- IsFootInLiquid |= IsFootInWater || IsBlockLava(BlockType) || (BlockType == E_BLOCK_COBWEB); // okay so cobweb is not _technically_ a liquid...
IsFootOnSlimeBlock |= (BlockType == E_BLOCK_SLIME_BLOCK);
}