diff options
author | Tycho <work.tycho+git@gmail.com> | 2014-09-08 20:15:29 +0200 |
---|---|---|
committer | Tycho <work.tycho+git@gmail.com> | 2014-09-08 20:15:29 +0200 |
commit | fb20c2eb854799972822c702bc12fb5ca577897c (patch) | |
tree | f8aee4561aafebd137926963ab17121b9022621b | |
parent | TimeOfDay does not need to be an Int64 (diff) | |
download | cuberite-fb20c2eb854799972822c702bc12fb5ca577897c.tar cuberite-fb20c2eb854799972822c702bc12fb5ca577897c.tar.gz cuberite-fb20c2eb854799972822c702bc12fb5ca577897c.tar.bz2 cuberite-fb20c2eb854799972822c702bc12fb5ca577897c.tar.lz cuberite-fb20c2eb854799972822c702bc12fb5ca577897c.tar.xz cuberite-fb20c2eb854799972822c702bc12fb5ca577897c.tar.zst cuberite-fb20c2eb854799972822c702bc12fb5ca577897c.zip |
-rw-r--r-- | src/World.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/World.cpp b/src/World.cpp index e6f967a1b..1d0969dfa 100644 --- a/src/World.cpp +++ b/src/World.cpp @@ -757,6 +757,11 @@ void cWorld::InitialiseGeneratorDefaults(cIniFile & a_IniFile) a_IniFile.GetValueSet("Generator", "BottomLavaHeight", "30"); break; } + case dimNotSet: + { + assert(!"Dimension not set"); + break; + } } } @@ -772,6 +777,7 @@ void cWorld::InitialiseAndLoadMobSpawningValues(cIniFile & a_IniFile) case dimOverworld: DefaultMonsters = "bat, cavespider, chicken, cow, creeper, enderman, horse, mooshroom, ocelot, pig, sheep, silverfish, skeleton, slime, spider, squid, wolf, zombie"; break; case dimNether: DefaultMonsters = "blaze, ghast, magmacube, skeleton, zombie, zombiepigman"; break; case dimEnd: DefaultMonsters = "enderman"; break; + case dimNotSet: assert(!"Dimension not set"); break; } m_bAnimals = a_IniFile.GetValueSetB("Monsters", "AnimalsOn", true); @@ -1130,7 +1136,7 @@ void cWorld::UpdateSkyDarkness(void) } else if (TempTime <= TIME_NIGHT_START) { - m_SkyDarkness = (TIME_NIGHT_START - TempTime) / TIME_SPAWN_DIVISOR; + m_SkyDarkness = static_cast<NIBBLETYPE>((TIME_NIGHT_START - TempTime) / TIME_SPAWN_DIVISOR); } else if (TempTime <= TIME_NIGHT_END) { @@ -1138,7 +1144,7 @@ void cWorld::UpdateSkyDarkness(void) } else { - m_SkyDarkness = (TIME_SUNRISE - TempTime) / TIME_SPAWN_DIVISOR; + m_SkyDarkness = static_cast<NIBBLETYPE>((TIME_SUNRISE - TempTime) / TIME_SPAWN_DIVISOR); } } |