summaryrefslogtreecommitdiffstats
path: root/source/Mobs/Monster.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-10-20 14:00:45 +0200
committermadmaxoft <github@xoft.cz>2013-10-20 14:00:45 +0200
commit6075f7cecd7c1a1f283c98eb0feeb746402a7c00 (patch)
tree2721948dd7d5308d96ddf380a1e2540caa50b55b /source/Mobs/Monster.cpp
parentFixed binary search in StringToMobType(). (diff)
downloadcuberite-6075f7cecd7c1a1f283c98eb0feeb746402a7c00.tar
cuberite-6075f7cecd7c1a1f283c98eb0feeb746402a7c00.tar.gz
cuberite-6075f7cecd7c1a1f283c98eb0feeb746402a7c00.tar.bz2
cuberite-6075f7cecd7c1a1f283c98eb0feeb746402a7c00.tar.lz
cuberite-6075f7cecd7c1a1f283c98eb0feeb746402a7c00.tar.xz
cuberite-6075f7cecd7c1a1f283c98eb0feeb746402a7c00.tar.zst
cuberite-6075f7cecd7c1a1f283c98eb0feeb746402a7c00.zip
Diffstat (limited to '')
-rw-r--r--source/Mobs/Monster.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/Mobs/Monster.cpp b/source/Mobs/Monster.cpp
index ffc42cb07..c5b116db4 100644
--- a/source/Mobs/Monster.cpp
+++ b/source/Mobs/Monster.cpp
@@ -616,6 +616,23 @@ cMonster::eFamily cMonster::FamilyFromType(eType a_Type)
+int cMonster::GetSpawnRate(cMonster::eFamily a_MobFamily)
+{
+ switch (a_MobFamily)
+ {
+ case mfHostile: return 1;
+ case mfPassive: return 400;
+ case mfAmbient: return 400;
+ case mfWater: return 400;
+ }
+ ASSERT(!"Unhandled mob family");
+ return -1;
+}
+
+
+
+
+
cMonster * cMonster::NewMonsterFromType(cMonster::eType a_MobType, int a_Size)
{
cFastRandom Random;