Skip to content

Commit

Permalink
Stop shooting on disabled bots
Browse files Browse the repository at this point in the history
  • Loading branch information
Lacyway committed May 27, 2024
1 parent 0c2dce4 commit adf4854
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Fika.Core/Coop/Custom/FikaDynamicAI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ private void DeactivateBot(CoopBot bot)
bot.AIData.BotOwner.DecisionQueue.Clear();
bot.AIData.BotOwner.Memory.GoalEnemy = null;
bot.AIData.BotOwner.PatrollingData.Pause();
bot.AIData.BotOwner.ShootData.EndShoot();
bot.ActiveHealthController.PauseAllEffects();
bot.gameObject.SetActive(false);

if (!disabledBots.Contains(bot))
Expand All @@ -138,6 +140,7 @@ private void ActivateBot(CoopBot bot)
bot.gameObject.SetActive(true);
bot.AIData.BotOwner.PatrollingData.Unpause();
bot.AIData.BotOwner.PostActivate();
bot.ActiveHealthController.UnpauseAllEffects();
disabledBots.Remove(bot);
}

Expand Down

0 comments on commit adf4854

Please sign in to comment.