This commit is contained in:
Pan 2019-02-25 14:06:26 +13:00
parent c0874fed60
commit 8fa4055f08

View File

@ -302,7 +302,7 @@ public class defenseManagerAI {
threatZ = minorThreatLocation.z; threatZ = minorThreatLocation.z;
} }
if(majorThreatLocation.x !=0) { if(majorThreatLocation.x !=0) {
distanceToThreat = (float)Math.sqrt((majorThreatLocation.x-constructionYards[i].centre.x)*(majorThreatLocation.x-constructionYards[i].centre.x) + distanceToThreat = (float)Math.sqrt((majorThreatLocation.x-constructionYards[i].centre.x)*(majorThreatLocation.x-constructionYards[i].centre.x) +
(majorThreatLocation.z-constructionYards[i].centre.z)*(majorThreatLocation.z-constructionYards[i].centre.z)); (majorThreatLocation.z-constructionYards[i].centre.z)*(majorThreatLocation.z-constructionYards[i].centre.z));
threatX = majorThreatLocation.x; threatX = majorThreatLocation.x;