summaryrefslogtreecommitdiffstats
path: root/src/Mobs/NewMonster.cpp
blob: 3245bd83deea17ff439bf974dcffd7c6ea257553 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "Globals.h"  // NOTE: MSVC stupidness requires this to be the same across all modules
#include "NewMonster.h"
#include "../ClientHandle.h"

cNewMonster::cNewMonster(const AString & a_ConfigName, eType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, double a_Width, double a_Height)
	: super(etMonster, a_Width, a_Height)
	, m_MobType(a_MobType)
	, m_SoundHurt(a_SoundHurt)
	, m_SoundDeath(a_SoundDeath)
{
	m_AI = new cAIComponent(this);
	m_Attack = new cAttackComponent(this);
	m_Environment = new cEnvironmentComponent(this);
	m_Movement = new cMovementComponent(this);
}

void cNewMonster::SpawnOn(cClientHandle & a_Client)
{
	a_Client.SendSpawnMob(*this);
}