Fixed #627
- Attack() is now called from cAggressive instead of cMonster * Monsters can no longer attack through walls * Should fix last remnants of player damage after teleporting (that both STR and bearbin contributed fixes to :P)
This commit is contained in:
@@ -311,9 +311,6 @@ void cMonster::Tick(float a_Dt, cChunk & a_Chunk)
|
||||
}
|
||||
}
|
||||
|
||||
if (ReachedFinalDestination() && (m_Target != NULL))
|
||||
Attack(a_Dt);
|
||||
|
||||
SetPitchAndYawFromDestination();
|
||||
HandleFalling();
|
||||
|
||||
@@ -657,17 +654,6 @@ void cMonster::InStateEscaping(float a_Dt)
|
||||
|
||||
|
||||
|
||||
// Do attack here
|
||||
// a_Dt is passed so we can set attack rate
|
||||
void cMonster::Attack(float a_Dt)
|
||||
{
|
||||
m_AttackInterval += a_Dt * m_AttackRate;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void cMonster::GetMonsterConfig(const AString & a_Name)
|
||||
{
|
||||
cRoot::Get()->GetMonsterConfig()->AssignAttributes(this, a_Name);
|
||||
|
||||
Reference in New Issue
Block a user