Prevented null pointer from happening when a vendor attempts to path away from its target.

This commit is contained in:
Cekis
2018-03-23 16:02:45 -07:00
committed by CekisSWG
parent 7ddcaf19da
commit 2ad9e06ea3
@@ -918,7 +918,7 @@ public class ai_lib extends script.base_script
}
location myLoc = getLocation(npc);
location targetLoc = getLocation(target);
if(isValidLocation(myLoc) && isValidLocation(targetLoc)) {
if(isValidLocation(myLoc, 0f) && isValidLocation(targetLoc, 0f)) {
if (myLoc.x < targetLoc.x) {
myLoc.x -= rand(20f, 40f);
} else {