From 9ddf433ae747e0a677d02062deea08a95c29f27b Mon Sep 17 00:00:00 2001 From: Mat Date: Sun, 22 Mar 2020 17:50:34 +0200 Subject: Add ambient mob sounds (#4521) --- src/Mobs/AggressiveMonster.cpp | 4 ++-- src/Mobs/AggressiveMonster.h | 2 +- src/Mobs/Bat.cpp | 2 +- src/Mobs/Blaze.cpp | 2 +- src/Mobs/CaveSpider.cpp | 2 +- src/Mobs/Chicken.cpp | 2 +- src/Mobs/Cow.cpp | 2 +- src/Mobs/Creeper.cpp | 2 +- src/Mobs/EnderDragon.cpp | 2 +- src/Mobs/Enderman.cpp | 2 +- src/Mobs/Ghast.cpp | 2 +- src/Mobs/Giant.cpp | 2 +- src/Mobs/Guardian.cpp | 2 +- src/Mobs/Horse.cpp | 2 +- src/Mobs/IronGolem.cpp | 2 +- src/Mobs/MagmaCube.cpp | 2 +- src/Mobs/Monster.cpp | 19 ++++++++++++++++++- src/Mobs/Monster.h | 5 ++++- src/Mobs/Mooshroom.cpp | 2 +- src/Mobs/Ocelot.cpp | 2 +- src/Mobs/PassiveAggressiveMonster.cpp | 4 ++-- src/Mobs/PassiveAggressiveMonster.h | 2 +- src/Mobs/PassiveMonster.cpp | 4 ++-- src/Mobs/PassiveMonster.h | 2 +- src/Mobs/Pig.cpp | 2 +- src/Mobs/Rabbit.cpp | 2 +- src/Mobs/Sheep.cpp | 2 +- src/Mobs/Silverfish.h | 2 +- src/Mobs/Skeleton.cpp | 2 +- src/Mobs/Slime.cpp | 1 + src/Mobs/SnowGolem.cpp | 2 +- src/Mobs/Spider.cpp | 2 +- src/Mobs/Squid.cpp | 2 +- src/Mobs/Villager.cpp | 2 +- src/Mobs/Witch.cpp | 2 +- src/Mobs/Wither.cpp | 2 +- src/Mobs/Wolf.cpp | 2 +- src/Mobs/Zombie.cpp | 2 +- src/Mobs/ZombiePigman.cpp | 2 +- 39 files changed, 62 insertions(+), 41 deletions(-) diff --git a/src/Mobs/AggressiveMonster.cpp b/src/Mobs/AggressiveMonster.cpp index da2b02a6d..79300bc4a 100644 --- a/src/Mobs/AggressiveMonster.cpp +++ b/src/Mobs/AggressiveMonster.cpp @@ -11,8 +11,8 @@ -cAggressiveMonster::cAggressiveMonster(const AString & a_ConfigName, eMonsterType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, double a_Width, double a_Height) : - super(a_ConfigName, a_MobType, a_SoundHurt, a_SoundDeath, a_Width, a_Height) +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) { m_EMPersonality = AGGRESSIVE; } diff --git a/src/Mobs/AggressiveMonster.h b/src/Mobs/AggressiveMonster.h index 9ab8df06f..bd4287819 100644 --- a/src/Mobs/AggressiveMonster.h +++ b/src/Mobs/AggressiveMonster.h @@ -14,7 +14,7 @@ class cAggressiveMonster : public: - cAggressiveMonster(const AString & a_ConfigName, eMonsterType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, 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 e419ceb2d..c1e40dc42 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", 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/Blaze.cpp b/src/Mobs/Blaze.cpp index 4a4dd474f..80a887b03 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", 0.6, 1.8) + super("Blaze", mtBlaze, "entity.blaze.hurt", "entity.blaze.death", "entity.blaze.ambient", 0.6, 1.8) { SetGravity(-8.0f); SetAirDrag(0.05f); diff --git a/src/Mobs/CaveSpider.cpp b/src/Mobs/CaveSpider.cpp index c6aa8af61..648a8778f 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", 0.7, 0.5) + super("CaveSpider", mtCaveSpider, "entity.spider.hurt", "entity.spider.death", "entity.spider.ambient", 0.7, 0.5) { } diff --git a/src/Mobs/Chicken.cpp b/src/Mobs/Chicken.cpp index 1810a295f..f930aa903 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", 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); diff --git a/src/Mobs/Cow.cpp b/src/Mobs/Cow.cpp index ad6947662..a7fb0d476 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", 0.9, 1.3) + super("Cow", mtCow, "entity.cow.hurt", "entity.cow.death", "entity.cow.ambient", 0.9, 1.3) { } diff --git a/src/Mobs/Creeper.cpp b/src/Mobs/Creeper.cpp index 160523f3d..75f04dc58 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", 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), diff --git a/src/Mobs/EnderDragon.cpp b/src/Mobs/EnderDragon.cpp index 360fe581b..69e523f7e 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", 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/Enderman.cpp b/src/Mobs/Enderman.cpp index 36f12d7e6..d5d5112c8 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", 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) diff --git a/src/Mobs/Ghast.cpp b/src/Mobs/Ghast.cpp index 104fb642e..2f1f2cf8b 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", 4, 4) + super("Ghast", mtGhast, "entity.ghast.hurt", "entity.ghast.death", "entity.ghast.ambient", 4, 4) { } diff --git a/src/Mobs/Giant.cpp b/src/Mobs/Giant.cpp index 0f235e10f..35002282e 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", 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/Guardian.cpp b/src/Mobs/Guardian.cpp index f36f98ea8..bc16e48c0 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", 0.875, 0.8) + super("Guardian", mtGuardian, "entity.guardian.hurt", "entity.guardian.death", "entity.guardian.ambient", 0.875, 0.8) { } diff --git a/src/Mobs/Horse.cpp b/src/Mobs/Horse.cpp index 61b25e7a3..54e4f2c59 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", 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), diff --git a/src/Mobs/IronGolem.cpp b/src/Mobs/IronGolem.cpp index 448ed8dc0..943108254 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", 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/MagmaCube.cpp b/src/Mobs/MagmaCube.cpp index 4247cbe1f..52a4c3b07 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/Monster.cpp b/src/Mobs/Monster.cpp index 09f937564..9a826ed21 100644 --- a/src/Mobs/Monster.cpp +++ b/src/Mobs/Monster.cpp @@ -76,7 +76,7 @@ static const struct //////////////////////////////////////////////////////////////////////////////// // cMonster: -cMonster::cMonster(const AString & a_ConfigName, eMonsterType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, 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, double a_Width, double a_Height) : super(etMonster, a_Width, a_Height) , m_EMState(IDLE) , m_EMPersonality(AGGRESSIVE) @@ -90,6 +90,7 @@ cMonster::cMonster(const AString & a_ConfigName, eMonsterType a_MobType, const A , m_CustomNameAlwaysVisible(false) , m_SoundHurt(a_SoundHurt) , m_SoundDeath(a_SoundDeath) + , m_SoundAmbient(a_SoundAmbient) , m_AttackRate(3) , m_AttackDamage(1) , m_AttackRange(1) @@ -117,6 +118,9 @@ cMonster::cMonster(const AString & a_ConfigName, eMonsterType a_MobType, const A { GetMonsterConfig(a_ConfigName); } + + // Prevent mobs spawning at the same time from making sounds simultaneously + m_AmbientSoundTimer = GetRandomProvider().RandInt(0, 100); } @@ -384,6 +388,19 @@ void cMonster::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) BroadcastMovementUpdate(); + // Ambient mob sounds + if (!m_SoundAmbient.empty() && (--m_AmbientSoundTimer <= 0)) + { + auto & Random = GetRandomProvider(); + auto ShouldPlaySound = Random.RandBool(); + if (ShouldPlaySound) + { + auto SoundPitchMultiplier = 1.0f + (Random.RandReal(1.0f) - Random.RandReal(1.0f)) * 0.2f; + m_World->BroadcastSoundEffect(m_SoundAmbient, GetPosition(), 1.0f, SoundPitchMultiplier * 1.0f); + } + m_AmbientSoundTimer = 100; + } + if (m_AgingTimer > 0) { m_AgingTimer--; diff --git a/src/Mobs/Monster.h b/src/Mobs/Monster.h index 676e8ebe5..567e13ab2 100644 --- a/src/Mobs/Monster.h +++ b/src/Mobs/Monster.h @@ -39,7 +39,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, 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, double a_Width, double a_Height); virtual ~cMonster() override; @@ -267,6 +267,7 @@ protected: AString m_SoundHurt; AString m_SoundDeath; + AString m_SoundAmbient; float m_AttackRate; int m_AttackDamage; @@ -287,6 +288,8 @@ protected: bool m_BurnsInDaylight; double m_RelativeWalkSpeed; + int m_AmbientSoundTimer; + int m_Age; int m_AgingTimer; diff --git a/src/Mobs/Mooshroom.cpp b/src/Mobs/Mooshroom.cpp index 20cb7dac1..31a1b8978 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", 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/Ocelot.cpp b/src/Mobs/Ocelot.cpp index 855a11627..3899d329c 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", 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), diff --git a/src/Mobs/PassiveAggressiveMonster.cpp b/src/Mobs/PassiveAggressiveMonster.cpp index 8715ba9c2..94608a0fc 100644 --- a/src/Mobs/PassiveAggressiveMonster.cpp +++ b/src/Mobs/PassiveAggressiveMonster.cpp @@ -9,8 +9,8 @@ -cPassiveAggressiveMonster::cPassiveAggressiveMonster(const AString & a_ConfigName, eMonsterType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, double a_Width, double a_Height) : - super(a_ConfigName, a_MobType, a_SoundHurt, a_SoundDeath, a_Width, a_Height) +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) { m_EMPersonality = PASSIVE; } diff --git a/src/Mobs/PassiveAggressiveMonster.h b/src/Mobs/PassiveAggressiveMonster.h index 764e27779..a29da3463 100644 --- a/src/Mobs/PassiveAggressiveMonster.h +++ b/src/Mobs/PassiveAggressiveMonster.h @@ -13,7 +13,7 @@ class cPassiveAggressiveMonster : typedef cAggressiveMonster super; public: - cPassiveAggressiveMonster(const AString & a_ConfigName, eMonsterType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, 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 17b9bddb3..f0043c2d4 100644 --- a/src/Mobs/PassiveMonster.cpp +++ b/src/Mobs/PassiveMonster.cpp @@ -10,8 +10,8 @@ -cPassiveMonster::cPassiveMonster(const AString & a_ConfigName, eMonsterType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, double a_Width, double a_Height) : - super(a_ConfigName, a_MobType, a_SoundHurt, a_SoundDeath, a_Width, a_Height), +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), m_LovePartner(nullptr), m_LoveTimer(0), m_LoveCooldown(0), diff --git a/src/Mobs/PassiveMonster.h b/src/Mobs/PassiveMonster.h index 9a2627417..a0567c55b 100644 --- a/src/Mobs/PassiveMonster.h +++ b/src/Mobs/PassiveMonster.h @@ -13,7 +13,7 @@ class cPassiveMonster : typedef cMonster super; public: - cPassiveMonster(const AString & a_ConfigName, eMonsterType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, 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 c9b276f62..2618882d3 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", 0.9, 0.9), + super("Pig", mtPig, "entity.pig.hurt", "entity.pig.death", "entity.pig.ambient", 0.9, 0.9), m_bIsSaddled(false) { } diff --git a/src/Mobs/Rabbit.cpp b/src/Mobs/Rabbit.cpp index d6a26f822..a5340c0d4 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", 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/Sheep.cpp b/src/Mobs/Sheep.cpp index 3276e45a2..4cc871879 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", 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) diff --git a/src/Mobs/Silverfish.h b/src/Mobs/Silverfish.h index c234573ba..c6a4cb49a 100644 --- a/src/Mobs/Silverfish.h +++ b/src/Mobs/Silverfish.h @@ -14,7 +14,7 @@ class cSilverfish : public: cSilverfish(void) : - super("Silverfish", mtSilverfish, "entity.silverfish.hurt", "entity.silverfish.death", 0.3, 0.4) + 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 374c4d969..e8a345d7f 100644 --- a/src/Mobs/Skeleton.cpp +++ b/src/Mobs/Skeleton.cpp @@ -10,7 +10,7 @@ cSkeleton::cSkeleton(bool IsWither) : - super("Skeleton", mtSkeleton, "entity.skeleton.hurt", "entity.skeleton.death", 0.6, 1.8), + super("Skeleton", mtSkeleton, "entity.skeleton.hurt", "entity.skeleton.death", "entity.skeleton.ambient", 0.6, 1.8), m_bIsWither(IsWither) { } diff --git a/src/Mobs/Slime.cpp b/src/Mobs/Slime.cpp index b4132ec26..7bb43a54a 100644 --- a/src/Mobs/Slime.cpp +++ b/src/Mobs/Slime.cpp @@ -14,6 +14,7 @@ cSlime::cSlime(int a_Size) : mtSlime, 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 ), diff --git a/src/Mobs/SnowGolem.cpp b/src/Mobs/SnowGolem.cpp index c86577a1e..3ea97173f 100644 --- a/src/Mobs/SnowGolem.cpp +++ b/src/Mobs/SnowGolem.cpp @@ -9,7 +9,7 @@ cSnowGolem::cSnowGolem(void) : - super("SnowGolem", mtSnowGolem, "entity.snowman.hurt", "entity.snowman.death", 0.4, 1.8) + super("SnowGolem", mtSnowGolem, "entity.snowman.hurt", "entity.snowman.death", "entity.snowman.ambient", 0.4, 1.8) { } diff --git a/src/Mobs/Spider.cpp b/src/Mobs/Spider.cpp index 971ff22f6..329d89e93 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", 1.4, 0.9) + super("Spider", mtSpider, "entity.spider.hurt", "entity.spider.death", "entity.spider.ambient", 1.4, 0.9) { } diff --git a/src/Mobs/Squid.cpp b/src/Mobs/Squid.cpp index 224ec6a06..a63982f05 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", 0.95, 0.95) + super("Squid", mtSquid, "entity.squid.hurt", "entity.squid.death", "entity.squid.ambient", 0.95, 0.95) { } diff --git a/src/Mobs/Villager.cpp b/src/Mobs/Villager.cpp index fca72ab97..9558ba536 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", 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) diff --git a/src/Mobs/Witch.cpp b/src/Mobs/Witch.cpp index a4c81a63e..a2e440705 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", 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/Wither.cpp b/src/Mobs/Wither.cpp index 2cf564fca..912e3e1d2 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", 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); diff --git a/src/Mobs/Wolf.cpp b/src/Mobs/Wolf.cpp index 74924ab11..19cffb810 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", 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), diff --git a/src/Mobs/Zombie.cpp b/src/Mobs/Zombie.cpp index 511efb1af..451255ed2 100644 --- a/src/Mobs/Zombie.cpp +++ b/src/Mobs/Zombie.cpp @@ -10,7 +10,7 @@ cZombie::cZombie(bool a_IsVillagerZombie) : - super("Zombie", mtZombie, "entity.zombie.hurt", "entity.zombie.death", 0.6, 1.8), + super("Zombie", mtZombie, "entity.zombie.hurt", "entity.zombie.death", "entity.zombie.ambient", 0.6, 1.8), m_IsVillagerZombie(a_IsVillagerZombie), m_IsConverting(false) { diff --git a/src/Mobs/ZombiePigman.cpp b/src/Mobs/ZombiePigman.cpp index 7355c8201..1b6e80f36 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", 0.6, 1.8) + super("ZombiePigman", mtZombiePigman, "entity.zombie_pig.hurt", "entity.zombie_pig.death", "entity.zombie_pig.ambient", 0.6, 1.8) { } -- cgit v1.2.3