Fix bug that stopped counterattack working.

This commit is contained in:
Condorra 2023-02-19 11:17:05 +11:00
parent 2850b66bee
commit 8d12c88904

View File

@ -393,7 +393,7 @@ pub async fn start_attack_mut(trans: &DBTrans, by_whom: &mut Item, to_whom: &mut
}).await?;
// Auto-counterattack if victim isn't busy.
if to_whom.active_combat.as_ref().and_then(|ac| ac.attacking.as_ref()) == None {
start_attack(trans, &to_whom, &by_whom).await?;
start_attack_mut(trans, to_whom, by_whom).await?;
}
Ok(())