summaryrefslogtreecommitdiffhomepage
path: root/Stars45/Weapon.cpp
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-01-30 17:41:24 +0100
committerAki <please@ignore.pl>2022-01-30 17:41:24 +0100
commit51657e10769faa2617d546a06c42e4c62a19bb50 (patch)
tree688ad8b61ac02e50974684b9b7d3f886fb469e5f /Stars45/Weapon.cpp
parentdb987e23d5dd33a5db8764743facbb906ac22b0f (diff)
downloadstarshatter-51657e10769faa2617d546a06c42e4c62a19bb50.zip
starshatter-51657e10769faa2617d546a06c42e4c62a19bb50.tar.gz
starshatter-51657e10769faa2617d546a06c42e4c62a19bb50.tar.bz2
Removed trailing whitespace all over the place
Diffstat (limited to 'Stars45/Weapon.cpp')
-rw-r--r--Stars45/Weapon.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/Stars45/Weapon.cpp b/Stars45/Weapon.cpp
index 68b249b..e78f225 100644
--- a/Stars45/Weapon.cpp
+++ b/Stars45/Weapon.cpp
@@ -71,7 +71,7 @@ Weapon::Weapon(WeaponDesign* d, int nmuz, Vec3* muzzles, double az, double el)
if (design->primary)
abrv = Game::GetText("sys.weapon.primary.abrv");
- else
+ else
abrv = Game::GetText("sys.weapon.secondary.abrv");
nbarrels = nmuz;
@@ -251,7 +251,7 @@ Weapon::SetOwner(Ship* s)
turret_base = t;
}
- if (!design->primary &&
+ if (!design->primary &&
design->visible_stores &&
ammo == nbarrels &&
design->shot_model != 0)
@@ -372,14 +372,14 @@ Weapon::ExecFrame(double seconds)
if (orders == AUTO && centered) {
if (energy >= design->charge &&
- (ammo < 0 || target && target->Integrity() >= 1) &&
+ (ammo < 0 || target && target->Integrity() >= 1) &&
objective.length() < design->max_range)
Fire();
}
else if (orders == POINT_DEFENSE) {
if (energy >= design->min_charge &&
- (ammo < 0 || target && target->Integrity() >= 1) &&
+ (ammo < 0 || target && target->Integrity() >= 1) &&
objective.length() < design->max_range)
Fire();
}
@@ -427,7 +427,7 @@ Weapon::Update(SimObject* obj)
beams[i] = 0;
}
- return SimObserver::Update(obj);
+ return SimObserver::Update(obj);
}
const char*
@@ -498,7 +498,7 @@ Weapon::SetTarget(SimObject* targ, System* sub)
}
break;
- default:
+ default:
return;
}
}
@@ -506,7 +506,7 @@ Weapon::SetTarget(SimObject* targ, System* sub)
// if ok, target this object:
if (target != targ) {
target = targ;
-
+
if (target)
Observe(target);
}
@@ -540,8 +540,8 @@ Weapon::SelectTarget()
// distance from self to target:
double distance = Point(c_shot->Location() - muzzle_pts[0]).length();
- if (distance > design->min_range &&
- distance < design->max_range &&
+ if (distance > design->min_range &&
+ distance < design->max_range &&
distance < dist) {
// check aim basket:
select_locked = CanLockPoint(c_shot->Location(), az, el);
@@ -673,7 +673,7 @@ Weapon::Fire()
active_barrel = 0;
refire += design->salvo_delay;
}
- }
+ }
if (design->ripple_count > 0 && ripple_count <= 0)
ripple_count = design->ripple_count-1;
@@ -814,7 +814,7 @@ Weapon::FireBarrel(int n)
if (energy > design->charge)
shot_load = design->charge;
else
- shot_load = energy;
+ shot_load = energy;
energy -= shot_load;
shot->SetCharge(shot_load * availability);