From d1e0a101366a0eb82b2e58dce1fc094c95b27eca Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Sun, 6 Jan 2019 21:03:19 +0300 Subject: [PATCH] Make sure AI data is initialized when loading actor records --- components/esm/loadcrea.cpp | 2 +- components/esm/loadnpc.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/components/esm/loadcrea.cpp b/components/esm/loadcrea.cpp index 83315a5b8..f04439041 100644 --- a/components/esm/loadcrea.cpp +++ b/components/esm/loadcrea.cpp @@ -23,6 +23,7 @@ namespace ESM { mScale = 1.f; mHasAI = false; + mAiData.blank(); bool hasName = false; bool hasNpdt = false; @@ -160,7 +161,6 @@ namespace ESM { mSpells.mList.clear(); mHasAI = false; mAiData.blank(); - mAiData.mServices = 0; mAiPackage.mList.clear(); mTransport.mList.clear(); } diff --git a/components/esm/loadnpc.cpp b/components/esm/loadnpc.cpp index dd34934ad..6e7ba66c5 100644 --- a/components/esm/loadnpc.cpp +++ b/components/esm/loadnpc.cpp @@ -18,6 +18,7 @@ namespace ESM mInventory.mList.clear(); mTransport.mList.clear(); mAiPackage.mList.clear(); + mAiData.blank(); mHasAI = false; bool hasName = false;