1
0
Fork 0
+ simple code improvements

git-svn-id: http://mc-server.googlecode.com/svn/trunk@656 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
lapayo94@gmail.com 2012-07-12 17:26:00 +00:00
parent 273ddcbfff
commit ff2225dee0
5 changed files with 13 additions and 4 deletions

View File

@ -30,6 +30,7 @@ function Initialize( Plugin )
Plugin:AddCommand("/list", " - Shows list of connected players", "core.playerlist")
Plugin:AddCommand("/motd", " - Show message of the day", "core.motd")
Plugin:AddCommand("/reload", " - Reload all plugins", "core.reload")
Plugin:AddCommand("/stop", " - Stops the server", "core.stop")
Plugin:AddCommand("/time", " - [Day/Night] - Sets the time of day", "core.time")
Plugin:AddCommand("/spawn", " - Return to the spawn", "core.spawn")
Plugin:AddCommand("/kick", " - [Player] - Kick a player", "core.kick")
@ -52,6 +53,7 @@ function Initialize( Plugin )
Plugin:BindCommand( "/playerlist", "core.playerlist", HandlePlayerListCommand )
Plugin:BindCommand( "/motd", "core.motd", HandleMOTDCommand )
Plugin:BindCommand( "/reload", "core.reload", HandleReloadCommand )
Plugin:BindCommand( "/stop", "core.stop", HandleStopCommand )
Plugin:BindCommand( "/time", "core.time", HandleTimeCommand )
Plugin:BindCommand( "/spawn", "core.spawn", HandleSpawnCommand )
Plugin:BindCommand( "/home", "core.spawn", HandleSpawnCommand )

View File

@ -72,6 +72,12 @@ inline bool IsBlockLava(char a_BlockID)
}
inline bool IsBlockLiquid(char a_BlockID)
{
return IsBlockWater(a_BlockID) || IsBlockLava(a_BlockID);
}

View File

@ -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 )

View File

@ -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)
{

View File

@ -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;