summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2021-04-06 17:09:16 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2021-04-12 23:35:07 +0200
commit6e80f7544d786443d3028308e244b04dd8d5abcb (patch)
tree7d9cd372cefa110a4a7c14078a04e9829cba00f4
parentStreamline player abilities handling (diff)
downloadcuberite-6e80f7544d786443d3028308e244b04dd8d5abcb.tar
cuberite-6e80f7544d786443d3028308e244b04dd8d5abcb.tar.gz
cuberite-6e80f7544d786443d3028308e244b04dd8d5abcb.tar.bz2
cuberite-6e80f7544d786443d3028308e244b04dd8d5abcb.tar.lz
cuberite-6e80f7544d786443d3028308e244b04dd8d5abcb.tar.xz
cuberite-6e80f7544d786443d3028308e244b04dd8d5abcb.tar.zst
cuberite-6e80f7544d786443d3028308e244b04dd8d5abcb.zip
-rw-r--r--src/Entities/ArrowEntity.cpp2
-rw-r--r--src/Entities/Boat.cpp2
-rw-r--r--src/Entities/EnderCrystal.cpp4
-rw-r--r--src/Entities/Entity.cpp18
-rw-r--r--src/Entities/Entity.h21
-rw-r--r--src/Entities/ExpBottleEntity.cpp2
-rw-r--r--src/Entities/ExpOrb.cpp2
-rw-r--r--src/Entities/FallingBlock.cpp2
-rw-r--r--src/Entities/FireChargeEntity.cpp2
-rw-r--r--src/Entities/FireworkEntity.cpp2
-rw-r--r--src/Entities/Floater.cpp2
-rw-r--r--src/Entities/HangingEntity.cpp2
-rw-r--r--src/Entities/Minecart.cpp2
-rw-r--r--src/Entities/Pawn.cpp2
-rw-r--r--src/Entities/Pawn.h2
-rw-r--r--src/Entities/Pickup.cpp2
-rw-r--r--src/Entities/Player.cpp12
-rw-r--r--src/Entities/Player.h3
-rw-r--r--src/Entities/ProjectileEntity.cpp4
-rw-r--r--src/Entities/ProjectileEntity.h4
-rw-r--r--src/Entities/SplashPotionEntity.cpp2
-rw-r--r--src/Entities/TNTEntity.cpp2
-rw-r--r--src/Entities/ThrownEggEntity.cpp2
-rw-r--r--src/Entities/ThrownEnderPearlEntity.cpp2
-rw-r--r--src/Entities/ThrownSnowballEntity.cpp2
-rw-r--r--src/Entities/WitherSkullEntity.cpp2
-rw-r--r--src/Mobs/AggressiveMonster.cpp2
-rw-r--r--src/Mobs/AggressiveMonster.h4
-rw-r--r--src/Mobs/Bat.cpp2
-rw-r--r--src/Mobs/Blaze.cpp2
-rw-r--r--src/Mobs/CaveSpider.cpp2
-rw-r--r--src/Mobs/Chicken.cpp2
-rw-r--r--src/Mobs/Cow.cpp2
-rw-r--r--src/Mobs/Creeper.cpp2
-rw-r--r--src/Mobs/EnderDragon.cpp3
-rw-r--r--src/Mobs/Enderman.cpp2
-rw-r--r--src/Mobs/Giant.cpp2
-rw-r--r--src/Mobs/Guardian.cpp2
-rw-r--r--src/Mobs/Horse.cpp2
-rw-r--r--src/Mobs/IronGolem.cpp2
-rw-r--r--src/Mobs/MagmaCube.cpp10
-rw-r--r--src/Mobs/Monster.cpp2
-rw-r--r--src/Mobs/Monster.h2
-rw-r--r--src/Mobs/Mooshroom.cpp2
-rw-r--r--src/Mobs/Ocelot.cpp2
-rw-r--r--src/Mobs/PassiveAggressiveMonster.cpp2
-rw-r--r--src/Mobs/PassiveAggressiveMonster.h4
-rw-r--r--src/Mobs/PassiveMonster.cpp2
-rw-r--r--src/Mobs/PassiveMonster.h4
-rw-r--r--src/Mobs/PathFinder.cpp7
-rw-r--r--src/Mobs/PathFinder.h6
-rw-r--r--src/Mobs/Pig.cpp2
-rw-r--r--src/Mobs/Rabbit.cpp2
-rw-r--r--src/Mobs/Sheep.cpp2
-rw-r--r--src/Mobs/Silverfish.cpp9
-rw-r--r--src/Mobs/Silverfish.h5
-rw-r--r--src/Mobs/Skeleton.cpp2
-rw-r--r--src/Mobs/Slime.cpp4
-rw-r--r--src/Mobs/SnowGolem.cpp2
-rw-r--r--src/Mobs/Spider.cpp2
-rw-r--r--src/Mobs/Squid.cpp2
-rw-r--r--src/Mobs/Villager.cpp2
-rw-r--r--src/Mobs/Witch.cpp2
-rw-r--r--src/Mobs/Wither.cpp2
-rw-r--r--src/Mobs/WitherSkeleton.cpp2
-rw-r--r--src/Mobs/Wolf.cpp2
-rw-r--r--src/Mobs/Zombie.cpp2
-rw-r--r--src/Mobs/ZombiePigman.cpp2
-rw-r--r--src/Mobs/ZombieVillager.cpp2
-rw-r--r--tests/Generating/Stubs.cpp10
70 files changed, 124 insertions, 112 deletions
diff --git a/src/Entities/ArrowEntity.cpp b/src/Entities/ArrowEntity.cpp
index e72743b3a..c7c088361 100644
--- a/src/Entities/ArrowEntity.cpp
+++ b/src/Entities/ArrowEntity.cpp
@@ -10,7 +10,7 @@
cArrowEntity::cArrowEntity(cEntity * a_Creator, Vector3d a_Pos, Vector3d a_Speed):
- Super(pkArrow, a_Creator, a_Pos, a_Speed, 0.5, 0.5),
+ Super(pkArrow, a_Creator, a_Pos, a_Speed, 0.5f, 0.5f),
m_PickupState(psNoPickup),
m_DamageCoeff(2),
m_IsCritical(false),
diff --git a/src/Entities/Boat.cpp b/src/Entities/Boat.cpp
index 9d804052d..1016773e9 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, 1.375f, 0.5625f),
m_LastDamage(0), m_ForwardDirection(0),
m_DamageTaken(0.0f), m_Material(a_Material),
m_RightPaddleUsed(false), m_LeftPaddleUsed(false)
diff --git a/src/Entities/EnderCrystal.cpp b/src/Entities/EnderCrystal.cpp
index defa396f5..07fd56dad 100644
--- a/src/Entities/EnderCrystal.cpp
+++ b/src/Entities/EnderCrystal.cpp
@@ -20,7 +20,7 @@ cEnderCrystal::cEnderCrystal(Vector3d a_Pos, bool a_ShowBottom) :
cEnderCrystal::cEnderCrystal(Vector3d a_Pos, Vector3i a_BeamTarget, bool a_DisplayBeam, bool a_ShowBottom) :
- Super(etEnderCrystal, a_Pos, 1.0, 1.0),
+ Super(etEnderCrystal, a_Pos, 2.0f, 2.0f),
m_BeamTarget(a_BeamTarget),
m_DisplayBeam(a_DisplayBeam),
m_ShowBottom(a_ShowBottom)
@@ -92,7 +92,7 @@ void cEnderCrystal::KilledBy(TakeDamageInfo & a_TDI)
// Destroy first so the Explodinator doesn't find us (when iterating through entities):
Destroy();
- m_World->DoExplosionAt(6.0, GetPosX(), GetPosY() + (GetHeight() / 2.0), GetPosZ(), true, esEnderCrystal, this);
+ m_World->DoExplosionAt(6.0, GetPosX(), GetPosY() + GetHeight() / 2, GetPosZ(), true, esEnderCrystal, this);
const auto Position = GetPosition().Floor();
if (cChunkDef::IsValidHeight(Position.y))
diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp
index 6c777aca4..c8a6b8ef9 100644
--- a/src/Entities/Entity.cpp
+++ b/src/Entities/Entity.cpp
@@ -33,7 +33,7 @@ static UInt32 GetNextUniqueID(void)
////////////////////////////////////////////////////////////////////////////////
// cEntity:
-cEntity::cEntity(eEntityType a_EntityType, Vector3d a_Pos, double a_Width, double a_Height):
+cEntity::cEntity(eEntityType a_EntityType, Vector3d a_Pos, float a_Width, float a_Height):
m_UniqueID(GetNextUniqueID()),
m_Health(1),
m_MaxHealth(1),
@@ -59,8 +59,6 @@ cEntity::cEntity(eEntityType a_EntityType, Vector3d a_Pos, double a_Width, doubl
m_IsInLava(false),
m_IsInWater(false),
m_IsHeadInWater(false),
- m_Width(a_Width),
- m_Height(a_Height),
m_AirLevel(MAX_AIR_LEVEL),
m_AirTickTimer(DROWNING_TICKS),
m_TicksAlive(0),
@@ -71,6 +69,8 @@ cEntity::cEntity(eEntityType a_EntityType, Vector3d a_Pos, double a_Width, doubl
m_Position(a_Pos),
m_WaterSpeed(0, 0, 0),
m_Mass (0.001), // Default 1g
+ m_Width(a_Width),
+ m_Height(a_Height),
m_InvulnerableTicks(0)
{
m_WorldChangeInfo.m_NewWorld = nullptr;
@@ -1098,7 +1098,7 @@ void cEntity::HandlePhysics(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
NextPos = HitCoords;
// Avoid movement in the direction of the blockface that has been hit and correct for collision box:
- double HalfWidth = GetWidth() / 2.0;
+ const auto HalfWidth = GetWidth() / 2;
switch (HitBlockFace)
{
case BLOCK_FACE_XM:
@@ -1714,6 +1714,16 @@ void cEntity::SetIsTicking(bool a_IsTicking)
+void cEntity::SetSize(const float a_Width, const float a_Height)
+{
+ m_Width = a_Width;
+ m_Height = a_Height;
+}
+
+
+
+
+
void cEntity::HandleAir(void)
{
// Ref.: https://minecraft.gamepedia.com/Chunk_format
diff --git a/src/Entities/Entity.h b/src/Entities/Entity.h
index 559f4eb66..c3ccaa228 100644
--- a/src/Entities/Entity.h
+++ b/src/Entities/Entity.h
@@ -169,7 +169,7 @@ public:
static const UInt32 INVALID_ID = 0; // Exported to Lua in ManualBindings.cpp, ToLua doesn't parse initialized constants.
- cEntity(eEntityType a_EntityType, Vector3d a_Pos, double a_Width, double a_Height);
+ cEntity(eEntityType a_EntityType, Vector3d a_Pos, float a_Width, float a_Height);
virtual ~cEntity() = default;
/** Spawns the entity in the world; returns true if spawned, false if not (plugin disallowed).
@@ -225,7 +225,7 @@ public:
cWorld * GetWorld(void) const { return m_World; }
double GetHeadYaw (void) const { return m_HeadYaw; } // In degrees
- double GetHeight (void) const { return m_Height; }
+ float GetHeight (void) const { return m_Height; }
double GetMass (void) const { return m_Mass; }
double GetPosX (void) const { return m_Position.x; }
double GetPosY (void) const { return m_Position.y; }
@@ -237,7 +237,7 @@ public:
double GetSpeedX (void) const { return m_Speed.x; }
double GetSpeedY (void) const { return m_Speed.y; }
double GetSpeedZ (void) const { return m_Speed.z; }
- double GetWidth (void) const { return m_Width; }
+ float GetWidth (void) const { return m_Width; }
int GetChunkX(void) const { return FloorC(m_Position.x / cChunkDef::Width); }
int GetChunkZ(void) const { return FloorC(m_Position.z / cChunkDef::Width); }
@@ -579,6 +579,9 @@ public:
/** Set the entity's status to either ticking or not ticking. */
void SetIsTicking(bool a_IsTicking);
+ /** Update an entity's size, for example, on body stance changes. */
+ void SetSize(float a_Width, float a_Height);
+
/** Adds a mob to the leashed list of mobs. */
void AddLeashedMob(cMonster * a_Monster);
@@ -686,12 +689,6 @@ protected:
/** If the entity's head is in a water block */
bool m_IsHeadInWater;
- /** Width of the entity, in the XZ plane. Since entities are represented as cylinders, this is more of a diameter. */
- double m_Width;
-
- /** Height of the entity (Y axis). */
- double m_Height;
-
/** Air level of a mobile */
int m_AirLevel;
int m_AirTickTimer;
@@ -748,6 +745,12 @@ private:
/** Measured in Kilograms (Kg) */
double m_Mass;
+ /** Width of the entity, in the XZ plane. Since entities are represented as cylinders, this is more of a diameter. */
+ float m_Width;
+
+ /** Height of the entity (Y axis). */
+ float m_Height;
+
/** If a player hit a entity, the entity receive a invulnerable of 10 ticks.
While this ticks, a player can't hit this entity. */
int m_InvulnerableTicks;
diff --git a/src/Entities/ExpBottleEntity.cpp b/src/Entities/ExpBottleEntity.cpp
index 96c063f4e..f089ecb18 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.25f, 0.25f)
{
SetSpeed(a_Speed);
}
diff --git a/src/Entities/ExpOrb.cpp b/src/Entities/ExpOrb.cpp
index 5f1b5cbe2..125ea394a 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.5f, 0.5f),
m_Reward(a_Reward),
m_Timer(0)
{
diff --git a/src/Entities/FallingBlock.cpp b/src/Entities/FallingBlock.cpp
index dd3ba59cc..aa6baae82 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.98f, 0.98f),
m_BlockType(a_BlockType),
m_BlockMeta(a_BlockMeta)
{
diff --git a/src/Entities/FireChargeEntity.cpp b/src/Entities/FireChargeEntity.cpp
index 3ac815ec6..7971c4cb7 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.3125f, 0.3125f)
{
SetSpeed(a_Speed);
SetGravity(0);
diff --git a/src/Entities/FireworkEntity.cpp b/src/Entities/FireworkEntity.cpp
index 987d5a329..eb386cdfc 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.25f, 0.25f),
m_TicksToExplosion(a_Item.m_FireworkItem.m_FlightTimeInTicks),
m_FireworkItem(a_Item)
{
diff --git a/src/Entities/Floater.cpp b/src/Entities/Floater.cpp
index 2738c12d3..73c364961 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.25f, 0.25f),
m_BitePos(a_Pos),
m_CanPickupItem(false),
m_PickupCountDown(0),
diff --git a/src/Entities/HangingEntity.cpp b/src/Entities/HangingEntity.cpp
index 20b751c74..c20415e36 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.5f, 0.5f),
m_Facing(cHangingEntity::BlockFaceToProtocolFace(a_Facing))
{
SetMaxHealth(1);
diff --git a/src/Entities/Minecart.cpp b/src/Entities/Minecart.cpp
index c4636c5b1..1f454c857 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.98f, 0.7f),
m_Payload(a_Payload),
m_LastDamage(0),
m_DetectorRailPosition(0, 0, 0),
diff --git a/src/Entities/Pawn.cpp b/src/Entities/Pawn.cpp
index ef552d89d..cc11323e1 100644
--- a/src/Entities/Pawn.cpp
+++ b/src/Entities/Pawn.cpp
@@ -14,7 +14,7 @@
-cPawn::cPawn(eEntityType a_EntityType, double a_Width, double a_Height) :
+cPawn::cPawn(eEntityType a_EntityType, float a_Width, float a_Height) :
Super(a_EntityType, Vector3d(), a_Width, a_Height),
m_EntityEffects(tEffectMap()),
m_LastGroundHeight(0),
diff --git a/src/Entities/Pawn.h b/src/Entities/Pawn.h
index ab8d66a58..706c51e49 100644
--- a/src/Entities/Pawn.h
+++ b/src/Entities/Pawn.h
@@ -22,7 +22,7 @@ public:
CLASS_PROTODEF(cPawn)
- cPawn(eEntityType a_EntityType, double a_Width, double a_Height);
+ cPawn(eEntityType a_EntityType, float a_Width, float a_Height);
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
virtual void KilledBy(TakeDamageInfo & a_TDI) override;
diff --git a/src/Entities/Pickup.cpp b/src/Entities/Pickup.cpp
index 4b05c2b9b..39fff913d 100644
--- a/src/Entities/Pickup.cpp
+++ b/src/Entities/Pickup.cpp
@@ -94,7 +94,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.25f, 0.25f),
m_Timer(0),
m_Item(a_Item),
m_bCollected(false),
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index 9725118ee..8c047c533 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -104,7 +104,7 @@ cPlayer::BodyStanceGliding::BodyStanceGliding(cPlayer & a_Player) :
cPlayer::cPlayer(const std::shared_ptr<cClientHandle> & a_Client) :
- Super(etPlayer, 0.6, 1.8),
+ Super(etPlayer, 0.6f, 1.8f),
m_BodyStance(BodyStanceStanding(*this)),
m_FoodLevel(MAX_FOOD_LEVEL),
m_FoodSaturationLevel(5.0),
@@ -2821,16 +2821,6 @@ void cPlayer::AddKnownItem(const cItem & a_Item)
-void cPlayer::SetSize(const float a_Width, const float a_Height)
-{
- m_Width = a_Width;
- m_Height = a_Height;
-}
-
-
-
-
-
void cPlayer::AddKnownRecipe(UInt32 a_RecipeId)
{
auto Response = m_KnownRecipes.insert(a_RecipeId);
diff --git a/src/Entities/Player.h b/src/Entities/Player.h
index fd4d22d84..8969099a1 100644
--- a/src/Entities/Player.h
+++ b/src/Entities/Player.h
@@ -592,9 +592,6 @@ public:
If the item is already known, does nothing. */
void AddKnownItem(const cItem & a_Item);
- /** Update a player's size, for example, on body stance changes. */
- void SetSize(float a_Width, float a_Height);
-
// cEntity overrides:
virtual void AttachTo(cEntity * a_AttachTo) override;
virtual void Detach(void) override;
diff --git a/src/Entities/ProjectileEntity.cpp b/src/Entities/ProjectileEntity.cpp
index c72cebaaf..745f7de13 100644
--- a/src/Entities/ProjectileEntity.cpp
+++ b/src/Entities/ProjectileEntity.cpp
@@ -219,7 +219,7 @@ protected:
////////////////////////////////////////////////////////////////////////////////
// cProjectileEntity:
-cProjectileEntity::cProjectileEntity(eKind a_Kind, cEntity * a_Creator, Vector3d a_Pos, double a_Width, double a_Height):
+cProjectileEntity::cProjectileEntity(eKind a_Kind, cEntity * a_Creator, Vector3d a_Pos, float a_Width, float a_Height):
Super(etProjectile, a_Pos, a_Width, a_Height),
m_ProjectileKind(a_Kind),
m_CreatorData(
@@ -237,7 +237,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):
+cProjectileEntity::cProjectileEntity(eKind a_Kind, cEntity * a_Creator, Vector3d a_Pos, Vector3d a_Speed, float a_Width, float a_Height):
cProjectileEntity(a_Kind, a_Creator, a_Pos, a_Width, a_Height)
{
SetSpeed(a_Speed);
diff --git a/src/Entities/ProjectileEntity.h b/src/Entities/ProjectileEntity.h
index ddd09f831..1c8c00854 100644
--- a/src/Entities/ProjectileEntity.h
+++ b/src/Entities/ProjectileEntity.h
@@ -48,8 +48,8 @@ public:
CLASS_PROTODEF(cProjectileEntity)
- cProjectileEntity(eKind a_Kind, cEntity * a_Creator, Vector3d a_Pos, double a_Width, double a_Height);
- cProjectileEntity(eKind a_Kind, cEntity * a_Creator, Vector3d a_Pos, Vector3d a_Speed, double a_Width, double a_Height);
+ cProjectileEntity(eKind a_Kind, cEntity * a_Creator, Vector3d a_Pos, float a_Width, float a_Height);
+ cProjectileEntity(eKind a_Kind, cEntity * a_Creator, Vector3d a_Pos, Vector3d a_Speed, float a_Width, float a_Height);
/** Creates a new instance of the specified projectile entity.
a_Item is the item from which the projectile originated (such as firework or arrow). */
diff --git a/src/Entities/SplashPotionEntity.cpp b/src/Entities/SplashPotionEntity.cpp
index ce081aed1..bf23b8ffb 100644
--- a/src/Entities/SplashPotionEntity.cpp
+++ b/src/Entities/SplashPotionEntity.cpp
@@ -17,7 +17,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.25f, 0.25f),
m_Item(a_Item),
m_DestroyTimer(-1)
{
diff --git a/src/Entities/TNTEntity.cpp b/src/Entities/TNTEntity.cpp
index ef013c347..0d7340513 100644
--- a/src/Entities/TNTEntity.cpp
+++ b/src/Entities/TNTEntity.cpp
@@ -9,7 +9,7 @@
cTNTEntity::cTNTEntity(Vector3d a_Pos, unsigned a_FuseTicks) :
- Super(etTNT, a_Pos, 0.98, 0.98),
+ Super(etTNT, a_Pos, 0.98f, 0.98f),
m_FuseTicks(a_FuseTicks)
{
SetGravity(-16.0f);
diff --git a/src/Entities/ThrownEggEntity.cpp b/src/Entities/ThrownEggEntity.cpp
index bc5ed665e..b8289b64b 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.25f, 0.25f),
m_DestroyTimer(-1)
{
SetSpeed(a_Speed);
diff --git a/src/Entities/ThrownEnderPearlEntity.cpp b/src/Entities/ThrownEnderPearlEntity.cpp
index ec4af7a7c..e6d708917 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.25f, 0.25f),
m_DestroyTimer(-1)
{
SetSpeed(a_Speed);
diff --git a/src/Entities/ThrownSnowballEntity.cpp b/src/Entities/ThrownSnowballEntity.cpp
index d10aaf25d..63068e69d 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.25f, 0.25f),
m_DestroyTimer(-1)
{
SetSpeed(a_Speed);
diff --git a/src/Entities/WitherSkullEntity.cpp b/src/Entities/WitherSkullEntity.cpp
index 1bb17ab2b..22e474395 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.3125f, 0.3125f)
{
SetSpeed(a_Speed);
SetGravity(0);
diff --git a/src/Mobs/AggressiveMonster.cpp b/src/Mobs/AggressiveMonster.cpp
index 17912a090..bcc824bba 100644
--- a/src/Mobs/AggressiveMonster.cpp
+++ b/src/Mobs/AggressiveMonster.cpp
@@ -11,7 +11,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) :
+cAggressiveMonster::cAggressiveMonster(const AString & a_ConfigName, eMonsterType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, const AString & a_SoundAmbient, float a_Width, float a_Height) :
Super(a_ConfigName, a_MobType, a_SoundHurt, a_SoundDeath, a_SoundAmbient, a_Width, a_Height)
{
m_EMPersonality = AGGRESSIVE;
diff --git a/src/Mobs/AggressiveMonster.h b/src/Mobs/AggressiveMonster.h
index 1a4f28943..8f648eab9 100644
--- a/src/Mobs/AggressiveMonster.h
+++ b/src/Mobs/AggressiveMonster.h
@@ -20,8 +20,8 @@ public:
const AString & a_SoundHurt,
const AString & a_SoundDeath,
const AString & a_SoundAmbient,
- double a_Width,
- double a_Height
+ float a_Width,
+ float a_Height
);
virtual void Tick (std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
diff --git a/src/Mobs/Bat.cpp b/src/Mobs/Bat.cpp
index 93e117e76..28ae76f6f 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.5f, 0.9f)
{
SetGravity(-2.0f);
SetAirDrag(0.05f);
diff --git a/src/Mobs/Blaze.cpp b/src/Mobs/Blaze.cpp
index a1c41d392..b771ef7e7 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.6f, 1.8f),
m_IsCharging(false),
m_ChargeTimer(0)
{
diff --git a/src/Mobs/CaveSpider.cpp b/src/Mobs/CaveSpider.cpp
index 7e0dd30c5..bd9e5f07b 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.7f, 0.5f)
{
}
diff --git a/src/Mobs/Chicken.cpp b/src/Mobs/Chicken.cpp
index eacbd482d..1a6d62fce 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.4f, 0.7f),
m_EggDropTimer(0)
{
SetGravity(-2.0f);
diff --git a/src/Mobs/Cow.cpp b/src/Mobs/Cow.cpp
index bdbdb87d9..1f9fd7456 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.9f, 1.4f)
{
}
diff --git a/src/Mobs/Creeper.cpp b/src/Mobs/Creeper.cpp
index e824c7352..0461bcc2a 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.6f, 1.7f),
m_bIsBlowing(false),
m_bIsCharged(false),
m_BurnedWithFlintAndSteel(false),
diff --git a/src/Mobs/EnderDragon.cpp b/src/Mobs/EnderDragon.cpp
index e33fb21f1..30b3ed0fb 100644
--- a/src/Mobs/EnderDragon.cpp
+++ b/src/Mobs/EnderDragon.cpp
@@ -10,8 +10,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, 8)
{
}
diff --git a/src/Mobs/Enderman.cpp b/src/Mobs/Enderman.cpp
index a107762c6..656668fb3 100644
--- a/src/Mobs/Enderman.cpp
+++ b/src/Mobs/Enderman.cpp
@@ -79,7 +79,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.6f, 2.9f),
m_bIsScreaming(false),
m_CarriedBlock(E_BLOCK_AIR),
m_CarriedMeta(0)
diff --git a/src/Mobs/Giant.cpp b/src/Mobs/Giant.cpp
index f6b36b6f7..ad5e0da54 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.6f, 12)
{
}
diff --git a/src/Mobs/Guardian.cpp b/src/Mobs/Guardian.cpp
index fbc10172d..f9c80d1e5 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.85f, 0.85f)
{
}
diff --git a/src/Mobs/Horse.cpp b/src/Mobs/Horse.cpp
index d3ba066cc..bb688d035 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.4f, 1.6f),
cEntityWindowOwner(this),
m_bHasChest(false),
m_bIsEating(false),
diff --git a/src/Mobs/IronGolem.cpp b/src/Mobs/IronGolem.cpp
index c1f6c3809..0ad25f822 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.4f, 2.7f)
{
}
diff --git a/src/Mobs/MagmaCube.cpp b/src/Mobs/MagmaCube.cpp
index 369cda6d9..e84577433 100644
--- a/src/Mobs/MagmaCube.cpp
+++ b/src/Mobs/MagmaCube.cpp
@@ -7,7 +7,15 @@
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.51f * a_Size,
+ 0.51f * a_Size
+ ),
m_Size(a_Size)
{
}
diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp
index 74cceff91..1537a8a74 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)
+cMonster::cMonster(const AString & a_ConfigName, eMonsterType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, const AString & a_SoundAmbient, float a_Width, float a_Height)
: Super(etMonster, a_Width, a_Height)
, m_EMState(IDLE)
, m_EMPersonality(AGGRESSIVE)
diff --git a/src/Mobs/Monster.h b/src/Mobs/Monster.h
index aca32e0ef..410754663 100644
--- a/src/Mobs/Monster.h
+++ b/src/Mobs/Monster.h
@@ -45,7 +45,7 @@ public:
a_MobType is the type of the mob (also used in the protocol ( http://wiki.vg/Entities#Mobs 2012_12_22))
a_SoundHurt and a_SoundDeath are assigned into m_SoundHurt and m_SoundDeath, respectively
*/
- 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);
+ cMonster(const AString & a_ConfigName, eMonsterType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, const AString & a_SoundAmbient, float a_Width, float a_Height);
CLASS_PROTODEF(cMonster)
diff --git a/src/Mobs/Mooshroom.cpp b/src/Mobs/Mooshroom.cpp
index 6318cdef2..1e0d13c9b 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.9f, 1.4f)
{
}
diff --git a/src/Mobs/Ocelot.cpp b/src/Mobs/Ocelot.cpp
index 2573808be..329c17527 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.6f, 0.7f),
m_IsSitting(false),
m_IsTame(false),
m_IsBegging(false),
diff --git a/src/Mobs/PassiveAggressiveMonster.cpp b/src/Mobs/PassiveAggressiveMonster.cpp
index d96b87566..16f8d7fdd 100644
--- a/src/Mobs/PassiveAggressiveMonster.cpp
+++ b/src/Mobs/PassiveAggressiveMonster.cpp
@@ -9,7 +9,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) :
+cPassiveAggressiveMonster::cPassiveAggressiveMonster(const AString & a_ConfigName, eMonsterType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, const AString & a_SoundAmbient, float a_Width, float a_Height) :
Super(a_ConfigName, a_MobType, a_SoundHurt, a_SoundDeath, a_SoundAmbient, a_Width, a_Height)
{
m_EMPersonality = PASSIVE;
diff --git a/src/Mobs/PassiveAggressiveMonster.h b/src/Mobs/PassiveAggressiveMonster.h
index f42c7a89b..50ecdb0c2 100644
--- a/src/Mobs/PassiveAggressiveMonster.h
+++ b/src/Mobs/PassiveAggressiveMonster.h
@@ -20,8 +20,8 @@ public:
const AString & a_SoundHurt,
const AString & a_SoundDeath,
const AString & a_SoundAmbient,
- double a_Width,
- double a_Height
+ float a_Width,
+ float a_Height
);
virtual bool DoTakeDamage(TakeDamageInfo & a_TDI) override;
diff --git a/src/Mobs/PassiveMonster.cpp b/src/Mobs/PassiveMonster.cpp
index 90d88024d..e86d7c87d 100644
--- a/src/Mobs/PassiveMonster.cpp
+++ b/src/Mobs/PassiveMonster.cpp
@@ -10,7 +10,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) :
+cPassiveMonster::cPassiveMonster(const AString & a_ConfigName, eMonsterType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, const AString & a_SoundAmbient, float a_Width, float a_Height) :
Super(a_ConfigName, a_MobType, a_SoundHurt, a_SoundDeath, a_SoundAmbient, a_Width, a_Height)
{
m_EMPersonality = PASSIVE;
diff --git a/src/Mobs/PassiveMonster.h b/src/Mobs/PassiveMonster.h
index 400cc3885..283326904 100644
--- a/src/Mobs/PassiveMonster.h
+++ b/src/Mobs/PassiveMonster.h
@@ -21,8 +21,8 @@ public:
const AString & a_SoundHurt,
const AString & a_SoundDeath,
const AString & a_SoundAmbient,
- double a_Width,
- double a_Height
+ float a_Width,
+ float a_Height
);
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
diff --git a/src/Mobs/PathFinder.cpp b/src/Mobs/PathFinder.cpp
index 9e63b7362..5356cedfe 100644
--- a/src/Mobs/PathFinder.cpp
+++ b/src/Mobs/PathFinder.cpp
@@ -8,13 +8,12 @@
-cPathFinder::cPathFinder(double a_MobWidth, double a_MobHeight) :
- m_Path(),
+cPathFinder::cPathFinder(float a_MobWidth, float a_MobHeight) :
+ m_Width(a_MobWidth),
+ m_Height(a_MobHeight),
m_GiveUpCounter(0),
m_NotFoundCooldown(0)
{
- m_Width = a_MobWidth;
- m_Height = a_MobHeight;
}
diff --git a/src/Mobs/PathFinder.h b/src/Mobs/PathFinder.h
index 213530b11..a4843744a 100644
--- a/src/Mobs/PathFinder.h
+++ b/src/Mobs/PathFinder.h
@@ -16,7 +16,7 @@ public:
@param a_MobWidth The mob width.
@param a_MobHeight The mob height.
*/
- cPathFinder(double a_MobWidth, double a_MobHeight);
+ cPathFinder(float a_MobWidth, float a_MobHeight);
/** Updates the PathFinder's internal state and returns a waypoint.
A waypoint is a coordinate which the mob can safely move to from its current position in a straight line.
@@ -41,10 +41,10 @@ public:
private:
/** The width of the Mob which owns this PathFinder. */
- double m_Width;
+ float m_Width;
/** The height of the Mob which owns this PathFinder. */
- double m_Height;
+ float m_Height;
/** The current cPath instance we have. This is discarded and recreated when a path recalculation is needed. */
std::unique_ptr<cPath> m_Path;
diff --git a/src/Mobs/Pig.cpp b/src/Mobs/Pig.cpp
index 2bcb94f2b..1ce6c01fb 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.9f, 0.9f),
m_bIsSaddled(false)
{
}
diff --git a/src/Mobs/Rabbit.cpp b/src/Mobs/Rabbit.cpp
index 1fb9cd7d3..d0d2fe4c1 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.4f, 0.5f),
m_Type(Type),
m_MoreCarrotTicks(MoreCarrotTicks)
{
diff --git a/src/Mobs/Sheep.cpp b/src/Mobs/Sheep.cpp
index 0a3f68e96..7808d3181 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.9f, 1.3f),
m_IsSheared(false),
m_WoolColor(a_Color),
m_TimeToStopEating(-1)
diff --git a/src/Mobs/Silverfish.cpp b/src/Mobs/Silverfish.cpp
index a11256076..37684f8bc 100644
--- a/src/Mobs/Silverfish.cpp
+++ b/src/Mobs/Silverfish.cpp
@@ -12,6 +12,15 @@
+cSilverfish::cSilverfish() :
+ Super("Silverfish", mtSilverfish, "entity.silverfish.hurt", "entity.silverfish.death", "entity.silverfish.ambient", 0.4f, 0.3f)
+{
+}
+
+
+
+
+
bool cSilverfish::DoTakeDamage(TakeDamageInfo &a_TDI)
{
// Call on our brethren to attack!
diff --git a/src/Mobs/Silverfish.h b/src/Mobs/Silverfish.h
index a9d3d2860..3b8ffa6e6 100644
--- a/src/Mobs/Silverfish.h
+++ b/src/Mobs/Silverfish.h
@@ -14,10 +14,7 @@ class cSilverfish:
public:
- cSilverfish():
- Super("Silverfish", mtSilverfish, "entity.silverfish.hurt", "entity.silverfish.death", "entity.silverfish.ambient", 0.3, 0.4)
- {
- }
+ cSilverfish();
CLASS_PROTODEF(cSilverfish)
diff --git a/src/Mobs/Skeleton.cpp b/src/Mobs/Skeleton.cpp
index 3af4cad6e..766899a26 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.6f, 1.99f)
{
}
diff --git a/src/Mobs/Slime.cpp b/src/Mobs/Slime.cpp
index 601d9b747..05ef188f2 100644
--- a/src/Mobs/Slime.cpp
+++ b/src/Mobs/Slime.cpp
@@ -15,8 +15,8 @@ cSlime::cSlime(int a_Size) :
Printf("entity.%sslime.hurt", GetSizeName(a_Size).c_str()),
Printf("entity.%sslime.death", GetSizeName(a_Size).c_str()),
"",
- 0.6 * a_Size,
- 0.6 * a_Size
+ 0.51f * a_Size,
+ 0.51f * a_Size
),
m_Size(a_Size)
{
diff --git a/src/Mobs/SnowGolem.cpp b/src/Mobs/SnowGolem.cpp
index c6db0cbd1..3b66311a1 100644
--- a/src/Mobs/SnowGolem.cpp
+++ b/src/Mobs/SnowGolem.cpp
@@ -11,7 +11,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.7f, 1.9f)
{
}
diff --git a/src/Mobs/Spider.cpp b/src/Mobs/Spider.cpp
index 3677411f6..86cd04e7b 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.4f, 0.9f)
{
}
diff --git a/src/Mobs/Squid.cpp b/src/Mobs/Squid.cpp
index dffa96f62..66320926d 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.8f, 0.8f)
{
}
diff --git a/src/Mobs/Villager.cpp b/src/Mobs/Villager.cpp
index 1dc302aec..156515880 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.6f, 1.95f),
m_ActionCountDown(-1),
m_Type(VillagerType),
m_VillagerAction(false)
diff --git a/src/Mobs/Witch.cpp b/src/Mobs/Witch.cpp
index a13593ae7..8cf8aaae2 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.6f, 1.95f)
{
}
diff --git a/src/Mobs/Wither.cpp b/src/Mobs/Wither.cpp
index bdbbfcadb..77a31a0bd 100644
--- a/src/Mobs/Wither.cpp
+++ b/src/Mobs/Wither.cpp
@@ -13,7 +13,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.9f, 3.5f),
m_WitherInvulnerableTicks(220)
{
SetMaxHealth(300);
diff --git a/src/Mobs/WitherSkeleton.cpp b/src/Mobs/WitherSkeleton.cpp
index 6c3a79095..e2acd8036 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.7f, 2.4f)
{
}
diff --git a/src/Mobs/Wolf.cpp b/src/Mobs/Wolf.cpp
index c40dbf5e3..85d2a5a1b 100644
--- a/src/Mobs/Wolf.cpp
+++ b/src/Mobs/Wolf.cpp
@@ -12,7 +12,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.6f, 0.85f),
m_IsSitting(false),
m_IsTame(false),
m_IsBegging(false),
diff --git a/src/Mobs/Zombie.cpp b/src/Mobs/Zombie.cpp
index 73e5f8c1e..09e39a14b 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.6f, 1.95f)
{
}
diff --git a/src/Mobs/ZombiePigman.cpp b/src/Mobs/ZombiePigman.cpp
index efc19ab9d..60d5ab9f1 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.6f, 1.95f)
{
}
diff --git a/src/Mobs/ZombieVillager.cpp b/src/Mobs/ZombieVillager.cpp
index 5e3a32af2..cde099947 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.6f, 1.95f),
m_ConversionTime(-1),
m_Profession(a_Profession)
{
diff --git a/tests/Generating/Stubs.cpp b/tests/Generating/Stubs.cpp
index bda73f75a..9cec9d904 100644
--- a/tests/Generating/Stubs.cpp
+++ b/tests/Generating/Stubs.cpp
@@ -446,7 +446,7 @@ void cEnderCrystal::KilledBy(struct TakeDamageInfo & a_TakeDamageInfo)
-cEntity::cEntity(enum cEntity::eEntityType a_EntityType, class Vector3<double> a_Pos, double a_Height, double a_Width)
+cEntity::cEntity(enum cEntity::eEntityType a_EntityType, class Vector3<double> a_Pos, float a_Height, float a_Width)
{
}
@@ -790,7 +790,7 @@ void cEntity::ResetPosition(class Vector3<double> a_Pos)
-cPawn::cPawn(enum cEntity::eEntityType,double a_Width, double a_Height) :
+cPawn::cPawn(enum cEntity::eEntityType, float a_Width, float a_Height) :
cEntity(etMonster, Vector3d(), a_Height, a_Width)
{
}
@@ -862,7 +862,7 @@ void cPawn::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
-cMonster::cMonster(const AString & a_StringA, enum eMonsterType a_MonsterType, const AString & a_StringB, const AString & a_StringC, const AString & a_StringD, double a_Width, double a_Height) :
+cMonster::cMonster(const AString & a_StringA, enum eMonsterType a_MonsterType, const AString & a_StringB, const AString & a_StringC, const AString & a_StringD, float a_Width, float a_Height) :
cPawn(etMonster, a_Width, a_Height),
m_PathFinder(a_Width, a_Height)
{
@@ -870,7 +870,7 @@ cMonster::cMonster(const AString & a_StringA, enum eMonsterType a_MonsterType, c
-cPathFinder::cPathFinder(double a_Width, double a_Height)
+cPathFinder::cPathFinder(float a_Width, float a_Height)
{
}
@@ -1002,7 +1002,7 @@ void cMonster::InStateEscaping(std::chrono::milliseconds a_Dt ,class cChunk & a_
-cAggressiveMonster::cAggressiveMonster(const AString & a_StringA, enum eMonsterType a_MonsterType, const AString & a_StringB, const AString & a_StringC, const AString & a_StringD, double a_Width, double a_Height) :
+cAggressiveMonster::cAggressiveMonster(const AString & a_StringA, enum eMonsterType a_MonsterType, const AString & a_StringB, const AString & a_StringC, const AString & a_StringD, float a_Width, float a_Height) :
cMonster(a_StringA, a_MonsterType, a_StringB, a_StringC, a_StringD, a_Width, a_Height)
{
}