summaryrefslogtreecommitdiffstats
path: root/src/Entities
diff options
context:
space:
mode:
Diffstat (limited to 'src/Entities')
-rw-r--r--src/Entities/ArrowEntity.cpp10
-rw-r--r--src/Entities/ArrowEntity.h2
-rw-r--r--src/Entities/Boat.cpp8
-rw-r--r--src/Entities/Boat.h8
-rw-r--r--src/Entities/EnderCrystal.cpp4
-rw-r--r--src/Entities/EnderCrystal.h2
-rw-r--r--src/Entities/Entity.cpp4
-rw-r--r--src/Entities/Entity.h4
-rw-r--r--src/Entities/EntityEffect.cpp10
-rw-r--r--src/Entities/EntityEffect.h138
-rw-r--r--src/Entities/ExpBottleEntity.cpp2
-rw-r--r--src/Entities/ExpBottleEntity.h2
-rw-r--r--src/Entities/ExpOrb.cpp4
-rw-r--r--src/Entities/ExpOrb.h9
-rw-r--r--src/Entities/FallingBlock.cpp2
-rw-r--r--src/Entities/FallingBlock.h2
-rw-r--r--src/Entities/FireChargeEntity.cpp4
-rw-r--r--src/Entities/FireChargeEntity.h2
-rw-r--r--src/Entities/FireworkEntity.cpp4
-rw-r--r--src/Entities/FireworkEntity.h2
-rw-r--r--src/Entities/Floater.cpp2
-rw-r--r--src/Entities/Floater.h2
-rw-r--r--src/Entities/GhastFireballEntity.cpp2
-rw-r--r--src/Entities/GhastFireballEntity.h2
-rw-r--r--src/Entities/HangingEntity.cpp2
-rw-r--r--src/Entities/HangingEntity.h2
-rw-r--r--src/Entities/ItemFrame.cpp8
-rw-r--r--src/Entities/ItemFrame.h2
-rw-r--r--src/Entities/LeashKnot.cpp8
-rw-r--r--src/Entities/LeashKnot.h2
-rw-r--r--src/Entities/Minecart.cpp26
-rw-r--r--src/Entities/Minecart.h12
-rw-r--r--src/Entities/Painting.cpp4
-rw-r--r--src/Entities/Painting.h4
-rw-r--r--src/Entities/Pawn.cpp14
-rw-r--r--src/Entities/Pawn.h5
-rw-r--r--src/Entities/Pickup.cpp6
-rw-r--r--src/Entities/Pickup.h2
-rw-r--r--src/Entities/Player.cpp20
-rw-r--r--src/Entities/Player.h10
-rw-r--r--src/Entities/ProjectileEntity.cpp6
-rw-r--r--src/Entities/ProjectileEntity.h2
-rw-r--r--src/Entities/SplashPotionEntity.cpp2
-rw-r--r--src/Entities/SplashPotionEntity.h4
-rw-r--r--src/Entities/TNTEntity.cpp4
-rw-r--r--src/Entities/TNTEntity.h9
-rw-r--r--src/Entities/ThrownEggEntity.cpp4
-rw-r--r--src/Entities/ThrownEggEntity.h2
-rw-r--r--src/Entities/ThrownEnderPearlEntity.cpp4
-rw-r--r--src/Entities/ThrownEnderPearlEntity.h2
-rw-r--r--src/Entities/ThrownSnowballEntity.cpp6
-rw-r--r--src/Entities/ThrownSnowballEntity.h2
-rw-r--r--src/Entities/WitherSkullEntity.cpp2
-rw-r--r--src/Entities/WitherSkullEntity.h2
54 files changed, 235 insertions, 174 deletions
diff --git a/src/Entities/ArrowEntity.cpp b/src/Entities/ArrowEntity.cpp
index 428721a80..38dfb8392 100644
--- a/src/Entities/ArrowEntity.cpp
+++ b/src/Entities/ArrowEntity.cpp
@@ -9,7 +9,7 @@
cArrowEntity::cArrowEntity(cEntity * a_Creator, Vector3d a_Pos, Vector3d a_Speed):
- super(pkArrow, a_Creator, a_Pos, 0.5, 0.5),
+ Super(pkArrow, a_Creator, a_Pos, 0.5, 0.5),
m_PickupState(psNoPickup),
m_DamageCoeff(2),
m_IsCritical(false),
@@ -35,7 +35,7 @@ cArrowEntity::cArrowEntity(cEntity * a_Creator, Vector3d a_Pos, Vector3d a_Speed
cArrowEntity::cArrowEntity(cPlayer & a_Player, double a_Force) :
- super(pkArrow, &a_Player, a_Player.GetThrowStartPos(), a_Player.GetThrowSpeed(a_Force * 1.5 * 20), 0.5, 0.5),
+ Super(pkArrow, &a_Player, a_Player.GetThrowStartPos(), a_Player.GetThrowSpeed(a_Force * 1.5 * 20), 0.5, 0.5),
m_PickupState(psInSurvivalOrCreative),
m_DamageCoeff(2),
m_IsCritical((a_Force >= 1)),
@@ -77,7 +77,7 @@ void cArrowEntity::OnHitSolidBlock(Vector3d a_HitPos, eBlockFace a_HitFace)
Vector3d Hit = a_HitPos;
Hit += GetSpeed().NormalizeCopy() / 100000; // Make arrow sink into block a bit so it lodges (TODO: investigate how to stop them going so far so that they become black clientside)
- super::OnHitSolidBlock(Hit, a_HitFace);
+ Super::OnHitSolidBlock(Hit, a_HitFace);
Vector3i BlockHit = Hit.Floor();
int X = BlockHit.x, Y = BlockHit.y, Z = BlockHit.z;
@@ -100,7 +100,7 @@ void cArrowEntity::OnHitSolidBlock(Vector3d a_HitPos, eBlockFace a_HitFace)
void cArrowEntity::OnHitEntity(cEntity & a_EntityHit, Vector3d a_HitPos)
{
- super::OnHitEntity(a_EntityHit, a_HitPos);
+ Super::OnHitEntity(a_EntityHit, a_HitPos);
int Damage = static_cast<int>(GetSpeed().Length() / 20 * m_DamageCoeff + 0.5);
if (m_IsCritical)
@@ -165,7 +165,7 @@ void cArrowEntity::CollectedBy(cPlayer & a_Dest)
void cArrowEntity::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/Entities/ArrowEntity.h b/src/Entities/ArrowEntity.h
index 629fd8987..474932514 100644
--- a/src/Entities/ArrowEntity.h
+++ b/src/Entities/ArrowEntity.h
@@ -22,7 +22,7 @@ class cArrowEntity :
{
// tolua_end
- using super = cProjectileEntity;
+ using Super = cProjectileEntity;
// tolua_begin
diff --git a/src/Entities/Boat.cpp b/src/Entities/Boat.cpp
index ec6b69326..d5ccd7359 100644
--- a/src/Entities/Boat.cpp
+++ b/src/Entities/Boat.cpp
@@ -15,7 +15,7 @@
cBoat::cBoat(Vector3d a_Pos, eMaterial a_Material) :
- super(etBoat, a_Pos, 0.98, 0.7),
+ Super(etBoat, a_Pos, 0.98, 0.7),
m_LastDamage(0), m_ForwardDirection(0),
m_DamageTaken(0.0f), m_Material(a_Material),
m_RightPaddleUsed(false), m_LeftPaddleUsed(false)
@@ -72,7 +72,7 @@ void cBoat::BroadcastMovementUpdate(const cClientHandle * a_Exclude)
bool cBoat::DoTakeDamage(TakeDamageInfo & TDI)
{
m_LastDamage = 10;
- if (!super::DoTakeDamage(TDI))
+ if (!Super::DoTakeDamage(TDI))
{
return false;
}
@@ -101,7 +101,7 @@ bool cBoat::DoTakeDamage(TakeDamageInfo & TDI)
void cBoat::OnRightClicked(cPlayer & a_Player)
{
- super::OnRightClicked(a_Player);
+ Super::OnRightClicked(a_Player);
if (m_Attachee != nullptr)
{
@@ -132,7 +132,7 @@ void cBoat::OnRightClicked(cPlayer & a_Player)
void cBoat::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/Entities/Boat.h b/src/Entities/Boat.h
index 3b9889fc1..4a583a26c 100644
--- a/src/Entities/Boat.h
+++ b/src/Entities/Boat.h
@@ -15,10 +15,14 @@
// tolua_begin
-class cBoat :
+class cBoat:
public cEntity
{
- typedef cEntity super;
+ // tolua_end
+
+ using Super = cEntity;
+
+ // tolua_begin
public:
enum eMaterial
diff --git a/src/Entities/EnderCrystal.cpp b/src/Entities/EnderCrystal.cpp
index dc9872936..0cb8e4e56 100644
--- a/src/Entities/EnderCrystal.cpp
+++ b/src/Entities/EnderCrystal.cpp
@@ -11,7 +11,7 @@
cEnderCrystal::cEnderCrystal(Vector3d a_Pos):
- super(etEnderCrystal, a_Pos, 1.0, 1.0)
+ Super(etEnderCrystal, a_Pos, 1.0, 1.0)
{
SetMaxHealth(5);
}
@@ -41,7 +41,7 @@ void cEnderCrystal::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
void cEnderCrystal::KilledBy(TakeDamageInfo & a_TDI)
{
- super::KilledBy(a_TDI);
+ Super::KilledBy(a_TDI);
m_World->DoExplosionAt(6.0, GetPosX(), GetPosY(), GetPosZ(), true, esEnderCrystal, this);
diff --git a/src/Entities/EnderCrystal.h b/src/Entities/EnderCrystal.h
index d8e295a3c..f29927549 100644
--- a/src/Entities/EnderCrystal.h
+++ b/src/Entities/EnderCrystal.h
@@ -12,7 +12,7 @@ class cEnderCrystal :
public cEntity
{
// tolua_end
- using super = cEntity;
+ using Super = cEntity;
public:
diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp
index 3ff48440c..23a29a3a4 100644
--- a/src/Entities/Entity.cpp
+++ b/src/Entities/Entity.cpp
@@ -889,7 +889,7 @@ void cEntity::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
return;
}
- // Position changed -> super::Tick() called:
+ // Position changed -> Super::Tick() called:
GET_AND_VERIFY_CURRENT_CHUNK(NextChunk, POSX_TOINT, POSZ_TOINT);
// Set swim states (water, lava, and fire):
@@ -941,7 +941,7 @@ void cEntity::HandlePhysics(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
int BlockY = POSY_TOINT;
int BlockZ = POSZ_TOINT;
- // Position changed -> super::HandlePhysics() called
+ // Position changed -> Super::HandlePhysics() called
GET_AND_VERIFY_CURRENT_CHUNK(NextChunk, BlockX, BlockZ);
// TODO Add collision detection with entities.
diff --git a/src/Entities/Entity.h b/src/Entities/Entity.h
index e51984225..25784081f 100644
--- a/src/Entities/Entity.h
+++ b/src/Entities/Entity.h
@@ -12,7 +12,7 @@
#define CLASS_PROTODEF(classname) \
virtual bool IsA(const char * a_ClassName) const override\
{ \
- return ((a_ClassName != nullptr) && ((strcmp(a_ClassName, #classname) == 0) || super::IsA(a_ClassName))); \
+ return ((a_ClassName != nullptr) && ((strcmp(a_ClassName, #classname) == 0) || Super::IsA(a_ClassName))); \
} \
virtual const char * GetClass(void) const override \
{ \
@@ -24,7 +24,7 @@
} \
virtual const char * GetParentClass(void) const override \
{ \
- return super::GetClass(); \
+ return Super::GetClass(); \
}
#define POSX_TOINT FloorC(GetPosX())
diff --git a/src/Entities/EntityEffect.cpp b/src/Entities/EntityEffect.cpp
index 1342f6098..9475a1710 100644
--- a/src/Entities/EntityEffect.cpp
+++ b/src/Entities/EntityEffect.cpp
@@ -365,7 +365,7 @@ void cEntityEffectInstantDamage::OnActivate(cPawn & a_Target)
void cEntityEffectRegeneration::OnTick(cPawn & a_Target)
{
- super::OnTick(a_Target);
+ Super::OnTick(a_Target);
if (a_Target.IsMob() && static_cast<cMonster &>(a_Target).IsUndead())
{
@@ -392,7 +392,7 @@ void cEntityEffectRegeneration::OnTick(cPawn & a_Target)
void cEntityEffectHunger::OnTick(cPawn & a_Target)
{
- super::OnTick(a_Target);
+ Super::OnTick(a_Target);
if (a_Target.IsPlayer())
{
@@ -426,7 +426,7 @@ void cEntityEffectInvisibility::BroadcastMetadata(cPawn & a_Target)
void cEntityEffectWeakness::OnTick(cPawn & a_Target)
{
- super::OnTick(a_Target);
+ Super::OnTick(a_Target);
// Damage reduction = 0.5 damage, multiplied by potion level (Weakness II = 1 damage)
// double dmg_reduc = 0.5 * (a_Effect.GetIntensity() + 1);
@@ -444,7 +444,7 @@ void cEntityEffectWeakness::OnTick(cPawn & a_Target)
void cEntityEffectPoison::OnTick(cPawn & a_Target)
{
- super::OnTick(a_Target);
+ Super::OnTick(a_Target);
if (a_Target.IsMob())
{
@@ -483,7 +483,7 @@ void cEntityEffectPoison::OnTick(cPawn & a_Target)
void cEntityEffectWither::OnTick(cPawn & a_Target)
{
- super::OnTick(a_Target);
+ Super::OnTick(a_Target);
// Damage frequency = 40 ticks, divided by effect level (Wither II = 20 ticks)
int frequency = std::max(1, FloorC(40.0 / static_cast<double>(m_Intensity + 1)));
diff --git a/src/Entities/EntityEffect.h b/src/Entities/EntityEffect.h
index dd126c20d..eebf0e3c8 100644
--- a/src/Entities/EntityEffect.h
+++ b/src/Entities/EntityEffect.h
@@ -131,10 +131,12 @@ protected:
class cEntityEffectSpeed:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectSpeed(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
@@ -150,10 +152,12 @@ public:
class cEntityEffectSlowness:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectSlowness(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
@@ -169,10 +173,12 @@ public:
class cEntityEffectHaste:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectHaste(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
};
@@ -184,10 +190,12 @@ public:
class cEntityEffectMiningFatigue:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectMiningFatigue(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
};
@@ -199,10 +207,12 @@ public:
class cEntityEffectStrength:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectStrength(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
};
@@ -214,10 +224,12 @@ public:
class cEntityEffectInstantHealth:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectInstantHealth(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
@@ -231,10 +243,12 @@ public:
class cEntityEffectInstantDamage:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectInstantDamage(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
@@ -248,10 +262,12 @@ public:
class cEntityEffectJumpBoost:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectJumpBoost(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
};
@@ -263,10 +279,12 @@ public:
class cEntityEffectNausea:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectNausea(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
};
@@ -278,10 +296,12 @@ public:
class cEntityEffectRegeneration:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectRegeneration(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
@@ -295,10 +315,12 @@ public:
class cEntityEffectResistance:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectResistance(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
};
@@ -310,10 +332,12 @@ public:
class cEntityEffectFireResistance:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectFireResistance(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
};
@@ -325,10 +349,12 @@ public:
class cEntityEffectWaterBreathing:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectWaterBreathing(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
};
@@ -340,10 +366,12 @@ public:
class cEntityEffectInvisibility:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectInvisibility(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
@@ -361,10 +389,12 @@ private:
class cEntityEffectBlindness:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectBlindness(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
};
@@ -376,10 +406,12 @@ public:
class cEntityEffectNightVision:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectNightVision(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
};
@@ -391,10 +423,12 @@ public:
class cEntityEffectHunger:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectHunger(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
@@ -409,10 +443,12 @@ public:
class cEntityEffectWeakness:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectWeakness(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
@@ -427,10 +463,12 @@ public:
class cEntityEffectPoison:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectPoison(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
@@ -445,10 +483,12 @@ public:
class cEntityEffectWither:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectWither(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
@@ -463,10 +503,12 @@ public:
class cEntityEffectHealthBoost:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectHealthBoost(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
};
@@ -478,10 +520,12 @@ public:
class cEntityEffectAbsorption:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectAbsorption(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
};
@@ -493,10 +537,12 @@ public:
class cEntityEffectSaturation:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectSaturation(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
diff --git a/src/Entities/ExpBottleEntity.cpp b/src/Entities/ExpBottleEntity.cpp
index ed6c759bc..96c063f4e 100644
--- a/src/Entities/ExpBottleEntity.cpp
+++ b/src/Entities/ExpBottleEntity.cpp
@@ -9,7 +9,7 @@
cExpBottleEntity::cExpBottleEntity(cEntity * a_Creator, Vector3d a_Pos, Vector3d a_Speed) :
- super(pkExpBottle, a_Creator, a_Pos, 0.25, 0.25)
+ Super(pkExpBottle, a_Creator, a_Pos, 0.25, 0.25)
{
SetSpeed(a_Speed);
}
diff --git a/src/Entities/ExpBottleEntity.h b/src/Entities/ExpBottleEntity.h
index 126898556..b05f6da31 100644
--- a/src/Entities/ExpBottleEntity.h
+++ b/src/Entities/ExpBottleEntity.h
@@ -22,7 +22,7 @@ class cExpBottleEntity :
{
// tolua_end
- using super = cProjectileEntity;
+ using Super = cProjectileEntity;
public: // tolua_export
diff --git a/src/Entities/ExpOrb.cpp b/src/Entities/ExpOrb.cpp
index 3d0c9e2b8..5f1b5cbe2 100644
--- a/src/Entities/ExpOrb.cpp
+++ b/src/Entities/ExpOrb.cpp
@@ -6,7 +6,7 @@
cExpOrb::cExpOrb(Vector3d a_Pos, int a_Reward):
- super(etExpOrb, a_Pos, 0.98, 0.98), // TODO: Check size
+ Super(etExpOrb, a_Pos, 0.98, 0.98), // TODO: Check size
m_Reward(a_Reward),
m_Timer(0)
{
@@ -100,7 +100,7 @@ bool cExpOrb::DoTakeDamage(TakeDamageInfo & a_TDI)
return true;
}
- return super::DoTakeDamage(a_TDI);
+ return Super::DoTakeDamage(a_TDI);
}
diff --git a/src/Entities/ExpOrb.h b/src/Entities/ExpOrb.h
index 326e28b1d..3a7f4ee69 100644
--- a/src/Entities/ExpOrb.h
+++ b/src/Entities/ExpOrb.h
@@ -8,14 +8,15 @@
// tolua_begin
-class cExpOrb :
+class cExpOrb:
public cEntity
{
- typedef cEntity super;
-
-public:
// tolua_end
+ using Super = cEntity;
+
+public: // tolua_export
+
CLASS_PROTODEF(cExpOrb)
cExpOrb(Vector3d a_Pos, int a_Reward);
diff --git a/src/Entities/FallingBlock.cpp b/src/Entities/FallingBlock.cpp
index 18cd3e086..ed0661dae 100644
--- a/src/Entities/FallingBlock.cpp
+++ b/src/Entities/FallingBlock.cpp
@@ -12,7 +12,7 @@
cFallingBlock::cFallingBlock(Vector3d a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta):
- super(etFallingBlock, a_Position, 0.98, 0.98),
+ Super(etFallingBlock, a_Position, 0.98, 0.98),
m_BlockType(a_BlockType),
m_BlockMeta(a_BlockMeta)
{
diff --git a/src/Entities/FallingBlock.h b/src/Entities/FallingBlock.h
index dfac287fd..5f083402b 100644
--- a/src/Entities/FallingBlock.h
+++ b/src/Entities/FallingBlock.h
@@ -13,7 +13,7 @@ class cFallingBlock :
{
// tolua_end
- using super = cEntity;
+ using Super = cEntity;
public: // tolua_export
diff --git a/src/Entities/FireChargeEntity.cpp b/src/Entities/FireChargeEntity.cpp
index 2e544ee5d..325c54731 100644
--- a/src/Entities/FireChargeEntity.cpp
+++ b/src/Entities/FireChargeEntity.cpp
@@ -8,7 +8,7 @@
cFireChargeEntity::cFireChargeEntity(cEntity * a_Creator, Vector3d a_Pos, Vector3d a_Speed):
- super(pkFireCharge, a_Creator, a_Pos, 0.3125, 0.3125)
+ Super(pkFireCharge, a_Creator, a_Pos, 0.3125, 0.3125)
{
SetSpeed(a_Speed);
SetGravity(0);
@@ -43,7 +43,7 @@ void cFireChargeEntity::OnHitSolidBlock(Vector3d a_HitPos, eBlockFace a_HitFace)
void cFireChargeEntity::OnHitEntity(cEntity & a_EntityHit, Vector3d a_HitPos)
{
- super::OnHitEntity(a_EntityHit, a_HitPos);
+ Super::OnHitEntity(a_EntityHit, a_HitPos);
Destroy();
Explode(a_HitPos.Floor());
diff --git a/src/Entities/FireChargeEntity.h b/src/Entities/FireChargeEntity.h
index ef5ecd075..93e273c2c 100644
--- a/src/Entities/FireChargeEntity.h
+++ b/src/Entities/FireChargeEntity.h
@@ -22,7 +22,7 @@ class cFireChargeEntity :
{
// tolua_end
- using super = cProjectileEntity;
+ using Super = cProjectileEntity;
public: // tolua_export
diff --git a/src/Entities/FireworkEntity.cpp b/src/Entities/FireworkEntity.cpp
index b4050d07b..987d5a329 100644
--- a/src/Entities/FireworkEntity.cpp
+++ b/src/Entities/FireworkEntity.cpp
@@ -9,7 +9,7 @@
cFireworkEntity::cFireworkEntity(cEntity * a_Creator, Vector3d a_Pos, const cItem & a_Item) :
- super(pkFirework, a_Creator, a_Pos, 0.25, 0.25),
+ Super(pkFirework, a_Creator, a_Pos, 0.25, 0.25),
m_TicksToExplosion(a_Item.m_FireworkItem.m_FlightTimeInTicks),
m_FireworkItem(a_Item)
{
@@ -64,7 +64,7 @@ void cFireworkEntity::HandlePhysics(std::chrono::milliseconds a_Dt, cChunk & a_C
void cFireworkEntity::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/Entities/FireworkEntity.h b/src/Entities/FireworkEntity.h
index 20689165f..ce30c392e 100644
--- a/src/Entities/FireworkEntity.h
+++ b/src/Entities/FireworkEntity.h
@@ -22,7 +22,7 @@ class cFireworkEntity :
{
// tolua_end
- using super = cProjectileEntity;
+ using Super = cProjectileEntity;
public: // tolua_export
diff --git a/src/Entities/Floater.cpp b/src/Entities/Floater.cpp
index 5c16446c8..1faf9ff0a 100644
--- a/src/Entities/Floater.cpp
+++ b/src/Entities/Floater.cpp
@@ -75,7 +75,7 @@ protected:
cFloater::cFloater(Vector3d a_Pos, Vector3d a_Speed, UInt32 a_PlayerID, int a_CountDownTime) :
- super(etFloater, a_Pos, 0.2, 0.2),
+ Super(etFloater, a_Pos, 0.2, 0.2),
m_BitePos(a_Pos),
m_CanPickupItem(false),
m_PickupCountDown(0),
diff --git a/src/Entities/Floater.h b/src/Entities/Floater.h
index 25a80996a..0c20632db 100644
--- a/src/Entities/Floater.h
+++ b/src/Entities/Floater.h
@@ -13,7 +13,7 @@ class cFloater :
{
// tolua_end
- using super = cEntity;
+ using Super = cEntity;
public: // tolua_export
diff --git a/src/Entities/GhastFireballEntity.cpp b/src/Entities/GhastFireballEntity.cpp
index 8a84a99d6..31dd3dbc9 100644
--- a/src/Entities/GhastFireballEntity.cpp
+++ b/src/Entities/GhastFireballEntity.cpp
@@ -8,7 +8,7 @@
cGhastFireballEntity::cGhastFireballEntity(cEntity * a_Creator, Vector3d a_Pos, Vector3d a_Speed):
- super(pkGhastFireball, a_Creator, a_Pos, 1, 1)
+ Super(pkGhastFireball, a_Creator, a_Pos, 1, 1)
{
SetSpeed(a_Speed);
SetGravity(0);
diff --git a/src/Entities/GhastFireballEntity.h b/src/Entities/GhastFireballEntity.h
index ba1fb424b..41ac7f75b 100644
--- a/src/Entities/GhastFireballEntity.h
+++ b/src/Entities/GhastFireballEntity.h
@@ -22,7 +22,7 @@ class cGhastFireballEntity :
{
// tolua_end
- using super = cProjectileEntity;
+ using Super = cProjectileEntity;
public: // tolua_export
diff --git a/src/Entities/HangingEntity.cpp b/src/Entities/HangingEntity.cpp
index e69efdb73..20b751c74 100644
--- a/src/Entities/HangingEntity.cpp
+++ b/src/Entities/HangingEntity.cpp
@@ -10,7 +10,7 @@
cHangingEntity::cHangingEntity(eEntityType a_EntityType, eBlockFace a_Facing, Vector3d a_Pos) :
- super(a_EntityType, a_Pos, 0.8, 0.8),
+ Super(a_EntityType, a_Pos, 0.8, 0.8),
m_Facing(cHangingEntity::BlockFaceToProtocolFace(a_Facing))
{
SetMaxHealth(1);
diff --git a/src/Entities/HangingEntity.h b/src/Entities/HangingEntity.h
index 097ffeb0d..2a15582be 100644
--- a/src/Entities/HangingEntity.h
+++ b/src/Entities/HangingEntity.h
@@ -13,7 +13,7 @@ class cHangingEntity :
{
// tolua_end
- using super = cEntity;
+ using Super = cEntity;
public: // tolua_export
diff --git a/src/Entities/ItemFrame.cpp b/src/Entities/ItemFrame.cpp
index ac0dc3503..03a3186cf 100644
--- a/src/Entities/ItemFrame.cpp
+++ b/src/Entities/ItemFrame.cpp
@@ -10,7 +10,7 @@
cItemFrame::cItemFrame(eBlockFace a_BlockFace, Vector3d a_Pos):
- super(etItemFrame, a_BlockFace, a_Pos),
+ Super(etItemFrame, a_BlockFace, a_Pos),
m_Item(E_BLOCK_AIR),
m_ItemRotation(0)
{
@@ -22,7 +22,7 @@ cItemFrame::cItemFrame(eBlockFace a_BlockFace, Vector3d a_Pos):
void cItemFrame::OnRightClicked(cPlayer & a_Player)
{
- super::OnRightClicked(a_Player);
+ Super::OnRightClicked(a_Player);
if (!m_Item.IsEmpty())
{
@@ -56,7 +56,7 @@ void cItemFrame::KilledBy(TakeDamageInfo & a_TDI)
{
if (m_Item.IsEmpty())
{
- super::KilledBy(a_TDI);
+ Super::KilledBy(a_TDI);
Destroy();
return;
}
@@ -94,7 +94,7 @@ void cItemFrame::GetDrops(cItems & a_Items, cEntity * a_Killer)
void cItemFrame::SpawnOn(cClientHandle & a_ClientHandle)
{
- super::SpawnOn(a_ClientHandle);
+ Super::SpawnOn(a_ClientHandle);
a_ClientHandle.SendSpawnObject(*this, 71, GetProtocolFacing(), static_cast<Byte>(GetYaw()), static_cast<Byte>(GetPitch()));
a_ClientHandle.SendEntityMetadata(*this);
}
diff --git a/src/Entities/ItemFrame.h b/src/Entities/ItemFrame.h
index 7266ae88d..82aece7b7 100644
--- a/src/Entities/ItemFrame.h
+++ b/src/Entities/ItemFrame.h
@@ -13,7 +13,7 @@ class cItemFrame :
{
// tolua_end
- using super = cHangingEntity;
+ using Super = cHangingEntity;
public: // tolua_export
diff --git a/src/Entities/LeashKnot.cpp b/src/Entities/LeashKnot.cpp
index 82439e5cf..aa9e3dfb4 100644
--- a/src/Entities/LeashKnot.cpp
+++ b/src/Entities/LeashKnot.cpp
@@ -15,7 +15,7 @@
cLeashKnot::cLeashKnot(eBlockFace a_BlockFace, Vector3d a_Pos) :
- super(etLeashKnot, a_BlockFace, a_Pos),
+ Super(etLeashKnot, a_BlockFace, a_Pos),
m_ShouldSelfDestroy(false),
m_TicksToSelfDestroy(20 * 1)
{
@@ -27,7 +27,7 @@ cLeashKnot::cLeashKnot(eBlockFace a_BlockFace, Vector3d a_Pos) :
void cLeashKnot::OnRightClicked(cPlayer & a_Player)
{
- super::OnRightClicked(a_Player);
+ Super::OnRightClicked(a_Player);
TiePlayersLeashedMobs(a_Player, true);
@@ -82,7 +82,7 @@ void cLeashKnot::TiePlayersLeashedMobs(cPlayer & a_Player, bool a_ShouldBroadcas
void cLeashKnot::KilledBy(TakeDamageInfo & a_TDI)
{
- super::KilledBy(a_TDI);
+ Super::KilledBy(a_TDI);
m_World->BroadcastSoundEffect("entity.leashknot.break", GetPosition(), 1, 1);
Destroy();
return;
@@ -106,7 +106,7 @@ void cLeashKnot::GetDrops(cItems & a_Items, cEntity * a_Killer)
void cLeashKnot::SpawnOn(cClientHandle & a_ClientHandle)
{
- super::SpawnOn(a_ClientHandle);
+ Super::SpawnOn(a_ClientHandle);
a_ClientHandle.SendSpawnObject(*this, 77, GetProtocolFacing(), static_cast<Byte>(GetYaw()), static_cast<Byte>(GetPitch()));
a_ClientHandle.SendEntityMetadata(*this);
}
diff --git a/src/Entities/LeashKnot.h b/src/Entities/LeashKnot.h
index 685dbec5b..8a8d0a45e 100644
--- a/src/Entities/LeashKnot.h
+++ b/src/Entities/LeashKnot.h
@@ -14,7 +14,7 @@ class cLeashKnot :
public cHangingEntity
{
// tolua_end
- using super = cHangingEntity;
+ using Super = cHangingEntity;
public: // tolua_export
diff --git a/src/Entities/Minecart.cpp b/src/Entities/Minecart.cpp
index d5e50fc41..35bbdf617 100644
--- a/src/Entities/Minecart.cpp
+++ b/src/Entities/Minecart.cpp
@@ -95,7 +95,7 @@ protected:
// cMinecart:
cMinecart::cMinecart(ePayload a_Payload, Vector3d a_Pos):
- super(etMinecart, a_Pos, 0.98, 0.7),
+ Super(etMinecart, a_Pos, 0.98, 0.7),
m_Payload(a_Payload),
m_LastDamage(0),
m_DetectorRailPosition(0, 0, 0),
@@ -132,7 +132,7 @@ void cMinecart::HandlePhysics(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
if ((PosY <= 0) || (PosY >= cChunkDef::Height))
{
// Outside the world, just process normal falling physics
- super::HandlePhysics(a_Dt, a_Chunk);
+ Super::HandlePhysics(a_Dt, a_Chunk);
BroadcastMovementUpdate();
return;
}
@@ -192,7 +192,7 @@ void cMinecart::HandlePhysics(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
// Not on rail, default physics
SetPosY(floor(GetPosY()) + 0.35); // HandlePhysics overrides this if minecart can fall, else, it is to stop ground clipping minecart bottom when off-rail
- super::HandlePhysics(a_Dt, *chunk);
+ Super::HandlePhysics(a_Dt, *chunk);
}
if (m_bIsOnDetectorRail && !Vector3i(POSX_TOINT, POSY_TOINT, POSZ_TOINT).Equals(m_DetectorRailPosition))
@@ -1044,11 +1044,11 @@ bool cMinecart::DoTakeDamage(TakeDamageInfo & TDI)
Destroy();
TDI.FinalDamage = GetMaxHealth(); // Instant hit for creative
SetInvulnerableTicks(0);
- return super::DoTakeDamage(TDI); // No drops for creative
+ return Super::DoTakeDamage(TDI); // No drops for creative
}
m_LastDamage = static_cast<int>(TDI.FinalDamage);
- if (!super::DoTakeDamage(TDI))
+ if (!Super::DoTakeDamage(TDI))
{
return false;
}
@@ -1145,7 +1145,7 @@ void cMinecart::DoSetSpeed(double a_SpeedX, double a_SpeedY, double a_SpeedZ)
a_SpeedZ = MAX_SPEED_NEGATIVE;
}
- super::DoSetSpeed(a_SpeedX, a_SpeedY, a_SpeedZ);
+ Super::DoSetSpeed(a_SpeedX, a_SpeedY, a_SpeedZ);
}
@@ -1168,7 +1168,7 @@ void cMinecart::Destroyed()
// cRideableMinecart:
cRideableMinecart::cRideableMinecart(Vector3d a_Pos, const cItem & a_Content, int a_Height):
- super(mpNone, a_Pos),
+ Super(mpNone, a_Pos),
m_Content(a_Content),
m_Height(a_Height)
{
@@ -1180,7 +1180,7 @@ cRideableMinecart::cRideableMinecart(Vector3d a_Pos, const cItem & a_Content, in
void cRideableMinecart::OnRightClicked(cPlayer & a_Player)
{
- super::OnRightClicked(a_Player);
+ Super::OnRightClicked(a_Player);
if (m_Attachee != nullptr)
{
@@ -1213,7 +1213,7 @@ void cRideableMinecart::OnRightClicked(cPlayer & a_Player)
// cMinecartWithChest:
cMinecartWithChest::cMinecartWithChest(Vector3d a_Pos):
- super(mpChest, a_Pos),
+ Super(mpChest, a_Pos),
cEntityWindowOwner(this),
m_Contents(ContentsWidth, ContentsHeight)
{
@@ -1287,7 +1287,7 @@ void cMinecartWithChest::Destroyed()
// cMinecartWithFurnace:
cMinecartWithFurnace::cMinecartWithFurnace(Vector3d a_Pos):
- super(mpFurnace, a_Pos),
+ Super(mpFurnace, a_Pos),
m_FueledTimeLeft(-1),
m_IsFueled(false)
{
@@ -1321,7 +1321,7 @@ void cMinecartWithFurnace::OnRightClicked(cPlayer & a_Player)
void cMinecartWithFurnace::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
@@ -1354,7 +1354,7 @@ void cMinecartWithFurnace::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk
// cMinecartWithTNT:
cMinecartWithTNT::cMinecartWithTNT(Vector3d a_Pos):
- super(mpTNT, a_Pos)
+ Super(mpTNT, a_Pos)
{
}
@@ -1368,7 +1368,7 @@ cMinecartWithTNT::cMinecartWithTNT(Vector3d a_Pos):
// cMinecartWithHopper:
cMinecartWithHopper::cMinecartWithHopper(Vector3d a_Pos):
- super(mpHopper, a_Pos)
+ Super(mpHopper, a_Pos)
{
}
diff --git a/src/Entities/Minecart.h b/src/Entities/Minecart.h
index 79624494c..fe9ad8ce8 100644
--- a/src/Entities/Minecart.h
+++ b/src/Entities/Minecart.h
@@ -20,7 +20,7 @@
class cMinecart :
public cEntity
{
- using super = cEntity;
+ using Super = cEntity;
public:
CLASS_PROTODEF(cMinecart)
@@ -97,7 +97,7 @@ protected:
class cRideableMinecart :
public cMinecart
{
- using super = cMinecart;
+ using Super = cMinecart;
public:
@@ -127,7 +127,7 @@ class cMinecartWithChest :
public cItemGrid::cListener,
public cEntityWindowOwner
{
- using super = cMinecart;
+ using Super = cMinecart;
public:
@@ -178,7 +178,7 @@ protected:
class cMinecartWithFurnace :
public cMinecart
{
- using super = cMinecart;
+ using Super = cMinecart;
public:
@@ -211,7 +211,7 @@ private:
class cMinecartWithTNT :
public cMinecart
{
- using super = cMinecart;
+ using Super = cMinecart;
public:
CLASS_PROTODEF(cMinecartWithTNT)
@@ -226,7 +226,7 @@ public:
class cMinecartWithHopper :
public cMinecart
{
- using super = cMinecart;
+ using Super = cMinecart;
public:
diff --git a/src/Entities/Painting.cpp b/src/Entities/Painting.cpp
index a968356c4..d12469f98 100644
--- a/src/Entities/Painting.cpp
+++ b/src/Entities/Painting.cpp
@@ -11,7 +11,7 @@
cPainting::cPainting(const AString & a_Name, eBlockFace a_Direction, Vector3d a_Pos):
- super(etPainting, a_Direction, a_Pos),
+ Super(etPainting, a_Direction, a_Pos),
m_Name(a_Name)
{
}
@@ -22,7 +22,7 @@ cPainting::cPainting(const AString & a_Name, eBlockFace a_Direction, Vector3d a_
void cPainting::SpawnOn(cClientHandle & a_Client)
{
- super::SpawnOn(a_Client);
+ Super::SpawnOn(a_Client);
a_Client.SendPaintingSpawn(*this);
}
diff --git a/src/Entities/Painting.h b/src/Entities/Painting.h
index efe8a70cb..844fd72f5 100644
--- a/src/Entities/Painting.h
+++ b/src/Entities/Painting.h
@@ -13,7 +13,7 @@ class cPainting :
{
// tolua_end
- using super = cHangingEntity;
+ using Super = cHangingEntity;
public: // tolua_export
@@ -30,7 +30,7 @@ private:
virtual void GetDrops(cItems & a_Items, cEntity * a_Killer) override;
virtual void KilledBy(TakeDamageInfo & a_TDI) override
{
- super::KilledBy(a_TDI);
+ Super::KilledBy(a_TDI);
Destroy();
}
diff --git a/src/Entities/Pawn.cpp b/src/Entities/Pawn.cpp
index 9481daa8c..109a1c70e 100644
--- a/src/Entities/Pawn.cpp
+++ b/src/Entities/Pawn.cpp
@@ -15,7 +15,7 @@
cPawn::cPawn(eEntityType a_EntityType, double a_Width, double a_Height) :
- super(a_EntityType, Vector3d(), a_Width, a_Height),
+ Super(a_EntityType, Vector3d(), a_Width, a_Height),
m_EntityEffects(tEffectMap()),
m_LastGroundHeight(0),
m_bTouchGround(false)
@@ -40,7 +40,7 @@ cPawn::~cPawn()
void cPawn::Destroyed()
{
StopEveryoneFromTargetingMe();
- super::Destroyed();
+ Super::Destroyed();
}
@@ -114,7 +114,7 @@ void cPawn::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
@@ -130,7 +130,7 @@ void cPawn::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
void cPawn::KilledBy(TakeDamageInfo & a_TDI)
{
ClearEntityEffects();
- super::KilledBy(a_TDI);
+ Super::KilledBy(a_TDI);
}
@@ -139,7 +139,7 @@ void cPawn::KilledBy(TakeDamageInfo & a_TDI)
bool cPawn::IsFireproof(void) const
{
- return super::IsFireproof() || HasEntityEffect(cEntityEffect::effFireResistance);
+ return Super::IsFireproof() || HasEntityEffect(cEntityEffect::effFireResistance);
}
@@ -163,7 +163,7 @@ void cPawn::HandleAir(void)
return;
}
- super::HandleAir();
+ Super::HandleAir();
}
@@ -499,6 +499,6 @@ cEntityEffect * cPawn::GetEntityEffect(cEntityEffect::eType a_EffectType)
void cPawn::ResetPosition(Vector3d a_NewPosition)
{
- super::ResetPosition(a_NewPosition);
+ Super::ResetPosition(a_NewPosition);
m_LastGroundHeight = GetPosY();
}
diff --git a/src/Entities/Pawn.h b/src/Entities/Pawn.h
index 4de0e14b2..f68db63e9 100644
--- a/src/Entities/Pawn.h
+++ b/src/Entities/Pawn.h
@@ -12,13 +12,14 @@ class cMonster;
// tolua_begin
-class cPawn :
+class cPawn:
public cEntity
{
// tolua_end
- typedef cEntity super;
+ using Super = cEntity;
public:
+
CLASS_PROTODEF(cPawn)
cPawn(eEntityType a_EntityType, double a_Width, double a_Height);
diff --git a/src/Entities/Pickup.cpp b/src/Entities/Pickup.cpp
index 1ab01c631..5c8d58f21 100644
--- a/src/Entities/Pickup.cpp
+++ b/src/Entities/Pickup.cpp
@@ -97,7 +97,7 @@ protected:
// cPickup:
cPickup::cPickup(Vector3d a_Pos, const cItem & a_Item, bool IsPlayerCreated, Vector3f a_Speed, int a_LifetimeTicks, bool a_CanCombine):
- super(etPickup, a_Pos, 0.2, 0.2),
+ Super(etPickup, a_Pos, 0.2, 0.2),
m_Timer(0),
m_Item(a_Item),
m_bCollected(false),
@@ -127,7 +127,7 @@ void cPickup::SpawnOn(cClientHandle & a_Client)
void cPickup::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
@@ -204,7 +204,7 @@ bool cPickup::DoTakeDamage(TakeDamageInfo & a_TDI)
return true;
}
- return super::DoTakeDamage(a_TDI);
+ return Super::DoTakeDamage(a_TDI);
}
diff --git a/src/Entities/Pickup.h b/src/Entities/Pickup.h
index e1f3ed1a8..73540a64e 100644
--- a/src/Entities/Pickup.h
+++ b/src/Entities/Pickup.h
@@ -20,7 +20,7 @@ class cPickup :
{
// tolua_end
- using super = cEntity;
+ using Super = cEntity;
public: // tolua_export
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index 02cb7378d..40486d39e 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -86,7 +86,7 @@ const int cPlayer::EATING_TICKS = 30;
cPlayer::cPlayer(cClientHandlePtr a_Client, const AString & a_PlayerName) :
- super(etPlayer, 0.6, 1.8),
+ Super(etPlayer, 0.6, 1.8),
m_bVisible(true),
m_FoodLevel(MAX_FOOD_LEVEL),
m_FoodSaturationLevel(5.0),
@@ -227,7 +227,7 @@ cPlayer::~cPlayer(void)
void cPlayer::Destroyed()
{
CloseWindow(false);
- super::Destroyed();
+ Super::Destroyed();
}
@@ -306,7 +306,7 @@ void cPlayer::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
ASSERT(a_Chunk.IsValid());
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
// Handle charging the bow:
if (m_IsChargingBow)
@@ -600,7 +600,7 @@ void cPlayer::SetTouchGround(bool a_bTouchGround)
void cPlayer::Heal(int a_Health)
{
- super::Heal(a_Health);
+ Super::Heal(a_Health);
SendHealth();
}
@@ -1024,7 +1024,7 @@ bool cPlayer::DoTakeDamage(TakeDamageInfo & a_TDI)
}
}
- if (super::DoTakeDamage(a_TDI))
+ if (Super::DoTakeDamage(a_TDI))
{
// Any kind of damage adds food exhaustion
AddFoodExhaustion(0.3f);
@@ -1074,7 +1074,7 @@ void cPlayer::NotifyNearbyWolves(cPawn * a_Opponent, bool a_IsPlayerInvolved)
void cPlayer::KilledBy(TakeDamageInfo & a_TDI)
{
- super::KilledBy(a_TDI);
+ Super::KilledBy(a_TDI);
if (m_Health > 0)
{
@@ -1766,7 +1766,7 @@ void cPlayer::DoSetSpeed(double a_SpeedX, double a_SpeedY, double a_SpeedZ)
// Do not set speed to a frozen client
return;
}
- super::DoSetSpeed(a_SpeedX, a_SpeedY, a_SpeedZ);
+ Super::DoSetSpeed(a_SpeedX, a_SpeedY, a_SpeedZ);
// Send the speed to the client so he actualy moves
m_ClientHandle->SendEntityVelocity(*this);
}
@@ -2878,7 +2878,7 @@ void cPlayer::AttachTo(cEntity * a_AttachTo)
return;
}
- super::AttachTo(a_AttachTo);
+ Super::AttachTo(a_AttachTo);
}
@@ -2902,7 +2902,7 @@ void cPlayer::Detach()
return;
}
- super::Detach();
+ Super::Detach();
int PosX = POSX_TOINT;
int PosY = POSY_TOINT;
int PosZ = POSZ_TOINT;
@@ -3099,7 +3099,7 @@ float cPlayer::GetExplosionExposureRate(Vector3d a_ExplosionPosition, float a_Ex
return 0; // No impact from explosion
}
- return super::GetExplosionExposureRate(a_ExplosionPosition, a_ExlosionPower) / 30.0f;
+ return Super::GetExplosionExposureRate(a_ExplosionPosition, a_ExlosionPower) / 30.0f;
}
diff --git a/src/Entities/Player.h b/src/Entities/Player.h
index 3ba87f748..a28e37be0 100644
--- a/src/Entities/Player.h
+++ b/src/Entities/Player.h
@@ -24,12 +24,18 @@ class cTeam;
// tolua_begin
-class cPlayer :
+class cPlayer:
public cPawn
{
- typedef cPawn super;
+
+ // tolua_end
+
+ using Super = cPawn;
+
+ // tolua_begin
public:
+
static const int MAX_HEALTH;
static const int MAX_FOOD_LEVEL;
diff --git a/src/Entities/ProjectileEntity.cpp b/src/Entities/ProjectileEntity.cpp
index 9314c875d..e4fec043e 100644
--- a/src/Entities/ProjectileEntity.cpp
+++ b/src/Entities/ProjectileEntity.cpp
@@ -226,7 +226,7 @@ protected:
// cProjectileEntity:
cProjectileEntity::cProjectileEntity(eKind a_Kind, cEntity * a_Creator, Vector3d a_Pos, double a_Width, double a_Height):
- super(etProjectile, a_Pos, a_Width, a_Height),
+ Super(etProjectile, a_Pos, a_Width, a_Height),
m_ProjectileKind(a_Kind),
m_CreatorData(
((a_Creator != nullptr) ? a_Creator->GetUniqueID() : cEntity::INVALID_ID),
@@ -244,7 +244,7 @@ cProjectileEntity::cProjectileEntity(eKind a_Kind, cEntity * a_Creator, Vector3d
cProjectileEntity::cProjectileEntity(eKind a_Kind, cEntity * a_Creator, Vector3d a_Pos, Vector3d a_Speed, double a_Width, double a_Height):
- super(etProjectile, a_Pos, a_Width, a_Height),
+ Super(etProjectile, a_Pos, a_Width, a_Height),
m_ProjectileKind(a_Kind),
m_CreatorData(a_Creator->GetUniqueID(), a_Creator->IsPlayer() ? static_cast<cPlayer *>(a_Creator)->GetName() : "", a_Creator->GetEquippedWeapon().m_Enchantments),
m_IsInGround(false)
@@ -370,7 +370,7 @@ AString cProjectileEntity::GetMCAClassName(void) const
void cProjectileEntity::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/Entities/ProjectileEntity.h b/src/Entities/ProjectileEntity.h
index c74fdd6af..439b10118 100644
--- a/src/Entities/ProjectileEntity.h
+++ b/src/Entities/ProjectileEntity.h
@@ -22,7 +22,7 @@ class cProjectileEntity :
{
// tolua_end
- using super = cEntity;
+ using Super = cEntity;
// tolua_begin
diff --git a/src/Entities/SplashPotionEntity.cpp b/src/Entities/SplashPotionEntity.cpp
index 15a0c3c9a..bfe708d06 100644
--- a/src/Entities/SplashPotionEntity.cpp
+++ b/src/Entities/SplashPotionEntity.cpp
@@ -25,7 +25,7 @@ cSplashPotionEntity::cSplashPotionEntity(
Vector3d a_Speed,
const cItem & a_Item
):
- super(pkSplashPotion, a_Creator, a_Pos, 0.25, 0.25),
+ Super(pkSplashPotion, a_Creator, a_Pos, 0.25, 0.25),
m_Item(a_Item),
m_DestroyTimer(-1)
{
diff --git a/src/Entities/SplashPotionEntity.h b/src/Entities/SplashPotionEntity.h
index b90d0a317..8427f34b3 100644
--- a/src/Entities/SplashPotionEntity.h
+++ b/src/Entities/SplashPotionEntity.h
@@ -26,7 +26,7 @@ class cSplashPotionEntity :
{
// tolua_end
- using super = cProjectileEntity;
+ using Super = cProjectileEntity;
public: // tolua_export
@@ -76,7 +76,7 @@ protected:
}
else
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
}
}
diff --git a/src/Entities/TNTEntity.cpp b/src/Entities/TNTEntity.cpp
index 6ee56b92a..ac9d68f72 100644
--- a/src/Entities/TNTEntity.cpp
+++ b/src/Entities/TNTEntity.cpp
@@ -9,7 +9,7 @@
cTNTEntity::cTNTEntity(Vector3d a_Pos, int a_FuseTicks) :
- super(etTNT, a_Pos, 0.98, 0.98),
+ Super(etTNT, a_Pos, 0.98, 0.98),
m_FuseTicks(a_FuseTicks)
{
SetGravity(-16.0f);
@@ -45,7 +45,7 @@ void cTNTEntity::Explode(void)
void cTNTEntity::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/Entities/TNTEntity.h b/src/Entities/TNTEntity.h
index 25c74ded5..ef8b8ec3c 100644
--- a/src/Entities/TNTEntity.h
+++ b/src/Entities/TNTEntity.h
@@ -7,13 +7,16 @@
// tolua_begin
-class cTNTEntity :
+class cTNTEntity:
public cEntity
{
- typedef cEntity super;
-public:
// tolua_end
+
+ using Super = cEntity;
+
+public: // tolua_export
+
CLASS_PROTODEF(cTNTEntity)
cTNTEntity(Vector3d a_Pos, int a_FuseTicks = 80);
diff --git a/src/Entities/ThrownEggEntity.cpp b/src/Entities/ThrownEggEntity.cpp
index 14832beed..bc5ed665e 100644
--- a/src/Entities/ThrownEggEntity.cpp
+++ b/src/Entities/ThrownEggEntity.cpp
@@ -8,7 +8,7 @@
cThrownEggEntity::cThrownEggEntity(cEntity * a_Creator, Vector3d a_Pos, Vector3d a_Speed):
- super(pkEgg, a_Creator, a_Pos, 0.25, 0.25),
+ Super(pkEgg, a_Creator, a_Pos, 0.25, 0.25),
m_DestroyTimer(-1)
{
SetSpeed(a_Speed);
@@ -64,7 +64,7 @@ void cThrownEggEntity::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
}
else
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
}
}
diff --git a/src/Entities/ThrownEggEntity.h b/src/Entities/ThrownEggEntity.h
index d49153d49..f6240a680 100644
--- a/src/Entities/ThrownEggEntity.h
+++ b/src/Entities/ThrownEggEntity.h
@@ -22,7 +22,7 @@ class cThrownEggEntity :
{
// tolua_end
- using super = cProjectileEntity;
+ using Super = cProjectileEntity;
public: // tolua_export
diff --git a/src/Entities/ThrownEnderPearlEntity.cpp b/src/Entities/ThrownEnderPearlEntity.cpp
index 8cc266ef6..4f1029b27 100644
--- a/src/Entities/ThrownEnderPearlEntity.cpp
+++ b/src/Entities/ThrownEnderPearlEntity.cpp
@@ -9,7 +9,7 @@
cThrownEnderPearlEntity::cThrownEnderPearlEntity(cEntity * a_Creator, Vector3d a_Pos, Vector3d a_Speed):
- super(pkEnderPearl, a_Creator, a_Pos, 0.25, 0.25),
+ Super(pkEnderPearl, a_Creator, a_Pos, 0.25, 0.25),
m_DestroyTimer(-1)
{
SetSpeed(a_Speed);
@@ -59,7 +59,7 @@ void cThrownEnderPearlEntity::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Ch
}
else
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
}
}
diff --git a/src/Entities/ThrownEnderPearlEntity.h b/src/Entities/ThrownEnderPearlEntity.h
index ad1761f8e..c61b20401 100644
--- a/src/Entities/ThrownEnderPearlEntity.h
+++ b/src/Entities/ThrownEnderPearlEntity.h
@@ -22,7 +22,7 @@ class cThrownEnderPearlEntity :
{
// tolua_end
- using super = cProjectileEntity;
+ using Super = cProjectileEntity;
public: // tolua_export
diff --git a/src/Entities/ThrownSnowballEntity.cpp b/src/Entities/ThrownSnowballEntity.cpp
index 5dadcc15e..d10aaf25d 100644
--- a/src/Entities/ThrownSnowballEntity.cpp
+++ b/src/Entities/ThrownSnowballEntity.cpp
@@ -8,7 +8,7 @@
cThrownSnowballEntity::cThrownSnowballEntity(cEntity * a_Creator, Vector3d a_Pos, Vector3d a_Speed):
- super(pkSnowball, a_Creator, a_Pos, 0.25, 0.25),
+ Super(pkSnowball, a_Creator, a_Pos, 0.25, 0.25),
m_DestroyTimer(-1)
{
SetSpeed(a_Speed);
@@ -29,7 +29,7 @@ void cThrownSnowballEntity::OnHitSolidBlock(Vector3d a_HitPos, eBlockFace a_HitF
void cThrownSnowballEntity::OnHitEntity(cEntity & a_EntityHit, Vector3d a_HitPos)
{
- super::OnHitEntity(a_EntityHit, a_HitPos);
+ Super::OnHitEntity(a_EntityHit, a_HitPos);
int TotalDamage = 0;
if (a_EntityHit.IsMob())
@@ -63,7 +63,7 @@ void cThrownSnowballEntity::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chun
}
else
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
}
}
diff --git a/src/Entities/ThrownSnowballEntity.h b/src/Entities/ThrownSnowballEntity.h
index 79010071b..a4fcd3cb6 100644
--- a/src/Entities/ThrownSnowballEntity.h
+++ b/src/Entities/ThrownSnowballEntity.h
@@ -22,7 +22,7 @@ class cThrownSnowballEntity :
{
// tolua_end
- using super = cProjectileEntity;
+ using Super = cProjectileEntity;
public: // tolua_export
diff --git a/src/Entities/WitherSkullEntity.cpp b/src/Entities/WitherSkullEntity.cpp
index 55f1ff32f..1bb17ab2b 100644
--- a/src/Entities/WitherSkullEntity.cpp
+++ b/src/Entities/WitherSkullEntity.cpp
@@ -13,7 +13,7 @@
cWitherSkullEntity::cWitherSkullEntity(cEntity * a_Creator, Vector3d a_Pos, Vector3d a_Speed):
- super(pkWitherSkull, a_Creator, a_Pos, 0.25, 0.25)
+ Super(pkWitherSkull, a_Creator, a_Pos, 0.25, 0.25)
{
SetSpeed(a_Speed);
SetGravity(0);
diff --git a/src/Entities/WitherSkullEntity.h b/src/Entities/WitherSkullEntity.h
index f70b71bf5..f335b1da7 100644
--- a/src/Entities/WitherSkullEntity.h
+++ b/src/Entities/WitherSkullEntity.h
@@ -22,7 +22,7 @@ public cProjectileEntity
{
// tolua_end
- using super = cProjectileEntity;
+ using Super = cProjectileEntity;
public: // tolua_export