summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Slime.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Mobs/Slime.cpp')
-rw-r--r--src/Mobs/Slime.cpp32
1 files changed, 15 insertions, 17 deletions
diff --git a/src/Mobs/Slime.cpp b/src/Mobs/Slime.cpp
index 320fa3c8a..43761a6ee 100644
--- a/src/Mobs/Slime.cpp
+++ b/src/Mobs/Slime.cpp
@@ -10,9 +10,10 @@
cSlime::cSlime(int a_Size) :
- Super("Slime",
+ Super(
+ "Slime",
mtSlime,
- fmt::format(FMT_STRING("entity.{}slime.hurt"), GetSizeName(a_Size)),
+ fmt::format(FMT_STRING("entity.{}slime.hurt"), GetSizeName(a_Size)),
fmt::format(FMT_STRING("entity.{}slime.death"), GetSizeName(a_Size)),
"",
0.51f * a_Size,
@@ -80,17 +81,18 @@ void cSlime::KilledBy(TakeDamageInfo & a_TDI)
double AddZ = (i / 2 - 0.5) * m_Size / 4.0;
// Queue slimes to be spawned after the 1 second death animation has finished playing:
- m_World->ScheduleTask(cTickTime(20), [
- Position = GetPosition() + Vector3d(AddX, 0.5, AddZ),
- Yaw = Random.RandReal(360.0f),
- Size = m_Size / 2
- ](cWorld & a_World)
- {
- auto NewSlime = std::make_unique<cSlime>(Size);
- NewSlime->SetPosition(Position);
- NewSlime->SetYaw(Yaw);
- a_World.SpawnMobFinalize(std::move(NewSlime));
- });
+ m_World->ScheduleTask(
+ cTickTime(20),
+ [Position = GetPosition() + Vector3d(AddX, 0.5, AddZ),
+ Yaw = Random.RandReal(360.0f),
+ Size = m_Size / 2](cWorld & a_World)
+ {
+ auto NewSlime = std::make_unique<cSlime>(Size);
+ NewSlime->SetPosition(Position);
+ NewSlime->SetYaw(Yaw);
+ a_World.SpawnMobFinalize(std::move(NewSlime));
+ }
+ );
}
}
Super::KilledBy(a_TDI);
@@ -108,7 +110,3 @@ AString cSlime::GetSizeName(int a_Size)
}
return "";
}
-
-
-
-