From dae2adde6563bec4b614230992cae6b1ca965b4f Mon Sep 17 00:00:00 2001 From: mathiascode Date: Wed, 15 Feb 2017 07:05:24 +0200 Subject: Updated sounds and effect IDs (#3422) --- 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 | 6 +++--- 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 | 11 ++++------- src/Mobs/Mooshroom.cpp | 2 +- src/Mobs/Ocelot.h | 2 +- src/Mobs/Pig.cpp | 2 +- src/Mobs/Rabbit.cpp | 2 +- src/Mobs/Sheep.cpp | 4 ++-- src/Mobs/Silverfish.h | 2 +- src/Mobs/Skeleton.cpp | 2 +- src/Mobs/Slime.cpp | 13 +++++-------- 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 +- 31 files changed, 41 insertions(+), 47 deletions(-) (limited to 'src/Mobs') diff --git a/src/Mobs/Bat.cpp b/src/Mobs/Bat.cpp index e187e928a..5fa8ffc9b 100644 --- a/src/Mobs/Bat.cpp +++ b/src/Mobs/Bat.cpp @@ -7,7 +7,7 @@ cBat::cBat(void) : - super("Bat", mtBat, "mob.bat.hurt", "mob.bat.death", 0.5, 0.9) + super("Bat", mtBat, "entity.bat.hurt", "entity.bat.death", 0.5, 0.9) { SetGravity(-2.0f); SetAirDrag(0.05f); diff --git a/src/Mobs/Blaze.cpp b/src/Mobs/Blaze.cpp index d002e14e7..8cdac12d1 100644 --- a/src/Mobs/Blaze.cpp +++ b/src/Mobs/Blaze.cpp @@ -9,7 +9,7 @@ cBlaze::cBlaze(void) : - super("Blaze", mtBlaze, "mob.blaze.hit", "mob.blaze.death", 0.6, 1.8) + super("Blaze", mtBlaze, "entity.blaze.hurt", "entity.blaze.death", 0.6, 1.8) { SetGravity(-8.0f); SetAirDrag(0.05f); diff --git a/src/Mobs/CaveSpider.cpp b/src/Mobs/CaveSpider.cpp index 9f2524c1b..c6aa8af61 100644 --- a/src/Mobs/CaveSpider.cpp +++ b/src/Mobs/CaveSpider.cpp @@ -8,7 +8,7 @@ cCaveSpider::cCaveSpider(void) : - super("CaveSpider", mtCaveSpider, "mob.spider.say", "mob.spider.death", 0.7, 0.5) + super("CaveSpider", mtCaveSpider, "entity.spider.hurt", "entity.spider.death", 0.7, 0.5) { } diff --git a/src/Mobs/Chicken.cpp b/src/Mobs/Chicken.cpp index 2c9e86e85..0224078f5 100644 --- a/src/Mobs/Chicken.cpp +++ b/src/Mobs/Chicken.cpp @@ -10,7 +10,7 @@ cChicken::cChicken(void) : - super("Chicken", mtChicken, "mob.chicken.hurt", "mob.chicken.hurt", 0.3, 0.4), + super("Chicken", mtChicken, "entity.chicken.hurt", "entity.chicken.death", 0.3, 0.4), m_EggDropTimer(0) { SetGravity(-2.0f); diff --git a/src/Mobs/Cow.cpp b/src/Mobs/Cow.cpp index dec8eface..9736fe440 100644 --- a/src/Mobs/Cow.cpp +++ b/src/Mobs/Cow.cpp @@ -11,7 +11,7 @@ cCow::cCow(void) : - super("Cow", mtCow, "mob.cow.hurt", "mob.cow.hurt", 0.9, 1.3) + super("Cow", mtCow, "entity.cow.hurt", "entity.cow.death", 0.9, 1.3) { } diff --git a/src/Mobs/Creeper.cpp b/src/Mobs/Creeper.cpp index 2e7d35ed3..fc31422f1 100644 --- a/src/Mobs/Creeper.cpp +++ b/src/Mobs/Creeper.cpp @@ -11,7 +11,7 @@ cCreeper::cCreeper(void) : - super("Creeper", mtCreeper, "mob.creeper.say", "mob.creeper.say", 0.6, 1.8), + super("Creeper", mtCreeper, "entity.creeper.hurt", "entity.creeper.death", 0.6, 1.8), m_bIsBlowing(false), m_bIsCharged(false), m_BurnedWithFlintAndSteel(false), @@ -132,7 +132,7 @@ bool cCreeper::Attack(std::chrono::milliseconds a_Dt) if (!m_bIsBlowing) { - m_World->BroadcastSoundEffect("game.tnt.primed", GetPosX(), GetPosY(), GetPosZ(), 1.f, (0.75f + (static_cast((GetUniqueID() * 23) % 32)) / 64)); + m_World->BroadcastSoundEffect("entity.creeper.primed", GetPosX(), GetPosY(), GetPosZ(), 1.f, (0.75f + (static_cast((GetUniqueID() * 23) % 32)) / 64)); m_bIsBlowing = true; m_World->BroadcastEntityMetadata(*this); @@ -153,7 +153,7 @@ void cCreeper::OnRightClicked(cPlayer & a_Player) { a_Player.UseEquippedItem(); } - m_World->BroadcastSoundEffect("game.tnt.primed", GetPosX(), GetPosY(), GetPosZ(), 1.f, (0.75f + (static_cast((GetUniqueID() * 23) % 32)) / 64)); + m_World->BroadcastSoundEffect("entity.creeper.primed", GetPosX(), GetPosY(), GetPosZ(), 1.f, (0.75f + (static_cast((GetUniqueID() * 23) % 32)) / 64)); m_bIsBlowing = true; m_World->BroadcastEntityMetadata(*this); m_BurnedWithFlintAndSteel = true; diff --git a/src/Mobs/EnderDragon.cpp b/src/Mobs/EnderDragon.cpp index acd81cde1..360fe581b 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, "mob.enderdragon.hit", "mob.enderdragon.end", 16.0, 8.0) + super("EnderDragon", mtEnderDragon, "entity.enderdragon.hurt", "entity.enderdragon.death", 16.0, 8.0) { } diff --git a/src/Mobs/Enderman.cpp b/src/Mobs/Enderman.cpp index 4e2e67f8a..f58e2132c 100644 --- a/src/Mobs/Enderman.cpp +++ b/src/Mobs/Enderman.cpp @@ -78,7 +78,7 @@ protected: cEnderman::cEnderman(void) : - super("Enderman", mtEnderman, "mob.endermen.hit", "mob.endermen.death", 0.5, 2.9), + super("Enderman", mtEnderman, "entity.endermen.hurt", "entity.endermen.death", 0.5, 2.9), m_bIsScreaming(false), CarriedBlock(E_BLOCK_AIR), CarriedMeta(0) diff --git a/src/Mobs/Ghast.cpp b/src/Mobs/Ghast.cpp index 0544255df..6f5a93d93 100644 --- a/src/Mobs/Ghast.cpp +++ b/src/Mobs/Ghast.cpp @@ -9,7 +9,7 @@ cGhast::cGhast(void) : - super("Ghast", mtGhast, "mob.ghast.scream", "mob.ghast.death", 4, 4) + super("Ghast", mtGhast, "entity.ghast.hurt", "entity.ghast.death", 4, 4) { } diff --git a/src/Mobs/Giant.cpp b/src/Mobs/Giant.cpp index bbcad46f0..0f235e10f 100644 --- a/src/Mobs/Giant.cpp +++ b/src/Mobs/Giant.cpp @@ -8,7 +8,7 @@ cGiant::cGiant(void) : - super("Giant", mtGiant, "mob.zombie.hurt", "mob.zombie.death", 3.6, 10.8) + super("Giant", mtGiant, "entity.zombie.hurt", "entity.zombie.death", 3.6, 10.8) { } diff --git a/src/Mobs/Guardian.cpp b/src/Mobs/Guardian.cpp index 1bee8fdfb..5e98094b1 100644 --- a/src/Mobs/Guardian.cpp +++ b/src/Mobs/Guardian.cpp @@ -10,7 +10,7 @@ cGuardian::cGuardian(void) : - super("Guardian", mtGuardian, "mob.guardian.idle", "mob.guardian.death", 0.875, 0.8) + super("Guardian", mtGuardian, "entity.guardian.hurt", "entity.guardian.death", 0.875, 0.8) { } diff --git a/src/Mobs/Horse.cpp b/src/Mobs/Horse.cpp index ce4121a45..ab06704d6 100644 --- a/src/Mobs/Horse.cpp +++ b/src/Mobs/Horse.cpp @@ -10,7 +10,7 @@ cHorse::cHorse(int Type, int Color, int Style, int TameTimes) : - super("Horse", mtHorse, "mob.horse.hit", "mob.horse.death", 1.4, 1.6), + super("Horse", mtHorse, "entity.horse.hurt", "entity.horse.death", 1.4, 1.6), m_bHasChest(false), m_bIsEating(false), m_bIsRearing(false), diff --git a/src/Mobs/IronGolem.cpp b/src/Mobs/IronGolem.cpp index b0e76daca..448ed8dc0 100644 --- a/src/Mobs/IronGolem.cpp +++ b/src/Mobs/IronGolem.cpp @@ -8,7 +8,7 @@ cIronGolem::cIronGolem(void) : - super("IronGolem", mtIronGolem, "mob.irongolem.hit", "mob.irongolem.death", 1.4, 2.9) + super("IronGolem", mtIronGolem, "entity.irongolem.hurt", "entity.irongolem.death", 1.4, 2.9) { } diff --git a/src/Mobs/MagmaCube.cpp b/src/Mobs/MagmaCube.cpp index c5dd0def0..4d70a0291 100644 --- a/src/Mobs/MagmaCube.cpp +++ b/src/Mobs/MagmaCube.cpp @@ -7,7 +7,7 @@ cMagmaCube::cMagmaCube(int a_Size) : - super("MagmaCube", mtMagmaCube, Printf("mob.magmacube.%s", GetSizeName(a_Size).c_str()), Printf("mob.magmacube.%s", 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) { } @@ -29,12 +29,9 @@ void cMagmaCube::GetDrops(cItems & a_Drops, cEntity * a_Killer) AString cMagmaCube::GetSizeName(int a_Size) { - if (a_Size > 1) + if (a_Size == 1) { - return "big"; - } - else - { - return "small"; + return "small_"; } + return ""; } diff --git a/src/Mobs/Mooshroom.cpp b/src/Mobs/Mooshroom.cpp index 08cabe143..b6feca76e 100644 --- a/src/Mobs/Mooshroom.cpp +++ b/src/Mobs/Mooshroom.cpp @@ -14,7 +14,7 @@ cMooshroom::cMooshroom(void) : - super("Mooshroom", mtMooshroom, "mob.cow.hurt", "mob.cow.hurt", 0.9, 1.3) + super("Mooshroom", mtMooshroom, "entity.cow.hurt", "entity.cow.death", 0.9, 1.3) { } diff --git a/src/Mobs/Ocelot.h b/src/Mobs/Ocelot.h index 1f513a6d6..a352e5854 100644 --- a/src/Mobs/Ocelot.h +++ b/src/Mobs/Ocelot.h @@ -14,7 +14,7 @@ class cOcelot : public: cOcelot(void) : - super("Ocelot", mtOcelot, "mob.cat.hitt", "mob.cat.hitt", 0.6, 0.8) + super("Ocelot", mtOcelot, "entity.cat.hurt", "entity.cat.death", 0.6, 0.8) { } diff --git a/src/Mobs/Pig.cpp b/src/Mobs/Pig.cpp index 6b420b235..82901b061 100644 --- a/src/Mobs/Pig.cpp +++ b/src/Mobs/Pig.cpp @@ -10,7 +10,7 @@ cPig::cPig(void) : - super("Pig", mtPig, "mob.pig.say", "mob.pig.death", 0.9, 0.9), + super("Pig", mtPig, "entity.pig.hurt", "entity.pig.death", 0.9, 0.9), m_bIsSaddled(false) { } diff --git a/src/Mobs/Rabbit.cpp b/src/Mobs/Rabbit.cpp index 9d10212bf..9750ed5d1 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, "mob.rabbit.idle", "mob.rabbit.death", 0.82, 0.68), + super("Rabbit", mtRabbit, "entity.rabbit.hurt", "entity.rabbit.death", 0.82, 0.68), m_Type(Type), m_MoreCarrotTicks(MoreCarrotTicks) { diff --git a/src/Mobs/Sheep.cpp b/src/Mobs/Sheep.cpp index b0fc68d44..810d37a70 100644 --- a/src/Mobs/Sheep.cpp +++ b/src/Mobs/Sheep.cpp @@ -13,7 +13,7 @@ cSheep::cSheep(int a_Color) : - super("Sheep", mtSheep, "mob.sheep.say", "mob.sheep.say", 0.6, 1.3), + super("Sheep", mtSheep, "entity.sheep.hurt", "entity.sheep.death", 0.6, 1.3), m_IsSheared(false), m_WoolColor(a_Color), m_TimeToStopEating(-1) @@ -68,7 +68,7 @@ void cSheep::OnRightClicked(cPlayer & a_Player) int NumDrops = m_World->GetTickRandomNumber(2) + 1; Drops.push_back(cItem(E_BLOCK_WOOL, static_cast(NumDrops), static_cast(m_WoolColor))); m_World->SpawnItemPickups(Drops, GetPosX(), GetPosY(), GetPosZ(), 10); - m_World->BroadcastSoundEffect("mob.sheep.shear", GetPosX(), GetPosY(), GetPosZ(), 1.0f, 1.0f); + m_World->BroadcastSoundEffect("entity.sheep.shear", GetPosX(), GetPosY(), GetPosZ(), 1.0f, 1.0f); } else if ((EquippedItem.m_ItemType == E_ITEM_DYE) && (m_WoolColor != 15 - EquippedItem.m_ItemDamage)) { diff --git a/src/Mobs/Silverfish.h b/src/Mobs/Silverfish.h index be325a7aa..90ef5ea5d 100644 --- a/src/Mobs/Silverfish.h +++ b/src/Mobs/Silverfish.h @@ -14,7 +14,7 @@ class cSilverfish : public: cSilverfish(void) : - super("Silverfish", mtSilverfish, "mob.silverfish.hit", "mob.silverfish.kill", 0.3, 0.7) + super("Silverfish", mtSilverfish, "entity.silverfish.hurt", "entity.silverfish.death", 0.3, 0.7) { } diff --git a/src/Mobs/Skeleton.cpp b/src/Mobs/Skeleton.cpp index 7697f1279..311533b69 100644 --- a/src/Mobs/Skeleton.cpp +++ b/src/Mobs/Skeleton.cpp @@ -10,7 +10,7 @@ cSkeleton::cSkeleton(bool IsWither) : - super("Skeleton", mtSkeleton, "mob.skeleton.hurt", "mob.skeleton.death", 0.6, 1.8), + super("Skeleton", mtSkeleton, "entity.skeleton.hurt", "entity.skeleton.death", 0.6, 1.8), m_bIsWither(IsWither) { SetBurnsInDaylight(true); diff --git a/src/Mobs/Slime.cpp b/src/Mobs/Slime.cpp index 316f68523..dca5c5887 100644 --- a/src/Mobs/Slime.cpp +++ b/src/Mobs/Slime.cpp @@ -12,8 +12,8 @@ cSlime::cSlime(int a_Size) : super("Slime", mtSlime, - Printf("mob.slime.%s", GetSizeName(a_Size).c_str()), - Printf("mob.slime.%s", GetSizeName(a_Size).c_str()), + 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 ), @@ -93,14 +93,11 @@ void cSlime::KilledBy(TakeDamageInfo & a_TDI) AString cSlime::GetSizeName(int a_Size) { - if (a_Size > 1) + if (a_Size == 1) { - return "big"; - } - else - { - return "small"; + return "small_"; } + return ""; } diff --git a/src/Mobs/SnowGolem.cpp b/src/Mobs/SnowGolem.cpp index b4089d179..c86577a1e 100644 --- a/src/Mobs/SnowGolem.cpp +++ b/src/Mobs/SnowGolem.cpp @@ -9,7 +9,7 @@ cSnowGolem::cSnowGolem(void) : - super("SnowGolem", mtSnowGolem, "", "", 0.4, 1.8) + super("SnowGolem", mtSnowGolem, "entity.snowman.hurt", "entity.snowman.death", 0.4, 1.8) { } diff --git a/src/Mobs/Spider.cpp b/src/Mobs/Spider.cpp index 5ee3e3294..226b1d0a7 100644 --- a/src/Mobs/Spider.cpp +++ b/src/Mobs/Spider.cpp @@ -9,7 +9,7 @@ cSpider::cSpider(void) : - super("Spider", mtSpider, "mob.spider.say", "mob.spider.death", 1.4, 0.9) + super("Spider", mtSpider, "entity.spider.hurt", "entity.spider.death", 1.4, 0.9) { } diff --git a/src/Mobs/Squid.cpp b/src/Mobs/Squid.cpp index 1b0163e30..cab409cb3 100644 --- a/src/Mobs/Squid.cpp +++ b/src/Mobs/Squid.cpp @@ -10,7 +10,7 @@ cSquid::cSquid(void) : - super("Squid", mtSquid, "", "", 0.95, 0.95) + super("Squid", mtSquid, "entity.squid.hurt", "entity.squid.death", 0.95, 0.95) { } diff --git a/src/Mobs/Villager.cpp b/src/Mobs/Villager.cpp index 6bfc5594f..46a448eb5 100644 --- a/src/Mobs/Villager.cpp +++ b/src/Mobs/Villager.cpp @@ -12,7 +12,7 @@ cVillager::cVillager(eVillagerType VillagerType) : - super("Villager", mtVillager, "", "", 0.6, 1.8), + super("Villager", mtVillager, "entity.villager.hurt", "entity.villager.death", 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 1f672b4f7..fa4074a54 100644 --- a/src/Mobs/Witch.cpp +++ b/src/Mobs/Witch.cpp @@ -9,7 +9,7 @@ cWitch::cWitch(void) : - super("Witch", mtWitch, "", "", 0.6, 1.8) + super("Witch", mtWitch, "entity.witch.hurt", "entity.witch.death", 0.6, 1.8) { } diff --git a/src/Mobs/Wither.cpp b/src/Mobs/Wither.cpp index 19399953e..fad51c05f 100644 --- a/src/Mobs/Wither.cpp +++ b/src/Mobs/Wither.cpp @@ -11,7 +11,7 @@ cWither::cWither(void) : - super("Wither", mtWither, "mob.wither.hurt", "mob.wither.death", 0.9, 4.0), + super("Wither", mtWither, "entity.wither.hurt", "entity.wither.death", 0.9, 4.0), m_WitherInvulnerableTicks(220) { SetMaxHealth(300); diff --git a/src/Mobs/Wolf.cpp b/src/Mobs/Wolf.cpp index 6751cd7c7..325c47183 100644 --- a/src/Mobs/Wolf.cpp +++ b/src/Mobs/Wolf.cpp @@ -12,7 +12,7 @@ cWolf::cWolf(void) : - super("Wolf", mtWolf, "mob.wolf.hurt", "mob.wolf.death", 0.6, 0.8), + super("Wolf", mtWolf, "entity.wolf.hurt", "entity.wolf.death", 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 a5b44e6c0..882e98bf1 100644 --- a/src/Mobs/Zombie.cpp +++ b/src/Mobs/Zombie.cpp @@ -10,7 +10,7 @@ cZombie::cZombie(bool a_IsVillagerZombie) : - super("Zombie", mtZombie, "mob.zombie.hurt", "mob.zombie.death", 0.6, 1.8), + super("Zombie", mtZombie, "entity.zombie.hurt", "entity.zombie.death", 0.6, 1.8), m_IsVillagerZombie(a_IsVillagerZombie), m_IsConverting(false) { diff --git a/src/Mobs/ZombiePigman.cpp b/src/Mobs/ZombiePigman.cpp index 73ad81b36..39e7ba9c7 100644 --- a/src/Mobs/ZombiePigman.cpp +++ b/src/Mobs/ZombiePigman.cpp @@ -8,7 +8,7 @@ cZombiePigman::cZombiePigman(void) : - super("ZombiePigman", mtZombiePigman, "mob.zombiepig.zpighurt", "mob.zombiepig.zpigdeath", 0.6, 1.8) + super("ZombiePigman", mtZombiePigman, "entity.zombie_pig.hurt", "entity.zombie_pig.death", 0.6, 1.8) { } -- cgit v1.2.3