summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Monster.cpp
diff options
context:
space:
mode:
authorpeterbell10 <peterbell10@live.co.uk>2017-09-14 10:48:57 +0200
committerAlexander Harkness <me@bearbin.net>2017-09-14 10:48:57 +0200
commit307e7aaff5c454b703db4d536c40d5715d96032b (patch)
treee217d6a073e6b87aaeb6618a933676d3251b9355 /src/Mobs/Monster.cpp
parentUpdated compile.sh script (#4009) (diff)
downloadcuberite-307e7aaff5c454b703db4d536c40d5715d96032b.tar
cuberite-307e7aaff5c454b703db4d536c40d5715d96032b.tar.gz
cuberite-307e7aaff5c454b703db4d536c40d5715d96032b.tar.bz2
cuberite-307e7aaff5c454b703db4d536c40d5715d96032b.tar.lz
cuberite-307e7aaff5c454b703db4d536c40d5715d96032b.tar.xz
cuberite-307e7aaff5c454b703db4d536c40d5715d96032b.tar.zst
cuberite-307e7aaff5c454b703db4d536c40d5715d96032b.zip
Diffstat (limited to '')
-rw-r--r--src/Mobs/Monster.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp
index 944e8aa94..2ff1f74d8 100644
--- a/src/Mobs/Monster.cpp
+++ b/src/Mobs/Monster.cpp
@@ -1034,10 +1034,12 @@ cMonster::eFamily cMonster::FamilyFromType(eMonsterType a_Type)
case mtZombie: return mfHostile;
case mtZombiePigman: return mfHostile;
- case mtInvalidType: break;
+ default:
+ {
+ ASSERT(!"Unhandled mob type");
+ return mfUnhandled;
+ }
}
- ASSERT(!"Unhandled mob type");
- return mfUnhandled;
}
@@ -1053,10 +1055,12 @@ int cMonster::GetSpawnDelay(cMonster::eFamily a_MobFamily)
case mfAmbient: return 40;
case mfWater: return 400;
case mfNoSpawn: return -1;
- case mfUnhandled: break;
+ default:
+ {
+ ASSERT(!"Unhandled mob family");
+ return -1;
+ }
}
- ASSERT(!"Unhandled mob family");
- return -1;
}