View Single Post
  #2  
Old 12-24-2015, 06:20 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

I can't test it atm..but, you could try this as a fix:
Code:
 zone/mob_ai.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp
index 79c4493..33df4e6 100644
--- a/zone/mob_ai.cpp
+++ b/zone/mob_ai.cpp
@@ -1031,6 +1031,9 @@ void Mob::AI_Process() {
 			}
 		}
 
+		if (target && !hate_list.IsEntOnHateList(target))
+			target = nullptr;
+
 		if (!target)
 			return;

EDIT: That's just above where you posted from

It's possible for the ai target timer to not be ready in the 'else' clause from above and the code will flow through with the last target..

..which, if already destroyed, will cause an exception error when you try to dereference the pointer - testing for target->IsCorpse()
__________________
Uleat of Bertoxxulous

Compilin' Dirty

Last edited by Uleat; 12-24-2015 at 06:46 PM..
Reply With Quote