mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-08-28 17:56:25 -04:00
Prevented null pointer from happening when a vendor attempts to path away from its target.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user