From a9031b6bae742b333b1b390192fa590f2ecb07ea Mon Sep 17 00:00:00 2001 From: peterbell10 Date: Mon, 5 Oct 2020 11:27:14 +0100 Subject: Fix cmake not adding Werror on clang, and _lots_ of warnings (#4963) * Fix cmake not adding Werror on clang, and _lots_ of warnings * WIP: Build fixes * Cannot make intermediate blockhandler instance * Tiger's changes * Fix BitIndex check * Handle invalid NextState values in cMultiVersionProtocol Co-authored-by: Tiger Wang --- src/Simulator/IncrementalRedstoneSimulator/PressurePlateHandler.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Simulator/IncrementalRedstoneSimulator/PressurePlateHandler.h') diff --git a/src/Simulator/IncrementalRedstoneSimulator/PressurePlateHandler.h b/src/Simulator/IncrementalRedstoneSimulator/PressurePlateHandler.h index 14d8c3017..46409b101 100644 --- a/src/Simulator/IncrementalRedstoneSimulator/PressurePlateHandler.h +++ b/src/Simulator/IncrementalRedstoneSimulator/PressurePlateHandler.h @@ -12,7 +12,7 @@ namespace PressurePlateHandler { inline unsigned char GetPowerLevel(const cChunk & Chunk, const Vector3i Position, const BLOCKTYPE BlockType) { - unsigned NumberOfEntities = 0; + Int64 NumberOfEntities = 0; bool FoundPlayer = false; Chunk.ForEachEntityInBox(cBoundingBox(Vector3d(0.5, 0, 0.5) + Position, 0.5, 0.5), [&](cEntity & Entity) @@ -39,7 +39,7 @@ namespace PressurePlateHandler } case E_BLOCK_WOODEN_PRESSURE_PLATE: { - return (NumberOfEntities != 0 ? 15 : 0); + return (NumberOfEntities > 0 ? 15 : 0); } case E_BLOCK_HEAVY_WEIGHTED_PRESSURE_PLATE: { -- cgit v1.2.3