continuing to wail on poor dead mobs
Posted: Sun Dec 22, 2013 2:19 pm
was looking at link's changes to the ai_char_normal and I saw something (that was there already) that didn't look right
the logic to stop swinging on dead mobs has never worked... the code I've quoted here seems to try to implement it, but breaking the for loop is not getting it done, and setting the ActionTarget to NULL everytime if i != 0 really doesn't make sense
Code: Select all
/////////////////////////////////////////////////////////////////////////
// Start of the attack loop.
/////////////////////////////////////////////////////////////////////////
for (uint8 i = 0; i < attackRound->GetAttackSwingCount(); ++i)
{
apAction_t Action;
Action.ActionTarget = m_PBattleTarget;
Action.knockback = 0;
// Reference to the current swing.
CAttack* attack = (CAttack*)attackRound->GetCurrentAttack();
if (i != 0)
{
if (m_PBattleTarget->isDead())
{
break;
}
Action.ActionTarget = NULL;
}