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) :
|
2021-04-06 15:09:16 +00:00
|
|
|
Super(
|
|
|
|
"MagmaCube",
|
|
|
|
mtMagmaCube,
|
|
|
|
Printf("entity.%smagmacube.hurt", GetSizeName(a_Size).c_str()),
|
|
|
|
Printf("entity.%smagmacube.death", GetSizeName(a_Size).c_str()),
|
|
|
|
"",
|
|
|
|
0.51f * a_Size,
|
|
|
|
0.51f * a_Size
|
|
|
|
),
|
2013-07-29 11:13:03 +00:00
|
|
|
m_Size(a_Size)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-09-18 09:10:31 +00:00
|
|
|
AString cMagmaCube::GetSizeName(int a_Size)
|
2013-07-29 11:13:03 +00:00
|
|
|
{
|
2021-09-18 09:10:31 +00:00
|
|
|
if (a_Size == 1)
|
2014-02-23 18:44:58 +00:00
|
|
|
{
|
2021-09-18 09:10:31 +00:00
|
|
|
return "small_";
|
2014-02-23 18:44:58 +00:00
|
|
|
}
|
2021-09-18 09:10:31 +00:00
|
|
|
return "";
|
2013-07-29 11:13:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-07-26 21:24:36 +00:00
|
|
|
|
|
|
|
|
2021-09-18 09:10:31 +00:00
|
|
|
void cMagmaCube::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
2015-05-07 03:12:17 +00:00
|
|
|
{
|
2021-09-18 09:10:31 +00:00
|
|
|
UNUSED(a_Killer);
|
|
|
|
if (GetSize() > 1)
|
2015-05-07 03:12:17 +00:00
|
|
|
{
|
2021-09-18 09:10:31 +00:00
|
|
|
AddRandomUncommonDropItem(a_Drops, 25.0f, E_ITEM_MAGMA_CREAM);
|
2015-05-07 03:12:17 +00:00
|
|
|
}
|
|
|
|
}
|