diff options
author | madmaxoft <github@xoft.cz> | 2013-10-20 14:16:21 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2013-10-20 14:16:21 +0200 |
commit | b6741865f2bb541699d04f128a5389d7b8a4babe (patch) | |
tree | c9671f34b5def39dab2589a04a44302ad3d5aabc /source/MobFamilyCollecter.cpp | |
parent | Reimplemented cMonster::FamilyFromType() as a simple switch (duh!) (diff) | |
download | cuberite-b6741865f2bb541699d04f128a5389d7b8a4babe.tar cuberite-b6741865f2bb541699d04f128a5389d7b8a4babe.tar.gz cuberite-b6741865f2bb541699d04f128a5389d7b8a4babe.tar.bz2 cuberite-b6741865f2bb541699d04f128a5389d7b8a4babe.tar.lz cuberite-b6741865f2bb541699d04f128a5389d7b8a4babe.tar.xz cuberite-b6741865f2bb541699d04f128a5389d7b8a4babe.tar.zst cuberite-b6741865f2bb541699d04f128a5389d7b8a4babe.zip |
Diffstat (limited to 'source/MobFamilyCollecter.cpp')
-rw-r--r-- | source/MobFamilyCollecter.cpp | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/source/MobFamilyCollecter.cpp b/source/MobFamilyCollecter.cpp index 086fa5f40..e9c69e078 100644 --- a/source/MobFamilyCollecter.cpp +++ b/source/MobFamilyCollecter.cpp @@ -6,32 +6,7 @@ -cMobFamilyCollecter::tMobFamilyList cMobFamilyCollecter::InitMobFamilyBeforeCx11(void) -{ - std::set<cMonster::eFamily> toReturn; - toReturn.insert(cMonster::mfHostile); - toReturn.insert(cMonster::mfPassive); - toReturn.insert(cMonster::mfAmbient); - toReturn.insert(cMonster::mfWater); - return toReturn; -} - - - - - -cMobFamilyCollecter::tMobFamilyList & cMobFamilyCollecter::m_AllFamilies(void) -{ - // TODO: This memory is leaked: - static tMobFamilyList * AllFamilies = new tMobFamilyList(InitMobFamilyBeforeCx11()); - return *AllFamilies; -} - - - - - -void cMobFamilyCollecter::CollectMob(cMonster& a_Monster) +void cMobFamilyCollecter::CollectMob(cMonster & a_Monster) { cMonster::eFamily MobFamily = a_Monster.GetMobFamily(); m_Mobs[MobFamily].insert(&a_Monster); |