Merge pull request #1956 from Tri125/master
Fixed Magma cube sound and spawn size
This commit is contained in:
commit
92b8cd2f2a
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
cMagmaCube::cMagmaCube(int a_Size) :
|
cMagmaCube::cMagmaCube(int a_Size) :
|
||||||
super("MagmaCube", mtMagmaCube, "mob.MagmaCube.big", "mob.MagmaCube.big", 0.6 * a_Size, 0.6 * 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),
|
||||||
m_Size(a_Size)
|
m_Size(a_Size)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -27,4 +27,14 @@ void cMagmaCube::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
AString cMagmaCube::GetSizeName(int a_Size)
|
||||||
|
{
|
||||||
|
if (a_Size > 1)
|
||||||
|
{
|
||||||
|
return "big";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return "small";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -19,10 +19,14 @@ public:
|
|||||||
|
|
||||||
virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = nullptr) override;
|
virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = nullptr) override;
|
||||||
int GetSize(void) const { return m_Size; }
|
int GetSize(void) const { return m_Size; }
|
||||||
|
|
||||||
|
/** Returns the text describing the slime's size, as used by the client's resource subsystem for sounds.
|
||||||
|
Returns either "big" or "small". */
|
||||||
|
static AString GetSizeName(int a_Size);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
/// Size of the MagmaCube, 1 .. 3, with 1 being the smallest
|
/// Size of the MagmaCube, 1, 2 and 4, with 1 being the smallest
|
||||||
int m_Size;
|
int m_Size;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
@ -960,7 +960,7 @@ cMonster * cMonster::NewMonsterFromType(eMonsterType a_MobType)
|
|||||||
{
|
{
|
||||||
case mtMagmaCube:
|
case mtMagmaCube:
|
||||||
{
|
{
|
||||||
toReturn = new cMagmaCube(Random.NextInt(2) + 1);
|
toReturn = new cMagmaCube(1 << Random.NextInt(3)); // Size 1, 2 or 4
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case mtSlime:
|
case mtSlime:
|
||||||
|
@ -89,7 +89,7 @@ void cSlime::KilledBy(TakeDamageInfo & a_TDI)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
const AString cSlime::GetSizeName(int a_Size) const
|
AString cSlime::GetSizeName(int a_Size)
|
||||||
{
|
{
|
||||||
if (a_Size > 1)
|
if (a_Size > 1)
|
||||||
{
|
{
|
||||||
|
@ -27,7 +27,7 @@ public:
|
|||||||
|
|
||||||
/** Returns the text describing the slime's size, as used by the client's resource subsystem for sounds.
|
/** Returns the text describing the slime's size, as used by the client's resource subsystem for sounds.
|
||||||
Returns either "big" or "small". */
|
Returns either "big" or "small". */
|
||||||
const AString GetSizeName(int a_Size) const;
|
static AString GetSizeName(int a_Size);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user