Very minor code changes
This commit is contained in:
parent
cea3a8e7e8
commit
60a37c1370
@ -108,7 +108,7 @@ void cBlockBedHandler::OnUse(cChunkInterface & a_ChunkInterface, cWorldInterface
|
|||||||
NIBBLETYPE Meta = a_ChunkInterface.GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ);
|
NIBBLETYPE Meta = a_ChunkInterface.GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ);
|
||||||
if (Meta & 0x4)
|
if (Meta & 0x4)
|
||||||
{
|
{
|
||||||
a_Player->SendMessageFailure("This bed is occupied.");
|
a_Player->SendMessageFailure("This bed is occupied");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -55,7 +55,7 @@ public:
|
|||||||
|
|
||||||
virtual bool CanBeAt(cChunkInterface & a_ChunkInterface, int a_RelX, int a_RelY, int a_RelZ, const cChunk & a_Chunk) override
|
virtual bool CanBeAt(cChunkInterface & a_ChunkInterface, int a_RelX, int a_RelY, int a_RelZ, const cChunk & a_Chunk) override
|
||||||
{
|
{
|
||||||
if ((a_RelY - 1 < 0) || (a_RelY + 1 > cChunkDef::Height))
|
if ((a_RelY == 0) || (a_RelY == cChunkDef::Height)) // Y can't be < 0 or > Height; (Fast)SetBlock won't allow it
|
||||||
{
|
{
|
||||||
return false; // In case someone places a portal with meta 1 or 2 at boundaries, and server tries to get invalid coords at Y - 1 or Y + 1
|
return false; // In case someone places a portal with meta 1 or 2 at boundaries, and server tries to get invalid coords at Y - 1 or Y + 1
|
||||||
}
|
}
|
||||||
|
@ -1024,7 +1024,7 @@ void cMonster::HandleDaylightBurning(cChunk & a_Chunk)
|
|||||||
(a_Chunk.GetBlock(RelX, RelY, RelZ) != E_BLOCK_SOULSAND) && // Not on soulsand
|
(a_Chunk.GetBlock(RelX, RelY, RelZ) != E_BLOCK_SOULSAND) && // Not on soulsand
|
||||||
(GetWorld()->GetTimeOfDay() < (12000 + 1000)) && // It is nighttime
|
(GetWorld()->GetTimeOfDay() < (12000 + 1000)) && // It is nighttime
|
||||||
!IsOnFire() && // Not already burning
|
!IsOnFire() && // Not already burning
|
||||||
(GetWorld()->GetWeather() != eWeather_Rain) // Not raining
|
(GetWorld()->IsWeatherWet()) // Not raining
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Burn for 100 ticks, then decide again
|
// Burn for 100 ticks, then decide again
|
||||||
|
Loading…
x
Reference in New Issue
Block a user