summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Silverfish.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Mobs/Silverfish.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/Mobs/Silverfish.cpp b/src/Mobs/Silverfish.cpp
index 37684f8bc..76407151e 100644
--- a/src/Mobs/Silverfish.cpp
+++ b/src/Mobs/Silverfish.cpp
@@ -13,7 +13,15 @@
cSilverfish::cSilverfish() :
- Super("Silverfish", mtSilverfish, "entity.silverfish.hurt", "entity.silverfish.death", "entity.silverfish.ambient", 0.4f, 0.3f)
+ Super(
+ "Silverfish",
+ mtSilverfish,
+ "entity.silverfish.hurt",
+ "entity.silverfish.death",
+ "entity.silverfish.ambient",
+ 0.4f,
+ 0.3f
+ )
{
}
@@ -21,7 +29,7 @@ cSilverfish::cSilverfish() :
-bool cSilverfish::DoTakeDamage(TakeDamageInfo &a_TDI)
+bool cSilverfish::DoTakeDamage(TakeDamageInfo & a_TDI)
{
// Call on our brethren to attack!
// TODO: stop this if /gamerule mobGriefing is set to false
@@ -76,7 +84,7 @@ bool cSilverfish::DoTakeDamage(TakeDamageInfo &a_TDI)
{
for (int OffsetZ = -HalfSide; OffsetZ <= HalfSide; OffsetZ++)
{
- if (CheckInfested({ OffsetX, +HalfSide, OffsetZ }) || CheckInfested({ OffsetX, -HalfSide, OffsetZ }))
+ if (CheckInfested({OffsetX, +HalfSide, OffsetZ}) || CheckInfested({OffsetX, -HalfSide, OffsetZ}))
{
return true;
}
@@ -87,7 +95,7 @@ bool cSilverfish::DoTakeDamage(TakeDamageInfo &a_TDI)
{
for (int OffsetY = -HalfSide + 1; OffsetY <= HalfSide - 1; OffsetY++)
{
- if (CheckInfested({ OffsetX, OffsetY, +HalfSide }) || CheckInfested({ OffsetX, OffsetY, -HalfSide }))
+ if (CheckInfested({OffsetX, OffsetY, +HalfSide}) || CheckInfested({OffsetX, OffsetY, -HalfSide}))
{
return true;
}
@@ -98,7 +106,7 @@ bool cSilverfish::DoTakeDamage(TakeDamageInfo &a_TDI)
{
for (int OffsetY = -HalfSide + 1; OffsetY <= HalfSide - 1; OffsetY++)
{
- if (CheckInfested({ +HalfSide, OffsetY, OffsetZ }) || CheckInfested({ -HalfSide, OffsetY, OffsetZ }))
+ if (CheckInfested({+HalfSide, OffsetY, OffsetZ}) || CheckInfested({-HalfSide, OffsetY, OffsetZ}))
{
return true;
}