summaryrefslogtreecommitdiffhomepage
path: root/Stars45/CampaignPlanMovement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Stars45/CampaignPlanMovement.cpp')
-rw-r--r--Stars45/CampaignPlanMovement.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Stars45/CampaignPlanMovement.cpp b/Stars45/CampaignPlanMovement.cpp
index dc08798..1333503 100644
--- a/Stars45/CampaignPlanMovement.cpp
+++ b/Stars45/CampaignPlanMovement.cpp
@@ -136,7 +136,7 @@ CampaignPlanMovement::MoveUnit(CombatUnit* u)
if (unit->GetCombatGroup() != u->GetCombatGroup() && unit->GetRegion() == u->GetRegion() && !unit->IsDropship()) {
Point delta = loc - unit->Location();
- double dist = delta.Normalize();
+ dist = delta.Normalize();
if (dist < closest_dist) {
closest_unit = unit;
@@ -147,7 +147,7 @@ CampaignPlanMovement::MoveUnit(CombatUnit* u)
if (closest_unit && closest_dist < MIN_DIST) {
Point delta = loc - closest_unit->Location();
- double dist = delta.Normalize();
+ dist = delta.Normalize();
loc += delta * 1.1 * (MIN_DIST - closest_dist);