summaryrefslogtreecommitdiffstats
path: root/src/MobCensus.cpp
diff options
context:
space:
mode:
authorTycho Bickerstaff <work.tycho@gmail.com>2013-12-21 14:32:40 +0100
committerTycho Bickerstaff <work.tycho@gmail.com>2013-12-21 14:32:40 +0100
commit779aca60511055832e776ab4a6299a2b7e049a16 (patch)
treedfb031e9bd01b25ab0199286cf6e660f26489817 /src/MobCensus.cpp
parentMerge branch 'master' into cmake (diff)
parentMerge branch 'master', remote-tracking branch 'upstream/master' (diff)
downloadcuberite-779aca60511055832e776ab4a6299a2b7e049a16.tar
cuberite-779aca60511055832e776ab4a6299a2b7e049a16.tar.gz
cuberite-779aca60511055832e776ab4a6299a2b7e049a16.tar.bz2
cuberite-779aca60511055832e776ab4a6299a2b7e049a16.tar.lz
cuberite-779aca60511055832e776ab4a6299a2b7e049a16.tar.xz
cuberite-779aca60511055832e776ab4a6299a2b7e049a16.tar.zst
cuberite-779aca60511055832e776ab4a6299a2b7e049a16.zip
Diffstat (limited to 'src/MobCensus.cpp')
-rw-r--r--src/MobCensus.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/MobCensus.cpp b/src/MobCensus.cpp
index 66b5932bc..9c32bf695 100644
--- a/src/MobCensus.cpp
+++ b/src/MobCensus.cpp
@@ -19,7 +19,6 @@ void cMobCensus::CollectMob(cMonster & a_Monster, cChunk & a_Chunk, double a_Dis
bool cMobCensus::IsCapped(cMonster::eFamily a_MobFamily)
{
- bool toReturn = true;
const int ratio = 319; // this should be 256 as we are only supposed to take account from chunks that are in 17x17 from a player
// but for now, we use all chunks loaded by players. that means 19 x 19 chunks. That's why we use 256 * (19*19) / (17*17) = 319
// MG TODO : code the correct count
@@ -42,9 +41,12 @@ int cMobCensus::GetCapMultiplier(cMonster::eFamily a_MobFamily)
case cMonster::mfPassive: return 11;
case cMonster::mfAmbient: return 16;
case cMonster::mfWater: return 5;
+ default:
+ {
+ ASSERT(!"Unhandled mob family");
+ return -1;
+ }
}
- ASSERT(!"Unhandled mob family");
- return -1;
}