summaryrefslogtreecommitdiffstats
path: root/src/Mobs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Mobs/AggressiveMonster.cpp8
-rw-r--r--src/Mobs/AggressiveMonster.h14
-rw-r--r--src/Mobs/Bat.cpp2
-rw-r--r--src/Mobs/Bat.h7
-rw-r--r--src/Mobs/Blaze.cpp4
-rw-r--r--src/Mobs/Blaze.h7
-rw-r--r--src/Mobs/CaveSpider.cpp6
-rw-r--r--src/Mobs/CaveSpider.h7
-rw-r--r--src/Mobs/Chicken.cpp6
-rw-r--r--src/Mobs/Chicken.h7
-rw-r--r--src/Mobs/Cow.cpp4
-rw-r--r--src/Mobs/Cow.h5
-rw-r--r--src/Mobs/Creeper.cpp8
-rw-r--r--src/Mobs/Creeper.h7
-rw-r--r--src/Mobs/EnderDragon.cpp2
-rw-r--r--src/Mobs/EnderDragon.h7
-rw-r--r--src/Mobs/Enderman.cpp8
-rw-r--r--src/Mobs/Enderman.h7
-rw-r--r--src/Mobs/Ghast.cpp6
-rw-r--r--src/Mobs/Ghast.h7
-rw-r--r--src/Mobs/Giant.cpp2
-rw-r--r--src/Mobs/Giant.h5
-rw-r--r--src/Mobs/Guardian.cpp4
-rw-r--r--src/Mobs/Guardian.h5
-rw-r--r--src/Mobs/Horse.cpp10
-rw-r--r--src/Mobs/Horse.h5
-rw-r--r--src/Mobs/IronGolem.cpp2
-rw-r--r--src/Mobs/IronGolem.h7
-rw-r--r--src/Mobs/MagmaCube.cpp2
-rw-r--r--src/Mobs/MagmaCube.h5
-rw-r--r--src/Mobs/Monster.cpp18
-rw-r--r--src/Mobs/Monster.h10
-rw-r--r--src/Mobs/Mooshroom.cpp2
-rw-r--r--src/Mobs/Mooshroom.h7
-rw-r--r--src/Mobs/Ocelot.cpp10
-rw-r--r--src/Mobs/Ocelot.h4
-rw-r--r--src/Mobs/PassiveAggressiveMonster.cpp4
-rw-r--r--src/Mobs/PassiveAggressiveMonster.h15
-rw-r--r--src/Mobs/PassiveMonster.cpp10
-rw-r--r--src/Mobs/PassiveMonster.h15
-rw-r--r--src/Mobs/Pig.cpp8
-rw-r--r--src/Mobs/Pig.h7
-rw-r--r--src/Mobs/Rabbit.cpp2
-rw-r--r--src/Mobs/Rabbit.h5
-rw-r--r--src/Mobs/Sheep.cpp6
-rw-r--r--src/Mobs/Sheep.h4
-rw-r--r--src/Mobs/Silverfish.h9
-rw-r--r--src/Mobs/Skeleton.cpp4
-rw-r--r--src/Mobs/Skeleton.h7
-rw-r--r--src/Mobs/Slime.cpp6
-rw-r--r--src/Mobs/Slime.h5
-rw-r--r--src/Mobs/SnowGolem.cpp4
-rw-r--r--src/Mobs/SnowGolem.h7
-rw-r--r--src/Mobs/Spider.cpp6
-rw-r--r--src/Mobs/Spider.h7
-rw-r--r--src/Mobs/Squid.cpp4
-rw-r--r--src/Mobs/Squid.h5
-rw-r--r--src/Mobs/Villager.cpp8
-rw-r--r--src/Mobs/Villager.h4
-rw-r--r--src/Mobs/Witch.cpp2
-rw-r--r--src/Mobs/Witch.h5
-rw-r--r--src/Mobs/Wither.cpp8
-rw-r--r--src/Mobs/Wither.h7
-rw-r--r--src/Mobs/WitherSkeleton.cpp6
-rw-r--r--src/Mobs/WitherSkeleton.h7
-rw-r--r--src/Mobs/Wolf.cpp8
-rw-r--r--src/Mobs/Wolf.h7
-rw-r--r--src/Mobs/Zombie.cpp2
-rw-r--r--src/Mobs/Zombie.h5
-rw-r--r--src/Mobs/ZombiePigman.cpp6
-rw-r--r--src/Mobs/ZombiePigman.h7
-rw-r--r--src/Mobs/ZombieVillager.cpp6
-rw-r--r--src/Mobs/ZombieVillager.h5
73 files changed, 261 insertions, 199 deletions
diff --git a/src/Mobs/AggressiveMonster.cpp b/src/Mobs/AggressiveMonster.cpp
index 79300bc4a..a904ac2da 100644
--- a/src/Mobs/AggressiveMonster.cpp
+++ b/src/Mobs/AggressiveMonster.cpp
@@ -12,7 +12,7 @@
cAggressiveMonster::cAggressiveMonster(const AString & a_ConfigName, eMonsterType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, const AString & a_SoundAmbient, double a_Width, double a_Height) :
- super(a_ConfigName, a_MobType, a_SoundHurt, a_SoundDeath, a_SoundAmbient, a_Width, a_Height)
+ Super(a_ConfigName, a_MobType, a_SoundHurt, a_SoundDeath, a_SoundAmbient, a_Width, a_Height)
{
m_EMPersonality = AGGRESSIVE;
}
@@ -24,7 +24,7 @@ cAggressiveMonster::cAggressiveMonster(const AString & a_ConfigName, eMonsterTyp
// What to do if in Chasing State
void cAggressiveMonster::InStateChasing(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::InStateChasing(a_Dt, a_Chunk);
+ Super::InStateChasing(a_Dt, a_Chunk);
if (GetTarget() != nullptr)
{
@@ -43,7 +43,7 @@ void cAggressiveMonster::EventSeePlayer(cPlayer * a_Player, cChunk & a_Chunk)
return;
}
- super::EventSeePlayer(a_Player, a_Chunk);
+ Super::EventSeePlayer(a_Player, a_Chunk);
m_EMState = CHASING;
}
@@ -53,7 +53,7 @@ void cAggressiveMonster::EventSeePlayer(cPlayer * a_Player, cChunk & a_Chunk)
void cAggressiveMonster::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
diff --git a/src/Mobs/AggressiveMonster.h b/src/Mobs/AggressiveMonster.h
index bd4287819..1a4f28943 100644
--- a/src/Mobs/AggressiveMonster.h
+++ b/src/Mobs/AggressiveMonster.h
@@ -7,14 +7,22 @@
-class cAggressiveMonster :
+class cAggressiveMonster:
public cMonster
{
- typedef cMonster super;
+ using Super = cMonster;
public:
- cAggressiveMonster(const AString & a_ConfigName, eMonsterType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, const AString & a_SoundAmbient, double a_Width, double a_Height);
+ cAggressiveMonster(
+ const AString & a_ConfigName,
+ eMonsterType a_MobType,
+ const AString & a_SoundHurt,
+ const AString & a_SoundDeath,
+ const AString & a_SoundAmbient,
+ double a_Width,
+ double a_Height
+ );
virtual void Tick (std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
virtual void InStateChasing(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
diff --git a/src/Mobs/Bat.cpp b/src/Mobs/Bat.cpp
index c1e40dc42..93e117e76 100644
--- a/src/Mobs/Bat.cpp
+++ b/src/Mobs/Bat.cpp
@@ -6,7 +6,7 @@
cBat::cBat(void) :
- super("Bat", mtBat, "entity.bat.hurt", "entity.bat.death", "entity.bat.ambient", 0.5, 0.9)
+ Super("Bat", mtBat, "entity.bat.hurt", "entity.bat.death", "entity.bat.ambient", 0.5, 0.9)
{
SetGravity(-2.0f);
SetAirDrag(0.05f);
diff --git a/src/Mobs/Bat.h b/src/Mobs/Bat.h
index 2da2dc3f2..0d57cd6dd 100644
--- a/src/Mobs/Bat.h
+++ b/src/Mobs/Bat.h
@@ -7,13 +7,14 @@
-class cBat :
+class cBat:
public cPassiveMonster
{
- typedef cPassiveMonster super;
+ using Super = cPassiveMonster;
public:
- cBat(void);
+
+ cBat();
CLASS_PROTODEF(cBat)
diff --git a/src/Mobs/Blaze.cpp b/src/Mobs/Blaze.cpp
index 1c48a88d2..a87cc02fb 100644
--- a/src/Mobs/Blaze.cpp
+++ b/src/Mobs/Blaze.cpp
@@ -9,7 +9,7 @@
cBlaze::cBlaze(void) :
- super("Blaze", mtBlaze, "entity.blaze.hurt", "entity.blaze.death", "entity.blaze.ambient", 0.6, 1.8),
+ Super("Blaze", mtBlaze, "entity.blaze.hurt", "entity.blaze.death", "entity.blaze.ambient", 0.6, 1.8),
m_IsCharging(false),
m_ChargeTimer(0)
{
@@ -50,7 +50,7 @@ bool cBlaze::Attack(std::chrono::milliseconds a_Dt)
void cBlaze::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
diff --git a/src/Mobs/Blaze.h b/src/Mobs/Blaze.h
index 3e6726efa..6f1d240a9 100644
--- a/src/Mobs/Blaze.h
+++ b/src/Mobs/Blaze.h
@@ -7,13 +7,14 @@
-class cBlaze :
+class cBlaze:
public cAggressiveMonster
{
- typedef cAggressiveMonster super;
+ using Super = cAggressiveMonster;
public:
- cBlaze(void);
+
+ cBlaze();
CLASS_PROTODEF(cBlaze)
diff --git a/src/Mobs/CaveSpider.cpp b/src/Mobs/CaveSpider.cpp
index 648a8778f..ad3dda09e 100644
--- a/src/Mobs/CaveSpider.cpp
+++ b/src/Mobs/CaveSpider.cpp
@@ -8,7 +8,7 @@
cCaveSpider::cCaveSpider(void) :
- super("CaveSpider", mtCaveSpider, "entity.spider.hurt", "entity.spider.death", "entity.spider.ambient", 0.7, 0.5)
+ Super("CaveSpider", mtCaveSpider, "entity.spider.hurt", "entity.spider.death", "entity.spider.ambient", 0.7, 0.5)
{
}
@@ -18,7 +18,7 @@ cCaveSpider::cCaveSpider(void) :
void cCaveSpider::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
@@ -34,7 +34,7 @@ void cCaveSpider::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
bool cCaveSpider::Attack(std::chrono::milliseconds a_Dt)
{
- if (!super::Attack(a_Dt))
+ if (!Super::Attack(a_Dt))
{
return false;
}
diff --git a/src/Mobs/CaveSpider.h b/src/Mobs/CaveSpider.h
index cf4b8e17c..3e3fef4ff 100644
--- a/src/Mobs/CaveSpider.h
+++ b/src/Mobs/CaveSpider.h
@@ -6,13 +6,14 @@
-class cCaveSpider :
+class cCaveSpider:
public cAggressiveMonster
{
- typedef cAggressiveMonster super;
+ using Super = cAggressiveMonster;
public:
- cCaveSpider(void);
+
+ cCaveSpider();
CLASS_PROTODEF(cCaveSpider)
diff --git a/src/Mobs/Chicken.cpp b/src/Mobs/Chicken.cpp
index f930aa903..71bd80af4 100644
--- a/src/Mobs/Chicken.cpp
+++ b/src/Mobs/Chicken.cpp
@@ -8,7 +8,7 @@
cChicken::cChicken(void) :
- super("Chicken", mtChicken, "entity.chicken.hurt", "entity.chicken.death", "entity.chicken.ambient", 0.4, 0.7),
+ Super("Chicken", mtChicken, "entity.chicken.hurt", "entity.chicken.death", "entity.chicken.ambient", 0.4, 0.7),
m_EggDropTimer(0)
{
SetGravity(-2.0f);
@@ -21,7 +21,7 @@ cChicken::cChicken(void) :
void cChicken::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
@@ -80,5 +80,5 @@ bool cChicken::DoTakeDamage(TakeDamageInfo & a_TDI)
return false;
}
- return super::DoTakeDamage(a_TDI);
+ return Super::DoTakeDamage(a_TDI);
}
diff --git a/src/Mobs/Chicken.h b/src/Mobs/Chicken.h
index bb12ce9b3..5e84a61c8 100644
--- a/src/Mobs/Chicken.h
+++ b/src/Mobs/Chicken.h
@@ -6,13 +6,14 @@
-class cChicken :
+class cChicken:
public cPassiveMonster
{
- typedef cPassiveMonster super;
+ using Super = cPassiveMonster;
public:
- cChicken(void);
+
+ cChicken();
CLASS_PROTODEF(cChicken)
diff --git a/src/Mobs/Cow.cpp b/src/Mobs/Cow.cpp
index 559b6caea..bdbdb87d9 100644
--- a/src/Mobs/Cow.cpp
+++ b/src/Mobs/Cow.cpp
@@ -9,7 +9,7 @@
cCow::cCow(void) :
- super("Cow", mtCow, "entity.cow.hurt", "entity.cow.death", "entity.cow.ambient", 0.9, 1.3)
+ Super("Cow", mtCow, "entity.cow.hurt", "entity.cow.death", "entity.cow.ambient", 0.9, 1.3)
{
}
@@ -39,7 +39,7 @@ void cCow::GetDrops(cItems & a_Drops, cEntity * a_Killer)
void cCow::OnRightClicked(cPlayer & a_Player)
{
- super::OnRightClicked(a_Player);
+ Super::OnRightClicked(a_Player);
short HeldItem = a_Player.GetEquippedItem().m_ItemType;
if (HeldItem == E_ITEM_BUCKET)
diff --git a/src/Mobs/Cow.h b/src/Mobs/Cow.h
index 569c6e619..657c48cce 100644
--- a/src/Mobs/Cow.h
+++ b/src/Mobs/Cow.h
@@ -7,12 +7,13 @@
-class cCow :
+class cCow:
public cPassiveMonster
{
- typedef cPassiveMonster super;
+ using Super = cPassiveMonster;
public:
+
cCow();
CLASS_PROTODEF(cCow)
diff --git a/src/Mobs/Creeper.cpp b/src/Mobs/Creeper.cpp
index 75f04dc58..29b402938 100644
--- a/src/Mobs/Creeper.cpp
+++ b/src/Mobs/Creeper.cpp
@@ -11,7 +11,7 @@
cCreeper::cCreeper(void) :
- super("Creeper", mtCreeper, "entity.creeper.hurt", "entity.creeper.death", "entity.creeper.ambient", 0.6, 1.8),
+ Super("Creeper", mtCreeper, "entity.creeper.hurt", "entity.creeper.death", "entity.creeper.ambient", 0.6, 1.8),
m_bIsBlowing(false),
m_bIsCharged(false),
m_BurnedWithFlintAndSteel(false),
@@ -25,7 +25,7 @@ cCreeper::cCreeper(void) :
void cCreeper::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
@@ -103,7 +103,7 @@ void cCreeper::GetDrops(cItems & a_Drops, cEntity * a_Killer)
bool cCreeper::DoTakeDamage(TakeDamageInfo & a_TDI)
{
- if (!super::DoTakeDamage(a_TDI))
+ if (!Super::DoTakeDamage(a_TDI))
{
return false;
}
@@ -142,7 +142,7 @@ bool cCreeper::Attack(std::chrono::milliseconds a_Dt)
void cCreeper::OnRightClicked(cPlayer & a_Player)
{
- super::OnRightClicked(a_Player);
+ Super::OnRightClicked(a_Player);
if ((a_Player.GetEquippedItem().m_ItemType == E_ITEM_FLINT_AND_STEEL))
{
diff --git a/src/Mobs/Creeper.h b/src/Mobs/Creeper.h
index aea36def3..5a21cca2a 100644
--- a/src/Mobs/Creeper.h
+++ b/src/Mobs/Creeper.h
@@ -7,13 +7,14 @@
-class cCreeper :
+class cCreeper:
public cAggressiveMonster
{
- typedef cAggressiveMonster super;
+ using Super = cAggressiveMonster;
public:
- cCreeper(void);
+
+ cCreeper();
CLASS_PROTODEF(cCreeper)
diff --git a/src/Mobs/EnderDragon.cpp b/src/Mobs/EnderDragon.cpp
index 69e523f7e..d6b71552e 100644
--- a/src/Mobs/EnderDragon.cpp
+++ b/src/Mobs/EnderDragon.cpp
@@ -9,7 +9,7 @@
cEnderDragon::cEnderDragon(void) :
// TODO: Vanilla source says this, but is it right? Dragons fly, they don't stand
- super("EnderDragon", mtEnderDragon, "entity.enderdragon.hurt", "entity.enderdragon.death", "entity.enderdragon.ambient", 16.0, 8.0)
+ Super("EnderDragon", mtEnderDragon, "entity.enderdragon.hurt", "entity.enderdragon.death", "entity.enderdragon.ambient", 16.0, 8.0)
{
}
diff --git a/src/Mobs/EnderDragon.h b/src/Mobs/EnderDragon.h
index 43acdcd54..1856d165c 100644
--- a/src/Mobs/EnderDragon.h
+++ b/src/Mobs/EnderDragon.h
@@ -7,13 +7,14 @@
-class cEnderDragon :
+class cEnderDragon:
public cAggressiveMonster
{
- typedef cAggressiveMonster super;
+ using Super = cAggressiveMonster;
public:
- cEnderDragon(void);
+
+ cEnderDragon();
CLASS_PROTODEF(cEnderDragon)
diff --git a/src/Mobs/Enderman.cpp b/src/Mobs/Enderman.cpp
index d5d5112c8..aa7c00bdd 100644
--- a/src/Mobs/Enderman.cpp
+++ b/src/Mobs/Enderman.cpp
@@ -73,7 +73,7 @@ protected:
cEnderman::cEnderman(void) :
- super("Enderman", mtEnderman, "entity.endermen.hurt", "entity.endermen.death", "entity.endermen.ambient", 0.5, 2.9),
+ Super("Enderman", mtEnderman, "entity.endermen.hurt", "entity.endermen.death", "entity.endermen.ambient", 0.5, 2.9),
m_bIsScreaming(false),
m_CarriedBlock(E_BLOCK_AIR),
m_CarriedMeta(0)
@@ -131,7 +131,7 @@ void cEnderman::CheckEventSeePlayer(cChunk & a_Chunk)
void cEnderman::CheckEventLostPlayer(void)
{
- super::CheckEventLostPlayer();
+ Super::CheckEventLostPlayer();
EventLosePlayer();
}
@@ -141,7 +141,7 @@ void cEnderman::CheckEventLostPlayer(void)
void cEnderman::EventLosePlayer()
{
- super::EventLosePlayer();
+ Super::EventLosePlayer();
m_bIsScreaming = false;
GetWorld()->BroadcastEntityMetadata(*this);
}
@@ -152,7 +152,7 @@ void cEnderman::EventLosePlayer()
void cEnderman::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
diff --git a/src/Mobs/Enderman.h b/src/Mobs/Enderman.h
index 4f3f26119..fa3b0d06b 100644
--- a/src/Mobs/Enderman.h
+++ b/src/Mobs/Enderman.h
@@ -7,13 +7,14 @@
-class cEnderman :
+class cEnderman:
public cPassiveAggressiveMonster
{
- typedef cPassiveAggressiveMonster super;
+ using Super = cPassiveAggressiveMonster;
public:
- cEnderman(void);
+
+ cEnderman();
CLASS_PROTODEF(cEnderman)
diff --git a/src/Mobs/Ghast.cpp b/src/Mobs/Ghast.cpp
index 40a7bdf0f..88b10294a 100644
--- a/src/Mobs/Ghast.cpp
+++ b/src/Mobs/Ghast.cpp
@@ -9,7 +9,7 @@
cGhast::cGhast(void) :
- super("Ghast", mtGhast, "entity.ghast.hurt", "entity.ghast.death", "entity.ghast.ambient", 4, 4),
+ Super("Ghast", mtGhast, "entity.ghast.hurt", "entity.ghast.death", "entity.ghast.ambient", 4, 4),
m_IsCharging(false),
m_FlightCooldown(5),
m_TicksUntilShot(10)
@@ -64,7 +64,7 @@ bool cGhast::DoTakeDamage(TakeDamageInfo & a_TDI)
return false;
}
- return super::DoTakeDamage(a_TDI);
+ return Super::DoTakeDamage(a_TDI);
}
@@ -73,7 +73,7 @@ bool cGhast::DoTakeDamage(TakeDamageInfo & a_TDI)
void cGhast::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
diff --git a/src/Mobs/Ghast.h b/src/Mobs/Ghast.h
index 7312b25c9..8161b93bf 100644
--- a/src/Mobs/Ghast.h
+++ b/src/Mobs/Ghast.h
@@ -7,13 +7,14 @@
-class cGhast :
+class cGhast:
public cAggressiveMonster
{
- typedef cAggressiveMonster super;
+ using Super = cAggressiveMonster;
public:
- cGhast(void);
+
+ cGhast();
CLASS_PROTODEF(cGhast)
diff --git a/src/Mobs/Giant.cpp b/src/Mobs/Giant.cpp
index 35002282e..f6b36b6f7 100644
--- a/src/Mobs/Giant.cpp
+++ b/src/Mobs/Giant.cpp
@@ -8,7 +8,7 @@
cGiant::cGiant(void) :
- super("Giant", mtGiant, "entity.zombie.hurt", "entity.zombie.death", "entity.zombie.ambient", 3.6, 10.8)
+ Super("Giant", mtGiant, "entity.zombie.hurt", "entity.zombie.death", "entity.zombie.ambient", 3.6, 10.8)
{
}
diff --git a/src/Mobs/Giant.h b/src/Mobs/Giant.h
index 70e93894c..46298717c 100644
--- a/src/Mobs/Giant.h
+++ b/src/Mobs/Giant.h
@@ -7,12 +7,13 @@
-class cGiant :
+class cGiant:
public cAggressiveMonster
{
- typedef cAggressiveMonster super;
+ using Super = cAggressiveMonster;
public:
+
cGiant(void);
CLASS_PROTODEF(cGiant)
diff --git a/src/Mobs/Guardian.cpp b/src/Mobs/Guardian.cpp
index bc16e48c0..fbc10172d 100644
--- a/src/Mobs/Guardian.cpp
+++ b/src/Mobs/Guardian.cpp
@@ -9,7 +9,7 @@
cGuardian::cGuardian(void) :
- super("Guardian", mtGuardian, "entity.guardian.hurt", "entity.guardian.death", "entity.guardian.ambient", 0.875, 0.8)
+ Super("Guardian", mtGuardian, "entity.guardian.hurt", "entity.guardian.death", "entity.guardian.ambient", 0.875, 0.8)
{
}
@@ -48,7 +48,7 @@ void cGuardian::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
return;
}
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
}
diff --git a/src/Mobs/Guardian.h b/src/Mobs/Guardian.h
index 289654f57..5867c1f42 100644
--- a/src/Mobs/Guardian.h
+++ b/src/Mobs/Guardian.h
@@ -7,12 +7,13 @@
-class cGuardian :
+class cGuardian:
public cAggressiveMonster
{
- typedef cAggressiveMonster super;
+ using Super = cAggressiveMonster;
public:
+
cGuardian();
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
diff --git a/src/Mobs/Horse.cpp b/src/Mobs/Horse.cpp
index 54e4f2c59..926f125b9 100644
--- a/src/Mobs/Horse.cpp
+++ b/src/Mobs/Horse.cpp
@@ -11,7 +11,7 @@
cHorse::cHorse(int Type, int Color, int Style, int TameTimes) :
- super("Horse", mtHorse, "entity.horse.hurt", "entity.horse.death", "entity.horse.ambient", 1.4, 1.6),
+ Super("Horse", mtHorse, "entity.horse.hurt", "entity.horse.death", "entity.horse.ambient", 1.4, 1.6),
cEntityWindowOwner(this),
m_bHasChest(false),
m_bIsEating(false),
@@ -47,7 +47,7 @@ cHorse::~cHorse()
void cHorse::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
@@ -116,7 +116,7 @@ void cHorse::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
void cHorse::OnRightClicked(cPlayer & a_Player)
{
- super::OnRightClicked(a_Player);
+ Super::OnRightClicked(a_Player);
if (m_bIsTame)
{
@@ -272,7 +272,7 @@ void cHorse::InStateIdle(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
// If horse is tame and someone is sitting on it, don't walk around
if ((!m_bIsTame) || (m_Attachee == nullptr))
{
- super::InStateIdle(a_Dt, a_Chunk);
+ Super::InStateIdle(a_Dt, a_Chunk);
}
}
@@ -284,7 +284,7 @@ void cHorse::HandleSpeedFromAttachee(float a_Forward, float a_Sideways)
{
if ((m_bIsTame) && IsSaddled())
{
- super::HandleSpeedFromAttachee(a_Forward * m_MaxSpeed, a_Sideways * m_MaxSpeed);
+ Super::HandleSpeedFromAttachee(a_Forward * m_MaxSpeed, a_Sideways * m_MaxSpeed);
}
}
diff --git a/src/Mobs/Horse.h b/src/Mobs/Horse.h
index 68ad82b56..f9c236ffc 100644
--- a/src/Mobs/Horse.h
+++ b/src/Mobs/Horse.h
@@ -8,13 +8,14 @@
-class cHorse :
+class cHorse:
public cPassiveMonster,
public cEntityWindowOwner
{
- typedef cPassiveMonster super;
+ using Super = cPassiveMonster;
public:
+
cHorse(int Type, int Color, int Style, int TameTimes);
virtual ~cHorse() override;
diff --git a/src/Mobs/IronGolem.cpp b/src/Mobs/IronGolem.cpp
index 943108254..c1f6c3809 100644
--- a/src/Mobs/IronGolem.cpp
+++ b/src/Mobs/IronGolem.cpp
@@ -8,7 +8,7 @@
cIronGolem::cIronGolem(void) :
- super("IronGolem", mtIronGolem, "entity.irongolem.hurt", "entity.irongolem.death", "entity.irongolem.ambient", 1.4, 2.9)
+ Super("IronGolem", mtIronGolem, "entity.irongolem.hurt", "entity.irongolem.death", "entity.irongolem.ambient", 1.4, 2.9)
{
}
diff --git a/src/Mobs/IronGolem.h b/src/Mobs/IronGolem.h
index 7d35686e7..92b0e42fd 100644
--- a/src/Mobs/IronGolem.h
+++ b/src/Mobs/IronGolem.h
@@ -7,13 +7,14 @@
-class cIronGolem :
+class cIronGolem:
public cPassiveAggressiveMonster
{
- typedef cPassiveAggressiveMonster super;
+ using Super = cPassiveAggressiveMonster;
public:
- cIronGolem(void);
+
+ cIronGolem();
CLASS_PROTODEF(cIronGolem)
diff --git a/src/Mobs/MagmaCube.cpp b/src/Mobs/MagmaCube.cpp
index 52a4c3b07..369cda6d9 100644
--- a/src/Mobs/MagmaCube.cpp
+++ b/src/Mobs/MagmaCube.cpp
@@ -7,7 +7,7 @@
cMagmaCube::cMagmaCube(int a_Size) :
- super("MagmaCube", mtMagmaCube, Printf("entity.%smagmacube.hurt", GetSizeName(a_Size).c_str()), Printf("entity.%smagmacube.death", GetSizeName(a_Size).c_str()), "", 0.6 * a_Size, 0.6 * a_Size),
+ Super("MagmaCube", mtMagmaCube, Printf("entity.%smagmacube.hurt", GetSizeName(a_Size).c_str()), Printf("entity.%smagmacube.death", GetSizeName(a_Size).c_str()), "", 0.6 * a_Size, 0.6 * a_Size),
m_Size(a_Size)
{
}
diff --git a/src/Mobs/MagmaCube.h b/src/Mobs/MagmaCube.h
index 5fc8105ba..3a7d25055 100644
--- a/src/Mobs/MagmaCube.h
+++ b/src/Mobs/MagmaCube.h
@@ -6,12 +6,13 @@
-class cMagmaCube :
+class cMagmaCube:
public cAggressiveMonster
{
- typedef cAggressiveMonster super;
+ using Super = cAggressiveMonster;
public:
+
/** Creates a MagmaCube of the specified size; with 1 being the smallest */
cMagmaCube(int a_Size);
diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp
index 3cb1b00e8..da09050cf 100644
--- a/src/Mobs/Monster.cpp
+++ b/src/Mobs/Monster.cpp
@@ -80,7 +80,7 @@ static const struct
// cMonster:
cMonster::cMonster(const AString & a_ConfigName, eMonsterType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, const AString & a_SoundAmbient, double a_Width, double a_Height)
- : super(etMonster, a_Width, a_Height)
+ : Super(etMonster, a_Width, a_Height)
, m_EMState(IDLE)
, m_EMPersonality(AGGRESSIVE)
, m_PathFinder(a_Width, a_Height)
@@ -153,7 +153,7 @@ void cMonster::OnRemoveFromWorld(cWorld & a_World)
}
}
- super::OnRemoveFromWorld(a_World);
+ Super::OnRemoveFromWorld(a_World);
}
@@ -163,7 +163,7 @@ void cMonster::OnRemoveFromWorld(cWorld & a_World)
void cMonster::Destroyed()
{
SetTarget(nullptr); // Tell them we're no longer targeting them.
- super::Destroyed();
+ Super::Destroyed();
}
@@ -269,7 +269,7 @@ void cMonster::StopMovingToPosition()
void cMonster::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
@@ -544,7 +544,7 @@ void cMonster::SetPitchAndYawFromDestination(bool a_IsFollowingPath)
void cMonster::HandleFalling()
{
m_bTouchGround = IsOnGround();
- super::HandleFalling();
+ Super::HandleFalling();
}
@@ -582,7 +582,7 @@ int cMonster::FindFirstNonAirBlockPosition(double a_PosX, double a_PosZ)
bool cMonster::DoTakeDamage(TakeDamageInfo & a_TDI)
{
- if (!super::DoTakeDamage(a_TDI))
+ if (!Super::DoTakeDamage(a_TDI))
{
return false;
}
@@ -617,7 +617,7 @@ void cMonster::DoMoveToWorld(const cEntity::sWorldChangeInfo & a_WorldChangeInfo
SetTarget(nullptr);
StopEveryoneFromTargetingMe();
- super::DoMoveToWorld(a_WorldChangeInfo);
+ Super::DoMoveToWorld(a_WorldChangeInfo);
}
@@ -626,7 +626,7 @@ void cMonster::DoMoveToWorld(const cEntity::sWorldChangeInfo & a_WorldChangeInfo
void cMonster::KilledBy(TakeDamageInfo & a_TDI)
{
- super::KilledBy(a_TDI);
+ Super::KilledBy(a_TDI);
if (m_SoundHurt != "")
{
m_World->BroadcastSoundEffect(m_SoundDeath, GetPosition(), 1.0f, 0.8f);
@@ -707,7 +707,7 @@ void cMonster::KilledBy(TakeDamageInfo & a_TDI)
void cMonster::OnRightClicked(cPlayer & a_Player)
{
- super::OnRightClicked(a_Player);
+ Super::OnRightClicked(a_Player);
const cItem & EquippedItem = a_Player.GetEquippedItem();
if ((EquippedItem.m_ItemType == E_ITEM_NAME_TAG) && !EquippedItem.m_CustomName.empty())
diff --git a/src/Mobs/Monster.h b/src/Mobs/Monster.h
index 93c29c533..89c9871e9 100644
--- a/src/Mobs/Monster.h
+++ b/src/Mobs/Monster.h
@@ -12,10 +12,16 @@ class cClientHandle;
// tolua_begin
-class cMonster :
+class cMonster:
public cPawn
{
- typedef cPawn super;
+
+ // tolua_end
+
+ using Super = cPawn;
+
+ // tolua_begin
+
public:
enum eFamily
diff --git a/src/Mobs/Mooshroom.cpp b/src/Mobs/Mooshroom.cpp
index 135a8ba90..1190f46e9 100644
--- a/src/Mobs/Mooshroom.cpp
+++ b/src/Mobs/Mooshroom.cpp
@@ -9,7 +9,7 @@
cMooshroom::cMooshroom(void) :
- super("Mooshroom", mtMooshroom, "entity.cow.hurt", "entity.cow.death", "entity.cow.ambient", 0.9, 1.3)
+ Super("Mooshroom", mtMooshroom, "entity.cow.hurt", "entity.cow.death", "entity.cow.ambient", 0.9, 1.3)
{
}
diff --git a/src/Mobs/Mooshroom.h b/src/Mobs/Mooshroom.h
index 625963190..7ecd45c5b 100644
--- a/src/Mobs/Mooshroom.h
+++ b/src/Mobs/Mooshroom.h
@@ -7,13 +7,14 @@
-class cMooshroom :
+class cMooshroom:
public cPassiveMonster
{
- typedef cPassiveMonster super;
+ using Super = cPassiveMonster;
public:
- cMooshroom(void);
+
+ cMooshroom();
CLASS_PROTODEF(cMooshroom)
diff --git a/src/Mobs/Ocelot.cpp b/src/Mobs/Ocelot.cpp
index 3899d329c..2573808be 100644
--- a/src/Mobs/Ocelot.cpp
+++ b/src/Mobs/Ocelot.cpp
@@ -21,7 +21,7 @@
*/
cOcelot::cOcelot(void) :
- super("Ocelot", mtOcelot, "entity.cat.hurt", "entity.cat.death", "entity.cat.ambient", 0.6, 0.8),
+ Super("Ocelot", mtOcelot, "entity.cat.hurt", "entity.cat.death", "entity.cat.ambient", 0.6, 0.8),
m_IsSitting(false),
m_IsTame(false),
m_IsBegging(false),
@@ -36,7 +36,7 @@ cOcelot::cOcelot(void) :
void cOcelot::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
@@ -179,12 +179,12 @@ void cOcelot::OnRightClicked(cPlayer & a_Player)
}
else
{
- super::OnRightClicked(a_Player);
+ Super::OnRightClicked(a_Player);
}
}
else if (a_Player.GetUUID() == m_OwnerUUID)
{
- super::OnRightClicked(a_Player);
+ Super::OnRightClicked(a_Player);
SetIsSitting(!IsSitting());
}
m_World->BroadcastEntityMetadata(*this);
@@ -220,5 +220,5 @@ bool cOcelot::DoTakeDamage(TakeDamageInfo & a_TDI)
return false;
}
- return super::DoTakeDamage(a_TDI);
+ return Super::DoTakeDamage(a_TDI);
}
diff --git a/src/Mobs/Ocelot.h b/src/Mobs/Ocelot.h
index 226da228d..28deef4b4 100644
--- a/src/Mobs/Ocelot.h
+++ b/src/Mobs/Ocelot.h
@@ -8,10 +8,10 @@
-class cOcelot :
+class cOcelot:
public cPassiveMonster
{
- typedef cPassiveMonster super;
+ using Super = cPassiveMonster;
public:
diff --git a/src/Mobs/PassiveAggressiveMonster.cpp b/src/Mobs/PassiveAggressiveMonster.cpp
index 94608a0fc..bf4a3167c 100644
--- a/src/Mobs/PassiveAggressiveMonster.cpp
+++ b/src/Mobs/PassiveAggressiveMonster.cpp
@@ -10,7 +10,7 @@
cPassiveAggressiveMonster::cPassiveAggressiveMonster(const AString & a_ConfigName, eMonsterType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, const AString & a_SoundAmbient, double a_Width, double a_Height) :
- super(a_ConfigName, a_MobType, a_SoundHurt, a_SoundDeath, a_SoundAmbient, a_Width, a_Height)
+ Super(a_ConfigName, a_MobType, a_SoundHurt, a_SoundDeath, a_SoundAmbient, a_Width, a_Height)
{
m_EMPersonality = PASSIVE;
}
@@ -21,7 +21,7 @@ cPassiveAggressiveMonster::cPassiveAggressiveMonster(const AString & a_ConfigNam
bool cPassiveAggressiveMonster::DoTakeDamage(TakeDamageInfo & a_TDI)
{
- if (!super::DoTakeDamage(a_TDI))
+ if (!Super::DoTakeDamage(a_TDI))
{
return false;
}
diff --git a/src/Mobs/PassiveAggressiveMonster.h b/src/Mobs/PassiveAggressiveMonster.h
index a29da3463..f42c7a89b 100644
--- a/src/Mobs/PassiveAggressiveMonster.h
+++ b/src/Mobs/PassiveAggressiveMonster.h
@@ -7,13 +7,22 @@
-class cPassiveAggressiveMonster :
+class cPassiveAggressiveMonster:
public cAggressiveMonster
{
- typedef cAggressiveMonster super;
+ using Super = cAggressiveMonster;
public:
- cPassiveAggressiveMonster(const AString & a_ConfigName, eMonsterType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, const AString & a_SoundAmbient, double a_Width, double a_Height);
+
+ cPassiveAggressiveMonster(
+ const AString & a_ConfigName,
+ eMonsterType a_MobType,
+ const AString & a_SoundHurt,
+ const AString & a_SoundDeath,
+ const AString & a_SoundAmbient,
+ double a_Width,
+ double a_Height
+ );
virtual bool DoTakeDamage(TakeDamageInfo & a_TDI) override;
virtual void EventSeePlayer(cPlayer *, cChunk & a_Chunk) override;
diff --git a/src/Mobs/PassiveMonster.cpp b/src/Mobs/PassiveMonster.cpp
index f0043c2d4..fa2874dcf 100644
--- a/src/Mobs/PassiveMonster.cpp
+++ b/src/Mobs/PassiveMonster.cpp
@@ -11,7 +11,7 @@
cPassiveMonster::cPassiveMonster(const AString & a_ConfigName, eMonsterType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, const AString & a_SoundAmbient, double a_Width, double a_Height) :
- super(a_ConfigName, a_MobType, a_SoundHurt, a_SoundDeath, a_SoundAmbient, a_Width, a_Height),
+ Super(a_ConfigName, a_MobType, a_SoundHurt, a_SoundDeath, a_SoundAmbient, a_Width, a_Height),
m_LovePartner(nullptr),
m_LoveTimer(0),
m_LoveCooldown(0),
@@ -26,7 +26,7 @@ cPassiveMonster::cPassiveMonster(const AString & a_ConfigName, eMonsterType a_Mo
bool cPassiveMonster::DoTakeDamage(TakeDamageInfo & a_TDI)
{
- if (!super::DoTakeDamage(a_TDI))
+ if (!Super::DoTakeDamage(a_TDI))
{
return false;
}
@@ -72,7 +72,7 @@ void cPassiveMonster::Destroyed()
{
m_LovePartner->ResetLoveMode();
}
- super::Destroyed();
+ Super::Destroyed();
}
@@ -81,7 +81,7 @@ void cPassiveMonster::Destroyed()
void cPassiveMonster::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
@@ -206,7 +206,7 @@ void cPassiveMonster::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
void cPassiveMonster::OnRightClicked(cPlayer & a_Player)
{
- super::OnRightClicked(a_Player);
+ Super::OnRightClicked(a_Player);
const cItem & EquippedItem = a_Player.GetEquippedItem();
diff --git a/src/Mobs/PassiveMonster.h b/src/Mobs/PassiveMonster.h
index a0567c55b..fbe381955 100644
--- a/src/Mobs/PassiveMonster.h
+++ b/src/Mobs/PassiveMonster.h
@@ -7,13 +7,22 @@
-class cPassiveMonster :
+class cPassiveMonster:
public cMonster
{
- typedef cMonster super;
+ using Super = cMonster;
public:
- cPassiveMonster(const AString & a_ConfigName, eMonsterType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, const AString & a_SoundAmbient, double a_Width, double a_Height);
+
+ cPassiveMonster(
+ const AString & a_ConfigName,
+ eMonsterType a_MobType,
+ const AString & a_SoundHurt,
+ const AString & a_SoundDeath,
+ const AString & a_SoundAmbient,
+ double a_Width,
+ double a_Height
+ );
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
virtual void OnRightClicked(cPlayer & a_Player) override;
diff --git a/src/Mobs/Pig.cpp b/src/Mobs/Pig.cpp
index 2618882d3..1e531aebd 100644
--- a/src/Mobs/Pig.cpp
+++ b/src/Mobs/Pig.cpp
@@ -10,7 +10,7 @@
cPig::cPig(void) :
- super("Pig", mtPig, "entity.pig.hurt", "entity.pig.death", "entity.pig.ambient", 0.9, 0.9),
+ Super("Pig", mtPig, "entity.pig.hurt", "entity.pig.death", "entity.pig.ambient", 0.9, 0.9),
m_bIsSaddled(false)
{
}
@@ -44,7 +44,7 @@ void cPig::GetDrops(cItems & a_Drops, cEntity * a_Killer)
void cPig::OnRightClicked(cPlayer & a_Player)
{
- super::OnRightClicked(a_Player);
+ Super::OnRightClicked(a_Player);
if (m_bIsSaddled)
{
@@ -89,7 +89,7 @@ void cPig::OnRightClicked(cPlayer & a_Player)
void cPig::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
@@ -112,7 +112,7 @@ void cPig::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
bool cPig::DoTakeDamage(TakeDamageInfo & a_TDI)
{
- if (!super::DoTakeDamage(a_TDI))
+ if (!Super::DoTakeDamage(a_TDI))
{
return false;
}
diff --git a/src/Mobs/Pig.h b/src/Mobs/Pig.h
index ed0685e5f..fe2837bec 100644
--- a/src/Mobs/Pig.h
+++ b/src/Mobs/Pig.h
@@ -7,13 +7,14 @@
-class cPig :
+class cPig:
public cPassiveMonster
{
- typedef cPassiveMonster super;
+ using Super = cPassiveMonster;
public:
- cPig(void);
+
+ cPig();
CLASS_PROTODEF(cPig)
diff --git a/src/Mobs/Rabbit.cpp b/src/Mobs/Rabbit.cpp
index a5340c0d4..1fb9cd7d3 100644
--- a/src/Mobs/Rabbit.cpp
+++ b/src/Mobs/Rabbit.cpp
@@ -21,7 +21,7 @@ cRabbit::cRabbit(void) :
cRabbit::cRabbit(eRabbitType Type, int MoreCarrotTicks) :
- super("Rabbit", mtRabbit, "entity.rabbit.hurt", "entity.rabbit.death", "entity.rabbit.ambient", 0.82, 0.68),
+ Super("Rabbit", mtRabbit, "entity.rabbit.hurt", "entity.rabbit.death", "entity.rabbit.ambient", 0.82, 0.68),
m_Type(Type),
m_MoreCarrotTicks(MoreCarrotTicks)
{
diff --git a/src/Mobs/Rabbit.h b/src/Mobs/Rabbit.h
index 289ff0282..33a9f7fa4 100644
--- a/src/Mobs/Rabbit.h
+++ b/src/Mobs/Rabbit.h
@@ -22,12 +22,13 @@ enum class eRabbitType : UInt8
-class cRabbit :
+class cRabbit:
public cPassiveMonster
{
- typedef cPassiveMonster super;
+ using Super = cPassiveMonster;
public:
+
cRabbit();
cRabbit(eRabbitType Type, int MoreCarrotTicks = 0);
diff --git a/src/Mobs/Sheep.cpp b/src/Mobs/Sheep.cpp
index 02ca21fbe..2a6d27969 100644
--- a/src/Mobs/Sheep.cpp
+++ b/src/Mobs/Sheep.cpp
@@ -12,7 +12,7 @@
cSheep::cSheep(int a_Color) :
- super("Sheep", mtSheep, "entity.sheep.hurt", "entity.sheep.death", "entity.sheep.ambient", 0.6, 1.3),
+ Super("Sheep", mtSheep, "entity.sheep.hurt", "entity.sheep.death", "entity.sheep.ambient", 0.6, 1.3),
m_IsSheared(false),
m_WoolColor(a_Color),
m_TimeToStopEating(-1)
@@ -59,7 +59,7 @@ void cSheep::GetDrops(cItems & a_Drops, cEntity * a_Killer)
void cSheep::OnRightClicked(cPlayer & a_Player)
{
- super::OnRightClicked(a_Player);
+ Super::OnRightClicked(a_Player);
const cItem & EquippedItem = a_Player.GetEquippedItem();
if ((EquippedItem.m_ItemType == E_ITEM_SHEARS) && !IsSheared() && !IsBaby())
@@ -91,7 +91,7 @@ void cSheep::OnRightClicked(cPlayer & a_Player)
void cSheep::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
diff --git a/src/Mobs/Sheep.h b/src/Mobs/Sheep.h
index c8af067f3..c0a83f3ec 100644
--- a/src/Mobs/Sheep.h
+++ b/src/Mobs/Sheep.h
@@ -7,10 +7,10 @@
-class cSheep :
+class cSheep:
public cPassiveMonster
{
- typedef cPassiveMonster super;
+ using Super = cPassiveMonster;
public:
diff --git a/src/Mobs/Silverfish.h b/src/Mobs/Silverfish.h
index c6a4cb49a..435061f72 100644
--- a/src/Mobs/Silverfish.h
+++ b/src/Mobs/Silverfish.h
@@ -7,14 +7,15 @@
-class cSilverfish :
+class cSilverfish:
public cAggressiveMonster
{
- typedef cAggressiveMonster super;
+ using Super = cAggressiveMonster;
public:
- cSilverfish(void) :
- super("Silverfish", mtSilverfish, "entity.silverfish.hurt", "entity.silverfish.death", "entity.silverfish.ambient", 0.3, 0.4)
+
+ cSilverfish():
+ Super("Silverfish", mtSilverfish, "entity.silverfish.hurt", "entity.silverfish.death", "entity.silverfish.ambient", 0.3, 0.4)
{
}
diff --git a/src/Mobs/Skeleton.cpp b/src/Mobs/Skeleton.cpp
index e58bb9384..44700e9d3 100644
--- a/src/Mobs/Skeleton.cpp
+++ b/src/Mobs/Skeleton.cpp
@@ -10,7 +10,7 @@
cSkeleton::cSkeleton(void) :
- super("Skeleton", mtSkeleton, "entity.skeleton.hurt", "entity.skeleton.death", "entity.skeleton.ambient", 0.6, 1.8)
+ Super("Skeleton", mtSkeleton, "entity.skeleton.hurt", "entity.skeleton.death", "entity.skeleton.ambient", 0.6, 1.8)
{
}
@@ -65,7 +65,7 @@ bool cSkeleton::Attack(std::chrono::milliseconds a_Dt)
void cSkeleton::SpawnOn(cClientHandle & a_ClientHandle)
{
- super::SpawnOn(a_ClientHandle);
+ Super::SpawnOn(a_ClientHandle);
a_ClientHandle.SendEntityEquipment(*this, 0, cItem(E_ITEM_BOW));
}
diff --git a/src/Mobs/Skeleton.h b/src/Mobs/Skeleton.h
index cb7dec5ad..dfd1a740f 100644
--- a/src/Mobs/Skeleton.h
+++ b/src/Mobs/Skeleton.h
@@ -7,13 +7,14 @@
-class cSkeleton :
+class cSkeleton:
public cAggressiveMonster
{
- typedef cAggressiveMonster super;
+ using Super = cAggressiveMonster;
public:
- cSkeleton(void);
+
+ cSkeleton();
CLASS_PROTODEF(cSkeleton)
diff --git a/src/Mobs/Slime.cpp b/src/Mobs/Slime.cpp
index 7bb43a54a..00cf30d13 100644
--- a/src/Mobs/Slime.cpp
+++ b/src/Mobs/Slime.cpp
@@ -10,7 +10,7 @@
cSlime::cSlime(int a_Size) :
- super("Slime",
+ Super("Slime",
mtSlime,
Printf("entity.%sslime.hurt", GetSizeName(a_Size).c_str()),
Printf("entity.%sslime.death", GetSizeName(a_Size).c_str()),
@@ -52,7 +52,7 @@ bool cSlime::Attack(std::chrono::milliseconds a_Dt)
if (m_Size > 1)
{
// Only slimes larger than size 1 attack a player.
- return super::Attack(a_Dt);
+ return Super::Attack(a_Dt);
}
return false;
@@ -85,7 +85,7 @@ void cSlime::KilledBy(TakeDamageInfo & a_TDI)
m_World->SpawnMobFinalize(std::move(NewSlime));
}
}
- super::KilledBy(a_TDI);
+ Super::KilledBy(a_TDI);
}
diff --git a/src/Mobs/Slime.h b/src/Mobs/Slime.h
index c78461a02..e1be964eb 100644
--- a/src/Mobs/Slime.h
+++ b/src/Mobs/Slime.h
@@ -7,12 +7,13 @@
-class cSlime :
+class cSlime:
public cAggressiveMonster
{
- typedef cAggressiveMonster super;
+ using Super = cAggressiveMonster;
public:
+
/** Creates a slime of the specified size; size can be 1, 2 or 4, with 1 is the smallest and 4 is the tallest. */
cSlime(int a_Size);
diff --git a/src/Mobs/SnowGolem.cpp b/src/Mobs/SnowGolem.cpp
index ce94c9dae..2e6d5ea09 100644
--- a/src/Mobs/SnowGolem.cpp
+++ b/src/Mobs/SnowGolem.cpp
@@ -10,7 +10,7 @@
cSnowGolem::cSnowGolem(void) :
- super("SnowGolem", mtSnowGolem, "entity.snowman.hurt", "entity.snowman.death", "entity.snowman.ambient", 0.4, 1.8)
+ Super("SnowGolem", mtSnowGolem, "entity.snowman.hurt", "entity.snowman.death", "entity.snowman.ambient", 0.4, 1.8)
{
}
@@ -30,7 +30,7 @@ void cSnowGolem::GetDrops(cItems & a_Drops, cEntity * a_Killer)
void cSnowGolem::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
diff --git a/src/Mobs/SnowGolem.h b/src/Mobs/SnowGolem.h
index 708ddbef9..8504965cb 100644
--- a/src/Mobs/SnowGolem.h
+++ b/src/Mobs/SnowGolem.h
@@ -7,13 +7,14 @@
-class cSnowGolem :
+class cSnowGolem:
public cPassiveAggressiveMonster
{
- typedef cPassiveAggressiveMonster super;
+ using Super = cPassiveAggressiveMonster;
public:
- cSnowGolem(void);
+
+ cSnowGolem();
CLASS_PROTODEF(cSnowGolem)
diff --git a/src/Mobs/Spider.cpp b/src/Mobs/Spider.cpp
index 329d89e93..be8196cea 100644
--- a/src/Mobs/Spider.cpp
+++ b/src/Mobs/Spider.cpp
@@ -9,7 +9,7 @@
cSpider::cSpider(void) :
- super("Spider", mtSpider, "entity.spider.hurt", "entity.spider.death", "entity.spider.ambient", 1.4, 0.9)
+ Super("Spider", mtSpider, "entity.spider.hurt", "entity.spider.death", "entity.spider.ambient", 1.4, 0.9)
{
}
@@ -53,7 +53,7 @@ void cSpider::EventSeePlayer(cPlayer * a_Player, cChunk & a_Chunk)
!((Chunk->GetSkyLightAltered(Rel.x, Rel.y, Rel.z) > 11) || (Chunk->GetBlockLight(Rel.x, Rel.y, Rel.z) > 11))
)
{
- super::EventSeePlayer(a_Player, a_Chunk);
+ Super::EventSeePlayer(a_Player, a_Chunk);
}
}
@@ -63,7 +63,7 @@ void cSpider::EventSeePlayer(cPlayer * a_Player, cChunk & a_Chunk)
bool cSpider::DoTakeDamage(TakeDamageInfo & a_TDI)
{
- if (!super::DoTakeDamage(a_TDI))
+ if (!Super::DoTakeDamage(a_TDI))
{
return false;
}
diff --git a/src/Mobs/Spider.h b/src/Mobs/Spider.h
index af2753012..2a0b9861e 100644
--- a/src/Mobs/Spider.h
+++ b/src/Mobs/Spider.h
@@ -7,13 +7,14 @@
-class cSpider :
+class cSpider:
public cAggressiveMonster
{
- typedef cAggressiveMonster super;
+ using Super = cAggressiveMonster;
public:
- cSpider(void);
+
+ cSpider();
CLASS_PROTODEF(cSpider)
diff --git a/src/Mobs/Squid.cpp b/src/Mobs/Squid.cpp
index a63982f05..dffa96f62 100644
--- a/src/Mobs/Squid.cpp
+++ b/src/Mobs/Squid.cpp
@@ -9,7 +9,7 @@
cSquid::cSquid(void) :
- super("Squid", mtSquid, "entity.squid.hurt", "entity.squid.death", "entity.squid.ambient", 0.95, 0.95)
+ Super("Squid", mtSquid, "entity.squid.hurt", "entity.squid.death", "entity.squid.ambient", 0.95, 0.95)
{
}
@@ -77,5 +77,5 @@ void cSquid::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
m_AirTickTimer = DROWNING_TICKS;
}
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
}
diff --git a/src/Mobs/Squid.h b/src/Mobs/Squid.h
index aeeec77df..a2cc48b13 100644
--- a/src/Mobs/Squid.h
+++ b/src/Mobs/Squid.h
@@ -7,12 +7,13 @@
-class cSquid :
+class cSquid:
public cPassiveMonster
{
- typedef cPassiveMonster super;
+ using Super = cPassiveMonster;
public:
+
cSquid();
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
diff --git a/src/Mobs/Villager.cpp b/src/Mobs/Villager.cpp
index eca8ed2b6..2290d120f 100644
--- a/src/Mobs/Villager.cpp
+++ b/src/Mobs/Villager.cpp
@@ -12,7 +12,7 @@
cVillager::cVillager(eVillagerType VillagerType) :
- super("Villager", mtVillager, "entity.villager.hurt", "entity.villager.death", "entity.villager.ambient", 0.6, 1.8),
+ Super("Villager", mtVillager, "entity.villager.hurt", "entity.villager.death", "entity.villager.ambient", 0.6, 1.8),
m_ActionCountDown(-1),
m_Type(VillagerType),
m_VillagerAction(false)
@@ -25,7 +25,7 @@ cVillager::cVillager(eVillagerType VillagerType) :
bool cVillager::DoTakeDamage(TakeDamageInfo & a_TDI)
{
- if (!super::DoTakeDamage(a_TDI))
+ if (!Super::DoTakeDamage(a_TDI))
{
return false;
}
@@ -53,7 +53,7 @@ bool cVillager::DoTakeDamage(TakeDamageInfo & a_TDI)
void cVillager::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
@@ -110,7 +110,7 @@ void cVillager::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
void cVillager::KilledBy(TakeDamageInfo & a_TDI)
{
- super::KilledBy(a_TDI);
+ Super::KilledBy(a_TDI);
// TODO: 0% chance on Easy, 50% chance on Normal and 100% chance on Hard
if (GetRandomProvider().RandBool(0.5) && (a_TDI.Attacker != nullptr) && (a_TDI.Attacker->IsMob()))
diff --git a/src/Mobs/Villager.h b/src/Mobs/Villager.h
index 2d6644193..4ac06765c 100644
--- a/src/Mobs/Villager.h
+++ b/src/Mobs/Villager.h
@@ -7,10 +7,10 @@
-class cVillager :
+class cVillager:
public cPassiveMonster
{
- typedef cPassiveMonster super;
+ using Super = cPassiveMonster;
public:
diff --git a/src/Mobs/Witch.cpp b/src/Mobs/Witch.cpp
index a2e440705..a13593ae7 100644
--- a/src/Mobs/Witch.cpp
+++ b/src/Mobs/Witch.cpp
@@ -9,7 +9,7 @@
cWitch::cWitch(void) :
- super("Witch", mtWitch, "entity.witch.hurt", "entity.witch.death", "entity.witch.ambient", 0.6, 1.8)
+ Super("Witch", mtWitch, "entity.witch.hurt", "entity.witch.death", "entity.witch.ambient", 0.6, 1.8)
{
}
diff --git a/src/Mobs/Witch.h b/src/Mobs/Witch.h
index 706fcd9b3..44f4ba271 100644
--- a/src/Mobs/Witch.h
+++ b/src/Mobs/Witch.h
@@ -7,12 +7,13 @@
-class cWitch :
+class cWitch:
public cAggressiveMonster
{
- typedef cAggressiveMonster super;
+ using Super = cAggressiveMonster;
public:
+
cWitch();
CLASS_PROTODEF(cWitch)
diff --git a/src/Mobs/Wither.cpp b/src/Mobs/Wither.cpp
index 912e3e1d2..2b84cb142 100644
--- a/src/Mobs/Wither.cpp
+++ b/src/Mobs/Wither.cpp
@@ -11,7 +11,7 @@
cWither::cWither(void) :
- super("Wither", mtWither, "entity.wither.hurt", "entity.wither.death", "entity.wither.ambient", 0.9, 4.0),
+ Super("Wither", mtWither, "entity.wither.hurt", "entity.wither.death", "entity.wither.ambient", 0.9, 4.0),
m_WitherInvulnerableTicks(220)
{
SetMaxHealth(300);
@@ -48,7 +48,7 @@ bool cWither::DoTakeDamage(TakeDamageInfo & a_TDI)
return false;
}
- return super::DoTakeDamage(a_TDI);
+ return Super::DoTakeDamage(a_TDI);
}
@@ -57,7 +57,7 @@ bool cWither::DoTakeDamage(TakeDamageInfo & a_TDI)
void cWither::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
@@ -99,7 +99,7 @@ void cWither::GetDrops(cItems & a_Drops, cEntity * a_Killer)
void cWither::KilledBy(TakeDamageInfo & a_TDI)
{
- super::KilledBy(a_TDI);
+ Super::KilledBy(a_TDI);
Vector3d Pos = GetPosition();
m_World->ForEachPlayer([=](cPlayer & a_Player)
diff --git a/src/Mobs/Wither.h b/src/Mobs/Wither.h
index 5f6ec607c..21e6aecf8 100644
--- a/src/Mobs/Wither.h
+++ b/src/Mobs/Wither.h
@@ -7,13 +7,14 @@
-class cWither :
+class cWither:
public cAggressiveMonster
{
- typedef cAggressiveMonster super;
+ using Super = cAggressiveMonster;
public:
- cWither(void);
+
+ cWither();
CLASS_PROTODEF(cWither)
diff --git a/src/Mobs/WitherSkeleton.cpp b/src/Mobs/WitherSkeleton.cpp
index 7dd8d5017..6c3a79095 100644
--- a/src/Mobs/WitherSkeleton.cpp
+++ b/src/Mobs/WitherSkeleton.cpp
@@ -9,7 +9,7 @@
cWitherSkeleton::cWitherSkeleton(void) :
- super("WitherSkeleton", mtWitherSkeleton, "entity.wither_skeleton.hurt", "entity.wither_skeleton.death", "entity.wither_skeleton.ambient", 0.7, 2.4)
+ Super("WitherSkeleton", mtWitherSkeleton, "entity.wither_skeleton.hurt", "entity.wither_skeleton.death", "entity.wither_skeleton.ambient", 0.7, 2.4)
{
}
@@ -25,7 +25,7 @@ bool cWitherSkeleton::Attack(std::chrono::milliseconds a_Dt)
}
GetTarget()->AddEntityEffect(cEntityEffect::effWither, 200, 0);
- return super::Attack(a_Dt);
+ return Super::Attack(a_Dt);
}
@@ -57,6 +57,6 @@ void cWitherSkeleton::GetDrops(cItems & a_Drops, cEntity * a_Killer)
void cWitherSkeleton::SpawnOn(cClientHandle & a_ClientHandle)
{
- super::SpawnOn(a_ClientHandle);
+ Super::SpawnOn(a_ClientHandle);
a_ClientHandle.SendEntityEquipment(*this, 0, cItem(E_ITEM_STONE_SWORD));
}
diff --git a/src/Mobs/WitherSkeleton.h b/src/Mobs/WitherSkeleton.h
index c77d06822..41e55e073 100644
--- a/src/Mobs/WitherSkeleton.h
+++ b/src/Mobs/WitherSkeleton.h
@@ -7,13 +7,14 @@
-class cWitherSkeleton :
+class cWitherSkeleton:
public cAggressiveMonster
{
- typedef cAggressiveMonster super;
+ using Super = cAggressiveMonster;
public:
- cWitherSkeleton(void);
+
+ cWitherSkeleton();
CLASS_PROTODEF(cWitherSkeleton)
diff --git a/src/Mobs/Wolf.cpp b/src/Mobs/Wolf.cpp
index 19cffb810..e2be2a8d9 100644
--- a/src/Mobs/Wolf.cpp
+++ b/src/Mobs/Wolf.cpp
@@ -11,7 +11,7 @@
cWolf::cWolf(void) :
- super("Wolf", mtWolf, "entity.wolf.hurt", "entity.wolf.death", "entity.wolf.ambient", 0.6, 0.8),
+ Super("Wolf", mtWolf, "entity.wolf.hurt", "entity.wolf.death", "entity.wolf.ambient", 0.6, 0.8),
m_IsSitting(false),
m_IsTame(false),
m_IsBegging(false),
@@ -30,7 +30,7 @@ cWolf::cWolf(void) :
bool cWolf::DoTakeDamage(TakeDamageInfo & a_TDI)
{
cPawn * PreviousTarget = GetTarget();
- if (!super::DoTakeDamage(a_TDI))
+ if (!Super::DoTakeDamage(a_TDI))
{
return false;
}
@@ -106,7 +106,7 @@ bool cWolf::Attack(std::chrono::milliseconds a_Dt)
}
NotifyAlliesOfFight(static_cast<cPawn*>(GetTarget()));
- return super::Attack(a_Dt);
+ return Super::Attack(a_Dt);
}
@@ -260,7 +260,7 @@ void cWolf::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
}
else
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
}
if (!IsTicking())
diff --git a/src/Mobs/Wolf.h b/src/Mobs/Wolf.h
index 861419ba8..6ce708a52 100644
--- a/src/Mobs/Wolf.h
+++ b/src/Mobs/Wolf.h
@@ -9,13 +9,14 @@ class cEntity;
-class cWolf :
+class cWolf:
public cPassiveAggressiveMonster
{
- typedef cPassiveAggressiveMonster super;
+ using Super = cPassiveAggressiveMonster;
public:
- cWolf(void);
+
+ cWolf();
CLASS_PROTODEF(cWolf)
diff --git a/src/Mobs/Zombie.cpp b/src/Mobs/Zombie.cpp
index 02c1efa86..73e5f8c1e 100644
--- a/src/Mobs/Zombie.cpp
+++ b/src/Mobs/Zombie.cpp
@@ -10,7 +10,7 @@
cZombie::cZombie() :
- super("Zombie", mtZombie, "entity.zombie.hurt", "entity.zombie.death", "entity.zombie.ambient", 0.6, 1.8)
+ Super("Zombie", mtZombie, "entity.zombie.hurt", "entity.zombie.death", "entity.zombie.ambient", 0.6, 1.8)
{
}
diff --git a/src/Mobs/Zombie.h b/src/Mobs/Zombie.h
index 20f59a627..111847ea3 100644
--- a/src/Mobs/Zombie.h
+++ b/src/Mobs/Zombie.h
@@ -6,12 +6,13 @@
-class cZombie :
+class cZombie:
public cAggressiveMonster
{
- typedef cAggressiveMonster super;
+ using Super = cAggressiveMonster;
public:
+
cZombie();
CLASS_PROTODEF(cZombie)
diff --git a/src/Mobs/ZombiePigman.cpp b/src/Mobs/ZombiePigman.cpp
index 1b6e80f36..efc19ab9d 100644
--- a/src/Mobs/ZombiePigman.cpp
+++ b/src/Mobs/ZombiePigman.cpp
@@ -9,7 +9,7 @@
cZombiePigman::cZombiePigman(void) :
- super("ZombiePigman", mtZombiePigman, "entity.zombie_pig.hurt", "entity.zombie_pig.death", "entity.zombie_pig.ambient", 0.6, 1.8)
+ Super("ZombiePigman", mtZombiePigman, "entity.zombie_pig.hurt", "entity.zombie_pig.death", "entity.zombie_pig.ambient", 0.6, 1.8)
{
}
@@ -40,7 +40,7 @@ void cZombiePigman::GetDrops(cItems & a_Drops, cEntity * a_Killer)
void cZombiePigman::SpawnOn(cClientHandle & a_ClientHandle)
{
- super::SpawnOn(a_ClientHandle);
+ Super::SpawnOn(a_ClientHandle);
a_ClientHandle.SendEntityEquipment(*this, 0, cItem(E_ITEM_GOLD_SWORD));
}
@@ -50,7 +50,7 @@ void cZombiePigman::SpawnOn(cClientHandle & a_ClientHandle)
void cZombiePigman::KilledBy(TakeDamageInfo & a_TDI)
{
- super::KilledBy(a_TDI);
+ Super::KilledBy(a_TDI);
if ((a_TDI.Attacker != nullptr) && (a_TDI.Attacker->IsPlayer()))
{
diff --git a/src/Mobs/ZombiePigman.h b/src/Mobs/ZombiePigman.h
index 23a7be8da..ccc07e9a2 100644
--- a/src/Mobs/ZombiePigman.h
+++ b/src/Mobs/ZombiePigman.h
@@ -6,13 +6,14 @@
-class cZombiePigman :
+class cZombiePigman:
public cPassiveAggressiveMonster
{
- typedef cPassiveAggressiveMonster super;
+ using Super = cPassiveAggressiveMonster;
public:
- cZombiePigman(void);
+
+ cZombiePigman();
CLASS_PROTODEF(cZombiePigman)
diff --git a/src/Mobs/ZombieVillager.cpp b/src/Mobs/ZombieVillager.cpp
index 9d17e6038..5e3a32af2 100644
--- a/src/Mobs/ZombieVillager.cpp
+++ b/src/Mobs/ZombieVillager.cpp
@@ -11,7 +11,7 @@
cZombieVillager::cZombieVillager(cVillager::eVillagerType a_Profession) :
- super("ZombieVillager", mtZombieVillager, "entity.zombie_villager.hurt", "entity.zombie_villager.death", "entity.ambient", 0.6, 1.8),
+ Super("ZombieVillager", mtZombieVillager, "entity.zombie_villager.hurt", "entity.zombie_villager.death", "entity.ambient", 0.6, 1.8),
m_ConversionTime(-1),
m_Profession(a_Profession)
{
@@ -45,7 +45,7 @@ void cZombieVillager::GetDrops(cItems & a_Drops, cEntity * a_Killer)
void cZombieVillager::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
@@ -72,7 +72,7 @@ void cZombieVillager::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
void cZombieVillager::OnRightClicked(cPlayer & a_Player)
{
- super::OnRightClicked(a_Player);
+ Super::OnRightClicked(a_Player);
const cItem & EquippedItem = a_Player.GetEquippedItem();
if ((EquippedItem.m_ItemType == E_ITEM_GOLDEN_APPLE) && GetEntityEffect(cEntityEffect::effWeakness) != nullptr)
diff --git a/src/Mobs/ZombieVillager.h b/src/Mobs/ZombieVillager.h
index c4c4ae3d1..2a3e67959 100644
--- a/src/Mobs/ZombieVillager.h
+++ b/src/Mobs/ZombieVillager.h
@@ -7,12 +7,13 @@
-class cZombieVillager :
+class cZombieVillager:
public cAggressiveMonster
{
- typedef cAggressiveMonster super;
+ using Super = cAggressiveMonster;
public:
+
cZombieVillager(cVillager::eVillagerType a_Profession);
CLASS_PROTODEF(cZombieVillager)