Fix post-mapinit NPC exception (#40244)
Ensure `NPCBlackboard.Owner` is set during startup
This commit is contained in:
@@ -63,9 +63,13 @@ namespace Content.Server.NPC.Systems
|
||||
WakeNPC(uid, component);
|
||||
}
|
||||
|
||||
public void OnNPCMapInit(EntityUid uid, HTNComponent component, MapInitEvent args)
|
||||
public void OnNPCStartup(EntityUid uid, HTNComponent component, ComponentStartup args)
|
||||
{
|
||||
component.Blackboard.SetValue(NPCBlackboard.Owner, uid);
|
||||
}
|
||||
|
||||
public void OnNPCMapInit(EntityUid uid, HTNComponent component, MapInitEvent args)
|
||||
{
|
||||
WakeNPC(uid, component);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user