Merge branch 'master' into PerWorldThreads

master
madmaxoft 2013-08-12 07:46:41 +02:00
commit 79ece8eb0d
5 changed files with 27 additions and 18 deletions

View File

@ -15,7 +15,19 @@ function HandleWeatherCommand(Split, Player)
Player:GetWorld():SetWeather(2) Player:GetWorld():SetWeather(2)
SendMessageSuccess( Player, "Thundery showers activate!") SendMessageSuccess( Player, "Thundery showers activate!")
end end
return true return true
end end
function HandleDownfallCommand( Split, Player )
World = Player:GetWorld()
if World:GetWeather() == 0 then
World:SetWeather(1)
else
World:SetWeather(0)
end
SendMessageSuccess( Player, "Downfall Toggled")
end

View File

@ -32,7 +32,7 @@ public:
virtual bool DoesAllowBlockOnTop(void) override virtual bool DoesAllowBlockOnTop(void) override
{ {
return false; return true;
} }

View File

@ -109,21 +109,11 @@ public:
static bool CanBePlacedOn(BLOCKTYPE a_BlockType, char a_Direction) static bool CanBePlacedOn(BLOCKTYPE a_BlockType, char a_Direction)
{ {
switch (a_BlockType) if ( g_BlockIsSolid[a_BlockType] ) {
{ return (a_Direction == 0x1); // allow only direction "standing on floor"
case E_BLOCK_GLASS: }
case E_BLOCK_FENCE: else {
case E_BLOCK_NETHER_BRICK_FENCE: return g_BlockIsSolid[a_BlockType];
case E_BLOCK_PISTON:
case E_BLOCK_WORKBENCH:
{
return (a_Direction == 0x1); // allow only direction "standing on floor"
}
default:
{
return g_BlockIsSolid[a_BlockType];
}
} }
} }

View File

@ -207,7 +207,7 @@ void cComposableGenerator::InitBiomeGen(cIniFile & a_IniFile)
); );
CacheSize = 4; CacheSize = 4;
} }
LOGINFO("Using a cache for biomegen of size %d.", CacheSize); LOGD("Using a cache for biomegen of size %d.", CacheSize);
m_UnderlyingBiomeGen = m_BiomeGen; m_UnderlyingBiomeGen = m_BiomeGen;
m_BiomeGen = new cBioGenCache(m_UnderlyingBiomeGen, CacheSize); m_BiomeGen = new cBioGenCache(m_UnderlyingBiomeGen, CacheSize);
} }

View File

@ -744,6 +744,13 @@ void cWorld::TickSpawnMobs(float a_Dt)
case 6: MobType = E_ENTITY_TYPE_ZOMBIE_PIGMAN; break; case 6: MobType = E_ENTITY_TYPE_ZOMBIE_PIGMAN; break;
} }
} }
else if (GetBiomeAt((int)SpawnPos.x, (int)SpawnPos.z) == biSky)
{
switch (nightRand)
{
case 5: MobType = E_ENTITY_TYPE_ENDERMAN; break;
}
}
else else
{ {
switch (nightRand) switch (nightRand)