I tried making the skeleton shoot arrows but It doesn't work. It does compile but you can't see an arrow flying from the skeleton. Any help?:
I found out that the function doesn't get called. Any idea why? I did add it in skeleton.h using
void cSkeleton::Attack(float a_Dt)
{
m_AttackInterval += a_Dt * m_AttackRate;
if ((m_Target != NULL) && (m_AttackInterval > 3.0))
{
Vector3d Speed = GetLookVector() * 30;
cArrowEntity * Arrow = new cArrowEntity(this, GetPosX(), GetPosY(), GetPosZ(), Speed);
if (Arrow == NULL)
{
return;
}
if (!Arrow->Initialize(m_World))
{
delete Arrow;
return;
}
m_World->BroadcastSpawnEntity(*Arrow);
}
}
I found out that the function doesn't get called. Any idea why? I did add it in skeleton.h using
virtual void Attack(float a_Dt) override;

