@Wulf I tested again with the new patched version and the problem still exists. I found out that the NRE only occurs when the bot gets hurt. The hook OnNpcTargetSense triggers once per second normally and returns brainSenses correctly but when you hit the bot the hook fails with the brainSenses NRE.
Failed to call hook 'OnNpcTargetSense' on plugin 'Imperium v1.11.0' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Plugins.Imperium.OnNpcTargetSense (BaseEntity npc, BaseEntity targetEntity, AIBrainSenses brainSenses) [0x00013] in <af120c57cc7d4ddaa41d7c9a2bad77ec>:0
3kb/s in, 8kb/s out
at Oxide.Plugins.Imperium.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x01ee0] in <af120c57cc7d4ddaa41d7c9a2bad77ec>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <60c318df79ed41688ea59335e48d61ad>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <50629aa0e75d4126b345d8d9d64da28d>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <50629aa0e75d4126b345d8d9d64da28d>:0
Merged postpublic override void Hurt(HitInfo info)
{
if (base.isMounted)
{
info.damageTypes.ScaleAll(0.1f);
}
base.Hurt(info);
BaseEntity initiator = info.Initiator;
if (initiator != null && !initiator.EqualNetID(this))
{
Brain.Senses.Memory.SetKnown(initiator, this, null);
}
}
Probably this call in HumanNPC class calling SetKnown passing null