diff options
Diffstat (limited to '')
-rw-r--r-- | src/BlockEntities/MobSpawnerEntity.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/BlockEntities/MobSpawnerEntity.cpp b/src/BlockEntities/MobSpawnerEntity.cpp index 9cc6f20c6..5246ae6ca 100644 --- a/src/BlockEntities/MobSpawnerEntity.cpp +++ b/src/BlockEntities/MobSpawnerEntity.cpp @@ -178,7 +178,7 @@ void cMobSpawnerEntity::SpawnEntity(void) double PosX = Chunk->GetPosX() * cChunkDef::Width + RelX; double PosZ = Chunk->GetPosZ() * cChunkDef::Width + RelZ; - cMonster * Monster = cMonster::NewMonsterFromType(m_MobType); + auto Monster = cMonster::NewMonsterFromType(m_MobType); if (Monster == nullptr) { continue; @@ -186,7 +186,7 @@ void cMobSpawnerEntity::SpawnEntity(void) Monster->SetPosition(PosX, RelY, PosZ); Monster->SetYaw(Random.RandReal(360.0f)); - if (Chunk->GetWorld()->SpawnMobFinalize(Monster) != cEntity::INVALID_ID) + if (Chunk->GetWorld()->SpawnMobFinalize(std::move(Monster)) != cEntity::INVALID_ID) { EntitiesSpawned = true; Chunk->BroadcastSoundParticleEffect( |