diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2016-08-20 14:34:29 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2016-08-20 14:34:29 +0200 |
commit | 7175b9e435a54cff33914d21384625a445cc5cf0 (patch) | |
tree | 7feb44f1e8e4ed7ea4d5bf0ba1d173abd3417f34 /src/MobSpawner.h | |
parent | Added cWorld:SetSpawn() API and Lua binding (#3316) (diff) | |
download | cuberite-7175b9e435a54cff33914d21384625a445cc5cf0.tar cuberite-7175b9e435a54cff33914d21384625a445cc5cf0.tar.gz cuberite-7175b9e435a54cff33914d21384625a445cc5cf0.tar.bz2 cuberite-7175b9e435a54cff33914d21384625a445cc5cf0.tar.lz cuberite-7175b9e435a54cff33914d21384625a445cc5cf0.tar.xz cuberite-7175b9e435a54cff33914d21384625a445cc5cf0.tar.zst cuberite-7175b9e435a54cff33914d21384625a445cc5cf0.zip |
Diffstat (limited to 'src/MobSpawner.h')
-rw-r--r-- | src/MobSpawner.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/MobSpawner.h b/src/MobSpawner.h index 3a2776df4..935ded519 100644 --- a/src/MobSpawner.h +++ b/src/MobSpawner.h @@ -38,7 +38,7 @@ public : If this is the first of a Pack, determine the type of monster a_Biome, BlockType & BlockMeta are used to decide what kind of Mob can Spawn here a_MaxPackSize is set to the maximal size for a pack this type of mob */ - cMonster * TryToSpawnHere(cChunk * a_Chunk, int A_RelX, int a_RelY, int a_RelZ, EMCSBiome a_Biome, int & a_MaxPackSize); + std::unique_ptr<cMonster> TryToSpawnHere(cChunk * a_Chunk, int A_RelX, int a_RelY, int a_RelZ, EMCSBiome a_Biome, int & a_MaxPackSize); /** Mark the beginning of a new Pack. All mobs of the same Pack are the same type */ @@ -47,7 +47,7 @@ public : // return true if there is at least one allowed type bool CanSpawnAnything(void); - typedef const std::set<cMonster *> tSpawnedContainer; + typedef const std::set<std::unique_ptr<cMonster>> tSpawnedContainer; tSpawnedContainer & getSpawned(void); /** Returns true if specified type of mob can spawn on specified block */ @@ -65,7 +65,7 @@ protected : std::set<eMonsterType> m_AllowedTypes; bool m_NewPack; eMonsterType m_MobType; - std::set<cMonster*> m_Spawned; + std::set<std::unique_ptr<cMonster>> m_Spawned; cFastRandom m_Random; } ; |