From 53301de39e36cede7efc74b4e31f76d774bfd0dd Mon Sep 17 00:00:00 2001 From: Cekis Date: Fri, 20 Jan 2017 20:55:04 +0000 Subject: [PATCH] Fixed issue with IG-88 unable to identify the location of a target. --- .../game/script/systems/combat/combat_base.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/sku.0/sys.server/compiled/game/script/systems/combat/combat_base.java b/sku.0/sys.server/compiled/game/script/systems/combat/combat_base.java index 92422ca6d..9ec16995b 100755 --- a/sku.0/sys.server/compiled/game/script/systems/combat/combat_base.java +++ b/sku.0/sys.server/compiled/game/script/systems/combat/combat_base.java @@ -254,8 +254,18 @@ public class combat_base extends script.base_script atkRslt.weapon = weaponData.id; atkRslt.actionName = getStringCrc(toLower(actionName)); atkRslt.useLocation = true; - atkRslt.targetLocation = new vector(targetLoc.x, targetLoc.y, targetLoc.z); - atkRslt.targetCell = targetLoc.cell; + if(isValidLocation(targetLoc,1f)) { + atkRslt.targetLocation = new vector(targetLoc.x, targetLoc.y, targetLoc.z); + atkRslt.targetCell = targetLoc.cell; + } + else { + location tl = getLocation(target); + if(!isValidLocation(tl, 1f)){ + LOG("heroics","IG-88 could not identify the target's (" + target + ":" + getPlayerFullName(target) + ") location (" + targetLoc.toString() + ") to attack it."); + } + atkRslt.targetLocation = new vector(tl.x, tl.y, tl.z); + atkRslt.targetCell = tl.cell; + } atkRslt.endPosture = (combat.isMeleeWeapon(weaponData.id) || combat.isLightsaberWeapon(weaponData.id)) ? POSTURE_UPRIGHT : getPosture(self); String anim = actionData.animDefault; stealth.testInvisCombatAction(self, target, actionData);