summaryrefslogtreecommitdiffstats
path: root/source/World.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2013-10-18 12:41:43 +0200
committerMattes D <github@xoft.cz>2013-10-18 12:41:43 +0200
commit8bba2b02a132d236703835d93ab18e09e0ea7230 (patch)
treee637945c6eb845e82c4f2790c07c6fd82a1f79ef /source/World.h
parentAPIDump: Renamed output for helper stuff. (diff)
parentRemoved reading default values from settings.ini for worlds. (diff)
downloadcuberite-8bba2b02a132d236703835d93ab18e09e0ea7230.tar
cuberite-8bba2b02a132d236703835d93ab18e09e0ea7230.tar.gz
cuberite-8bba2b02a132d236703835d93ab18e09e0ea7230.tar.bz2
cuberite-8bba2b02a132d236703835d93ab18e09e0ea7230.tar.lz
cuberite-8bba2b02a132d236703835d93ab18e09e0ea7230.tar.xz
cuberite-8bba2b02a132d236703835d93ab18e09e0ea7230.tar.zst
cuberite-8bba2b02a132d236703835d93ab18e09e0ea7230.zip
Diffstat (limited to 'source/World.h')
-rw-r--r--source/World.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/World.h b/source/World.h
index 25bc0b338..a91007b17 100644
--- a/source/World.h
+++ b/source/World.h
@@ -42,6 +42,7 @@ class cChunkGenerator; // The thread responsible for generating chunks
class cChestEntity;
class cDispenserEntity;
class cFurnaceEntity;
+class cMobCensus;
typedef std::list< cPlayer * > cPlayerList;
@@ -580,6 +581,7 @@ public:
/// Spawns a mob of the specified type. Returns the mob's EntityID if recognized and spawned, <0 otherwise
int SpawnMob(double a_PosX, double a_PosY, double a_PosZ, cMonster::eType a_MonsterType); // tolua_export
+ int SpawnMobFinalize(cMonster* a_Monster);
/// Creates a projectile of the specified type. Returns the projectile's EntityID if successful, <0 otherwise
int CreateProjectile(double a_PosX, double a_PosY, double a_PosZ, cProjectileEntity::eKind a_Kind, cEntity * a_Creator, const Vector3d * a_Speed = NULL); // tolua_export
@@ -632,7 +634,7 @@ private:
Int64 m_LastTimeUpdate; // The tick in which the last time update has been sent.
Int64 m_LastUnload; // The last WorldAge (in ticks) in which unloading was triggerred
Int64 m_LastSave; // The last WorldAge (in ticks) in which save-all was triggerred
- Int64 m_LastSpawnMonster; // The last WorldAge (in ticks) in which a monster was spawned
+ std::map<cMonster::eFamily,Int64> m_LastSpawnMonster; // The last WorldAge (in ticks) in which a monster was spawned (for each megatype of monster) // MG TODO : find a way to optimize without creating unmaintenability (if mob IDs are becoming unrowed)
eGameMode m_GameMode;
bool m_bEnabledPVP;
@@ -662,7 +664,7 @@ private:
cChunkMap * m_ChunkMap;
bool m_bAnimals;
- Int64 m_SpawnMonsterRate;
+ std::set<cMonster::eType> m_AllowedMobs;
eWeather m_Weather;
int m_WeatherInterval;
@@ -717,8 +719,8 @@ private:
/// Handles the weather in each tick
void TickWeather(float a_Dt);
- /// Handles the mob spawning each tick
- void TickSpawnMobs(float a_Dt);
+ /// Handles the mob spawning/moving/destroying each tick
+ void TickMobs(float a_Dt);
/// Executes all tasks queued onto the tick thread
void TickQueuedTasks(void);