Fixed issue with determining a valid location.

This commit is contained in:
Cekis
2018-03-23 16:03:01 -07:00
committed by CekisSWG
parent 5bf67c75d5
commit b8187b7b5f
9 changed files with 16 additions and 11 deletions
@@ -918,7 +918,7 @@ public class ai_lib extends script.base_script
}
location myLoc = getLocation(npc);
location targetLoc = getLocation(target);
if(isValidLocation(myLoc, 0f) && isValidLocation(targetLoc, 0f)) {
if(isValidLocation(myLoc) && isValidLocation(targetLoc)) {
if (myLoc.x < targetLoc.x) {
myLoc.x -= rand(20f, 40f);
} else {