Reported by Props: Was looting a corpse with no bots around and while looting, all of the items were being transferred from the corpse to a bot that was deactivated due to AI Limiter.
[Error :LootingBots] ([sptBear] Bot3) System.NullReferenceException
at (wrapper managed-to-native) UnityEngine.Object.GetName(UnityEngine.Object)
at UnityEngine.Object.get_name () [0x00001] in <ca21460feb9c47d0ac337b9893474cc6>:0
at LootingBots.Brain.Logics.LootingLogic.TryMoveToLoot () [0x000a8] in <bc930d82ee8e426d96c7ce1d79c18242>:0
[Error :LootingBots] ([assault] Bot13) System.NullReferenceException
at (wrapper managed-to-native) UnityEngine.Object.GetName(UnityEngine.Object)
at UnityEngine.Object.get_name () [0x00001] in <ca21460feb9c47d0ac337b9893474cc6>:0
at LootingBots.Brain.Logics.LootingLogic.TryMoveToLoot () [0x000a8] in <bc930d82ee8e426d96c7ce1d79c18242>:0
[Error :LootingBots] ([sptBear] Bot3) System.NullReferenceException
at (wrapper managed-to-native) UnityEngine.Object.GetName(UnityEngine.Object)
at UnityEngine.Object.get_name () [0x00001] in <ca21460feb9c47d0ac337b9893474cc6>:0
at LootingBots.Brain.Logics.LootingLogic.TryMoveToLoot () [0x000a8] in <bc930d82ee8e426d96c7ce1d79c18242>:0
[Error :LootingBots] ([assault] Bot13) System.NullReferenceException
at (wrapper managed-to-native) UnityEngine.Object.GetName(UnityEngine.Object)
at UnityEngine.Object.get_name () [0x00001] in <ca21460feb9c47d0ac337b9893474cc6>:0
at LootingBots.Brain.Logics.LootingLogic.TryMoveToLoot () [0x000a8] in <bc930d82ee8e426d96c7ce1d79c18242>:0
[Error :LootingBots] ([sptBear] Bot3) System.NullReferenceException
at (wrapper managed-to-native) UnityEngine.Object.GetName(UnityEngine.Object)
at UnityEngine.Object.get_name () [0x00001] in <ca21460feb9c47d0ac337b9893474cc6>:0
at LootingBots.Brain.Logics.LootingLogic.TryMoveToLoot () [0x000a8] in <bc930d82ee8e426d96c7ce1d79c18242>:0
Should be fixed by only making sure the LootingLayer is active when BotState is Active aec2f01
As added protection, only run the Update logic in LootingLogic when bots are in the Active state 1e0eb56
Reported by Props: Was looting a corpse with no bots around and while looting, all of the items were being transferred from the corpse to a bot that was deactivated due to AI Limiter.