diff options
author | Mattes D <github@xoft.cz> | 2014-03-20 09:05:53 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-03-20 09:05:53 +0100 |
commit | fe6c03595fb2f45cb2882e4e95672f492a818502 (patch) | |
tree | 945436381916f1ac3330654f317f3ddfcb872726 /src/World.cpp | |
parent | Errors in Lua don't include the error handler in the stack trace. (diff) | |
parent | Added braces (diff) | |
download | cuberite-fe6c03595fb2f45cb2882e4e95672f492a818502.tar cuberite-fe6c03595fb2f45cb2882e4e95672f492a818502.tar.gz cuberite-fe6c03595fb2f45cb2882e4e95672f492a818502.tar.bz2 cuberite-fe6c03595fb2f45cb2882e4e95672f492a818502.tar.lz cuberite-fe6c03595fb2f45cb2882e4e95672f492a818502.tar.xz cuberite-fe6c03595fb2f45cb2882e4e95672f492a818502.tar.zst cuberite-fe6c03595fb2f45cb2882e4e95672f492a818502.zip |
Diffstat (limited to 'src/World.cpp')
-rw-r--r-- | src/World.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/World.cpp b/src/World.cpp index 012ba915b..14abaa242 100644 --- a/src/World.cpp +++ b/src/World.cpp @@ -250,8 +250,6 @@ cWorld::cWorld(const AString & a_WorldName) : m_SkyDarkness(0), m_Weather(eWeather_Sunny), m_WeatherInterval(24000), // Guaranteed 1 day of sunshine at server start :) - m_bCommandBlocksEnabled(false), - m_bUseChatPrefixes(true), m_Scoreboard(this), m_MapManager(this), m_GeneratorCallbacks(*this), @@ -579,12 +577,17 @@ void cWorld::Start(void) m_IsSugarcaneBonemealable = IniFile.GetValueSetB("Plants", "IsSugarcaneBonemealable", false); m_IsDeepSnowEnabled = IniFile.GetValueSetB("Physics", "DeepSnow", true); m_ShouldLavaSpawnFire = IniFile.GetValueSetB("Physics", "ShouldLavaSpawnFire", true); + m_TNTShrapnelLevel = (eShrapnelLevel)IniFile.GetValueSetI("Physics", "TNTShrapnelLevel", 2); m_bCommandBlocksEnabled = IniFile.GetValueSetB("Mechanics", "CommandBlocksEnabled", false); m_bEnabledPVP = IniFile.GetValueSetB("Mechanics", "PVPEnabled", true); m_bUseChatPrefixes = IniFile.GetValueSetB("Mechanics", "UseChatPrefixes", true); m_VillagersShouldHarvestCrops = IniFile.GetValueSetB("Monsters", "VillagersShouldHarvestCrops", true); m_GameMode = (eGameMode)IniFile.GetValueSetI("General", "Gamemode", m_GameMode); + if (m_TNTShrapnelLevel > slAll) + { + m_TNTShrapnelLevel = slAll; + } // Load allowed mobs: const char * DefaultMonsters = ""; @@ -1730,7 +1733,11 @@ void cWorld::SpawnPrimedTNT(double a_X, double a_Y, double a_Z, int a_FuseTicks, UNUSED(a_InitialVelocityCoeff); cTNTEntity * TNT = new cTNTEntity(a_X, a_Y, a_Z, a_FuseTicks); TNT->Initialize(this); - // TODO: Add a bit of speed in horiz and vert axes, based on the a_InitialVelocityCoeff + TNT->SetSpeed( + a_InitialVelocityCoeff * (GetTickRandomNumber(2) - 1), /** -1, 0, 1 */ + a_InitialVelocityCoeff * 2, + a_InitialVelocityCoeff * (GetTickRandomNumber(2) - 1) + ); } |