From ff2225dee05bf62e25ce52a6d9b50198d8d31e6b Mon Sep 17 00:00:00 2001 From: "lapayo94@gmail.com" Date: Thu, 12 Jul 2012 17:26:00 +0000 Subject: http://www.mc-server.org/support/index.php?do=details&task_id=153 + simple code improvements git-svn-id: http://mc-server.googlecode.com/svn/trunk@656 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Defines.h | 6 ++++++ source/cFireSimulator.cpp | 5 +++-- source/cStairs.h | 2 +- source/cStep.h | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) (limited to 'source') diff --git a/source/Defines.h b/source/Defines.h index d0279875f..e0880ad24 100644 --- a/source/Defines.h +++ b/source/Defines.h @@ -72,6 +72,12 @@ inline bool IsBlockLava(char a_BlockID) } +inline bool IsBlockLiquid(char a_BlockID) +{ + return IsBlockWater(a_BlockID) || IsBlockLava(a_BlockID); +} + + diff --git a/source/cFireSimulator.cpp b/source/cFireSimulator.cpp index 8b6710b74..da447a01f 100644 --- a/source/cFireSimulator.cpp +++ b/source/cFireSimulator.cpp @@ -88,10 +88,11 @@ bool cFireSimulator::IsBurnable( char a_BlockID ) return a_BlockID == E_BLOCK_PLANKS || a_BlockID == E_BLOCK_LEAVES || a_BlockID == E_BLOCK_LOG - || a_BlockID == E_BLOCK_WHITE_CLOTH + || a_BlockID == E_BLOCK_WOOL || a_BlockID == E_BLOCK_BOOKCASE || a_BlockID == E_BLOCK_FENCE - || a_BlockID == E_BLOCK_TNT; + || a_BlockID == E_BLOCK_TNT + || a_BlockID == E_BLOCK_VINES; } bool cFireSimulator::FiresForever( char a_BlockID ) diff --git a/source/cStairs.h b/source/cStairs.h index d796dc56d..e17f4abc1 100644 --- a/source/cStairs.h +++ b/source/cStairs.h @@ -6,7 +6,7 @@ public: static char RotationToMetaData( float a_Rotation, int a_Direction ) //tolua_export { //tolua_export a_Rotation += 90 + 45; // So its not aligned with axis - int result = 0x0; + char result = 0x0; if( a_Direction == 0) { diff --git a/source/cStep.h b/source/cStep.h index 9fe0131ed..482bb9b7b 100644 --- a/source/cStep.h +++ b/source/cStep.h @@ -5,7 +5,7 @@ class cStep //tolua_export public: static char DirectionToMetaData( int a_Direction ) //tolua_export { //tolua_export - int result = 0x0; + char result = 0x0; if( a_Direction == 0) { result = 0x8; -- cgit v1.2.3