summaryrefslogtreecommitdiffstats
path: root/src/BlockEntities
diff options
context:
space:
mode:
Diffstat (limited to 'src/BlockEntities')
-rw-r--r--src/BlockEntities/ChestEntity.h2
-rw-r--r--src/BlockEntities/MobSpawnerEntity.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/BlockEntities/ChestEntity.h b/src/BlockEntities/ChestEntity.h
index 8953644e6..0b499350f 100644
--- a/src/BlockEntities/ChestEntity.h
+++ b/src/BlockEntities/ChestEntity.h
@@ -66,7 +66,7 @@ private:
GetWindow()->BroadcastWholeWindow();
}
- m_World->MarkChunkDirty(GetChunkX(), GetChunkZ());
+ m_World->QueueTask([this](cWorld & a_World) { a_World.MarkChunkDirty(GetChunkX(), GetChunkZ()); });
}
}
diff --git a/src/BlockEntities/MobSpawnerEntity.cpp b/src/BlockEntities/MobSpawnerEntity.cpp
index 7f1b88c9b..cbf94de57 100644
--- a/src/BlockEntities/MobSpawnerEntity.cpp
+++ b/src/BlockEntities/MobSpawnerEntity.cpp
@@ -163,7 +163,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;
@@ -171,7 +171,7 @@ void cMobSpawnerEntity::SpawnEntity(void)
Monster->SetPosition(PosX, RelY, PosZ);
Monster->SetYaw(Random.NextFloat() * 360.0f);
- if (Chunk->GetWorld()->SpawnMobFinalize(Monster) != cEntity::INVALID_ID)
+ if (Chunk->GetWorld()->SpawnMobFinalize(std::move(Monster)) != cEntity::INVALID_ID)
{
EntitiesSpawned = true;
Chunk->BroadcastSoundParticleEffect(