summaryrefslogtreecommitdiffstats
path: root/source/MobCensus.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2013-11-27 22:35:13 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2013-11-27 22:35:13 +0100
commita6630d32394120a78af56bc612fa3c3449283248 (patch)
tree2c791266b0f213cd56961299da8d2258b8f85d8e /source/MobCensus.h
parentFixed spawn point being generally in an ocean (diff)
parentVoronoi-related biomegens use the new cVoronoiMap class. (diff)
downloadcuberite-a6630d32394120a78af56bc612fa3c3449283248.tar
cuberite-a6630d32394120a78af56bc612fa3c3449283248.tar.gz
cuberite-a6630d32394120a78af56bc612fa3c3449283248.tar.bz2
cuberite-a6630d32394120a78af56bc612fa3c3449283248.tar.lz
cuberite-a6630d32394120a78af56bc612fa3c3449283248.tar.xz
cuberite-a6630d32394120a78af56bc612fa3c3449283248.tar.zst
cuberite-a6630d32394120a78af56bc612fa3c3449283248.zip
Diffstat (limited to 'source/MobCensus.h')
-rw-r--r--source/MobCensus.h59
1 files changed, 0 insertions, 59 deletions
diff --git a/source/MobCensus.h b/source/MobCensus.h
deleted file mode 100644
index e3892bec6..000000000
--- a/source/MobCensus.h
+++ /dev/null
@@ -1,59 +0,0 @@
-
-#pragma once
-
-#include "MobProximityCounter.h"
-#include "MobFamilyCollecter.h"
-
-
-
-
-// fwd:
-class cChunk;
-class cMonster;
-
-
-
-
-
-/** This class is used to collect information, for each Mob, what is the distance of the closest player
-it was first being designed in order to make mobs spawn / despawn / act
-as the behaviour and even life of mobs depends on the distance to closest player
-
-as side effect : it also collect the chunks that are elligible for spawning
-as side effect 2 : it also know the caps for mobs number and can compare census to this numbers
-*/
-class cMobCensus
-{
-public:
- /// Returns the nested proximity counter
- cMobProximityCounter & GetProximityCounter(void);
-
- // collect an elligible Chunk for Mob Spawning
- // MG TODO : code the correct rule (not loaded chunk but short distant from players)
- void CollectSpawnableChunk(cChunk & a_Chunk);
-
- /// Collect a mob - it's distance to player, it's family ...
- void CollectMob(cMonster& a_Monster, cChunk& a_Chunk, double a_Distance);
-
- /// Returns true if the family is capped (i.e. there are more mobs of this family than max)
- bool IsCapped(cMonster::eFamily a_MobFamily);
-
- /// log the results of census to server console
- void Logd(void);
-
-protected :
- cMobProximityCounter m_ProximityCounter;
- cMobFamilyCollecter m_MobFamilyCollecter;
-
- std::set<cChunk *> m_EligibleForSpawnChunks;
-
- /// Returns the number of chunks that are elligible for spawning (for now, the loaded, valid chunks)
- int GetNumChunks();
-
- /// Returns the cap multiplier value of the given monster family
- static int GetCapMultiplier(cMonster::eFamily a_MobFamily);
-} ;
-
-
-
-