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