summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-09-08 20:15:29 +0200
committerTycho <work.tycho+git@gmail.com>2014-09-08 20:15:29 +0200
commitfb20c2eb854799972822c702bc12fb5ca577897c (patch)
treef8aee4561aafebd137926963ab17121b9022621b /src
parentTimeOfDay does not need to be an Int64 (diff)
downloadcuberite-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
Diffstat (limited to 'src')
-rw-r--r--src/World.cpp10
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);
}
}