Add ambient mob sounds (#4521)
This commit is contained in:
parent
076749bd36
commit
9ddf433ae7
|
@ -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) :
|
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_Width, a_Height)
|
super(a_ConfigName, a_MobType, a_SoundHurt, a_SoundDeath, a_SoundAmbient, a_Width, a_Height)
|
||||||
{
|
{
|
||||||
m_EMPersonality = AGGRESSIVE;
|
m_EMPersonality = AGGRESSIVE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ class cAggressiveMonster :
|
||||||
|
|
||||||
public:
|
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 Tick (std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
|
||||||
virtual void InStateChasing(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
|
virtual void InStateChasing(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
|
|
||||||
cBat::cBat(void) :
|
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);
|
SetGravity(-2.0f);
|
||||||
SetAirDrag(0.05f);
|
SetAirDrag(0.05f);
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
|
|
||||||
cBlaze::cBlaze(void) :
|
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);
|
SetGravity(-8.0f);
|
||||||
SetAirDrag(0.05f);
|
SetAirDrag(0.05f);
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
|
|
||||||
cCaveSpider::cCaveSpider(void) :
|
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)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
|
|
||||||
cChicken::cChicken(void) :
|
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)
|
m_EggDropTimer(0)
|
||||||
{
|
{
|
||||||
SetGravity(-2.0f);
|
SetGravity(-2.0f);
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
|
|
||||||
cCow::cCow(void) :
|
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)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
|
|
||||||
cCreeper::cCreeper(void) :
|
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_bIsBlowing(false),
|
||||||
m_bIsCharged(false),
|
m_bIsCharged(false),
|
||||||
m_BurnedWithFlintAndSteel(false),
|
m_BurnedWithFlintAndSteel(false),
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
cEnderDragon::cEnderDragon(void) :
|
cEnderDragon::cEnderDragon(void) :
|
||||||
// TODO: Vanilla source says this, but is it right? Dragons fly, they don't stand
|
// 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)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ protected:
|
||||||
|
|
||||||
|
|
||||||
cEnderman::cEnderman(void) :
|
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_bIsScreaming(false),
|
||||||
m_CarriedBlock(E_BLOCK_AIR),
|
m_CarriedBlock(E_BLOCK_AIR),
|
||||||
m_CarriedMeta(0)
|
m_CarriedMeta(0)
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
|
|
||||||
cGhast::cGhast(void) :
|
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)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
|
|
||||||
cGiant::cGiant(void) :
|
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)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
|
|
||||||
cGuardian::cGuardian(void) :
|
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)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
|
|
||||||
cHorse::cHorse(int Type, int Color, int Style, int TameTimes) :
|
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),
|
cEntityWindowOwner(this),
|
||||||
m_bHasChest(false),
|
m_bHasChest(false),
|
||||||
m_bIsEating(false),
|
m_bIsEating(false),
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
|
|
||||||
cIronGolem::cIronGolem(void) :
|
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)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
|
|
||||||
cMagmaCube::cMagmaCube(int a_Size) :
|
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)
|
m_Size(a_Size)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,7 +76,7 @@ static const struct
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cMonster:
|
// 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)
|
: super(etMonster, a_Width, a_Height)
|
||||||
, m_EMState(IDLE)
|
, m_EMState(IDLE)
|
||||||
, m_EMPersonality(AGGRESSIVE)
|
, m_EMPersonality(AGGRESSIVE)
|
||||||
|
@ -90,6 +90,7 @@ cMonster::cMonster(const AString & a_ConfigName, eMonsterType a_MobType, const A
|
||||||
, m_CustomNameAlwaysVisible(false)
|
, m_CustomNameAlwaysVisible(false)
|
||||||
, m_SoundHurt(a_SoundHurt)
|
, m_SoundHurt(a_SoundHurt)
|
||||||
, m_SoundDeath(a_SoundDeath)
|
, m_SoundDeath(a_SoundDeath)
|
||||||
|
, m_SoundAmbient(a_SoundAmbient)
|
||||||
, m_AttackRate(3)
|
, m_AttackRate(3)
|
||||||
, m_AttackDamage(1)
|
, m_AttackDamage(1)
|
||||||
, m_AttackRange(1)
|
, m_AttackRange(1)
|
||||||
|
@ -117,6 +118,9 @@ cMonster::cMonster(const AString & a_ConfigName, eMonsterType a_MobType, const A
|
||||||
{
|
{
|
||||||
GetMonsterConfig(a_ConfigName);
|
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();
|
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)
|
if (m_AgingTimer > 0)
|
||||||
{
|
{
|
||||||
m_AgingTimer--;
|
m_AgingTimer--;
|
||||||
|
|
|
@ -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_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
|
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;
|
virtual ~cMonster() override;
|
||||||
|
|
||||||
|
@ -267,6 +267,7 @@ protected:
|
||||||
|
|
||||||
AString m_SoundHurt;
|
AString m_SoundHurt;
|
||||||
AString m_SoundDeath;
|
AString m_SoundDeath;
|
||||||
|
AString m_SoundAmbient;
|
||||||
|
|
||||||
float m_AttackRate;
|
float m_AttackRate;
|
||||||
int m_AttackDamage;
|
int m_AttackDamage;
|
||||||
|
@ -287,6 +288,8 @@ protected:
|
||||||
bool m_BurnsInDaylight;
|
bool m_BurnsInDaylight;
|
||||||
double m_RelativeWalkSpeed;
|
double m_RelativeWalkSpeed;
|
||||||
|
|
||||||
|
int m_AmbientSoundTimer;
|
||||||
|
|
||||||
int m_Age;
|
int m_Age;
|
||||||
int m_AgingTimer;
|
int m_AgingTimer;
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
|
|
||||||
cMooshroom::cMooshroom(void) :
|
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)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
cOcelot::cOcelot(void) :
|
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_IsSitting(false),
|
||||||
m_IsTame(false),
|
m_IsTame(false),
|
||||||
m_IsBegging(false),
|
m_IsBegging(false),
|
||||||
|
|
|
@ -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) :
|
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_Width, a_Height)
|
super(a_ConfigName, a_MobType, a_SoundHurt, a_SoundDeath, a_SoundAmbient, a_Width, a_Height)
|
||||||
{
|
{
|
||||||
m_EMPersonality = PASSIVE;
|
m_EMPersonality = PASSIVE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ class cPassiveAggressiveMonster :
|
||||||
typedef cAggressiveMonster super;
|
typedef cAggressiveMonster super;
|
||||||
|
|
||||||
public:
|
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 bool DoTakeDamage(TakeDamageInfo & a_TDI) override;
|
||||||
virtual void EventSeePlayer(cPlayer *, cChunk & a_Chunk) override;
|
virtual void EventSeePlayer(cPlayer *, cChunk & a_Chunk) override;
|
||||||
|
|
|
@ -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) :
|
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_Width, a_Height),
|
super(a_ConfigName, a_MobType, a_SoundHurt, a_SoundDeath, a_SoundAmbient, a_Width, a_Height),
|
||||||
m_LovePartner(nullptr),
|
m_LovePartner(nullptr),
|
||||||
m_LoveTimer(0),
|
m_LoveTimer(0),
|
||||||
m_LoveCooldown(0),
|
m_LoveCooldown(0),
|
||||||
|
|
|
@ -13,7 +13,7 @@ class cPassiveMonster :
|
||||||
typedef cMonster super;
|
typedef cMonster super;
|
||||||
|
|
||||||
public:
|
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 Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
|
||||||
virtual void OnRightClicked(cPlayer & a_Player) override;
|
virtual void OnRightClicked(cPlayer & a_Player) override;
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
|
|
||||||
cPig::cPig(void) :
|
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)
|
m_bIsSaddled(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ cRabbit::cRabbit(void) :
|
||||||
|
|
||||||
|
|
||||||
cRabbit::cRabbit(eRabbitType Type, int MoreCarrotTicks) :
|
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_Type(Type),
|
||||||
m_MoreCarrotTicks(MoreCarrotTicks)
|
m_MoreCarrotTicks(MoreCarrotTicks)
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
|
|
||||||
cSheep::cSheep(int a_Color) :
|
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_IsSheared(false),
|
||||||
m_WoolColor(a_Color),
|
m_WoolColor(a_Color),
|
||||||
m_TimeToStopEating(-1)
|
m_TimeToStopEating(-1)
|
||||||
|
|
|
@ -14,7 +14,7 @@ class cSilverfish :
|
||||||
|
|
||||||
public:
|
public:
|
||||||
cSilverfish(void) :
|
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)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
|
|
||||||
cSkeleton::cSkeleton(bool IsWither) :
|
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)
|
m_bIsWither(IsWither)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@ cSlime::cSlime(int a_Size) :
|
||||||
mtSlime,
|
mtSlime,
|
||||||
Printf("entity.%sslime.hurt", GetSizeName(a_Size).c_str()),
|
Printf("entity.%sslime.hurt", GetSizeName(a_Size).c_str()),
|
||||||
Printf("entity.%sslime.death", GetSizeName(a_Size).c_str()),
|
Printf("entity.%sslime.death", GetSizeName(a_Size).c_str()),
|
||||||
|
"",
|
||||||
0.6 * a_Size,
|
0.6 * a_Size,
|
||||||
0.6 * a_Size
|
0.6 * a_Size
|
||||||
),
|
),
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
|
|
||||||
cSnowGolem::cSnowGolem(void) :
|
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)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
|
|
||||||
cSpider::cSpider(void) :
|
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)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
|
|
||||||
cSquid::cSquid(void) :
|
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)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
|
|
||||||
cVillager::cVillager(eVillagerType VillagerType) :
|
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_ActionCountDown(-1),
|
||||||
m_Type(VillagerType),
|
m_Type(VillagerType),
|
||||||
m_VillagerAction(false)
|
m_VillagerAction(false)
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
|
|
||||||
cWitch::cWitch(void) :
|
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)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
|
|
||||||
cWither::cWither(void) :
|
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)
|
m_WitherInvulnerableTicks(220)
|
||||||
{
|
{
|
||||||
SetMaxHealth(300);
|
SetMaxHealth(300);
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
|
|
||||||
cWolf::cWolf(void) :
|
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_IsSitting(false),
|
||||||
m_IsTame(false),
|
m_IsTame(false),
|
||||||
m_IsBegging(false),
|
m_IsBegging(false),
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
|
|
||||||
cZombie::cZombie(bool a_IsVillagerZombie) :
|
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_IsVillagerZombie(a_IsVillagerZombie),
|
||||||
m_IsConverting(false)
|
m_IsConverting(false)
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
|
|
||||||
cZombiePigman::cZombiePigman(void) :
|
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)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user