2013-07-29 07:13:03 -04:00
|
|
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
|
|
|
|
2014-04-23 18:25:10 -04:00
|
|
|
#include "MagmaCube.h"
|
2013-07-29 07:13:03 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-09-18 17:17:43 -04:00
|
|
|
cMagmaCube::cMagmaCube(int a_Size) :
|
2015-05-06 23:12:17 -04:00
|
|
|
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),
|
2013-07-29 07:13:03 -04:00
|
|
|
m_Size(a_Size)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-09-18 17:17:43 -04:00
|
|
|
void cMagmaCube::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
2013-07-29 07:13:03 -04:00
|
|
|
{
|
2014-02-24 09:38:38 -05:00
|
|
|
UNUSED(a_Killer);
|
2014-02-23 13:44:58 -05:00
|
|
|
if (GetSize() > 1)
|
|
|
|
{
|
|
|
|
AddRandomUncommonDropItem(a_Drops, 25.0f, E_ITEM_MAGMA_CREAM);
|
|
|
|
}
|
2013-07-29 07:13:03 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-08 20:50:05 -04:00
|
|
|
AString cMagmaCube::GetSizeName(int a_Size)
|
2015-05-06 23:12:17 -04:00
|
|
|
{
|
|
|
|
if (a_Size > 1)
|
|
|
|
{
|
|
|
|
return "big";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
return "small";
|
|
|
|
}
|
|
|
|
}
|