diff --git a/dat/outfit.xml b/dat/outfit.xml
index 90742c9..d193d7b 100644
--- a/dat/outfit.xml
+++ b/dat/outfit.xml
@@ -177,7 +177,7 @@
5
1
1600
-200
+60
800
20
@@ -212,8 +212,8 @@
7
0.5
1300
-200
-650
+90
+550
20
diff --git a/src/weapon.c b/src/weapon.c
index 6463a04..be52657 100644
--- a/src/weapon.c
+++ b/src/weapon.c
@@ -72,7 +72,7 @@ static void weapon_destroy(Weapon* w, WeaponLayer layer);
static void weapon_free(Weapon* w);
/* Think. */
static void think_seeker(Weapon* w, const double dt);
-static void think_smart(Weapon* w, const double dt);
+/*static void think_smart(Weapon* w, const double dt);*/
/* Extern. */
void weapon_minimap(const double res, const double w,
const double h, const RadarShape shape);
@@ -104,6 +104,7 @@ void weapon_minimap(const double res, const double w,
/* Seeker brain, You get what you pay for. :) */
static void think_seeker(Weapon* w, const double dt) {
double diff;
+ double vel;
if(w->target == w->parent) return; /* HEY! Self harm is not allowed. */
Pilot* p = pilot_get(w->target);
@@ -114,7 +115,7 @@ static void think_seeker(Weapon* w, const double dt) {
/* Ammo isn't locked on yet.. */
if(SDL_GetTicks() > (w->outfit->u.amm.lockon)) {
- diff = angle_diff(w->solid->dir, vect_angle(&w->solid->pos, &p->solid->pos));
+ /*diff = angle_diff(w->solid->dir, vect_angle(&w->solid->pos, &p->solid->pos));*/
w->solid->dir_vel = 10 * diff * w->outfit->u.amm.turn;
/* Face the target. */
if(w->solid->dir_vel > w->outfit->u.amm.turn)
@@ -123,15 +124,17 @@ static void think_seeker(Weapon* w, const double dt) {
w->solid->dir_vel = -w->outfit->u.amm.turn;
}
- vect_pset(&w->solid->force, w->outfit->u.amm.thrust, w->solid->dir);
-
- limit_speed(&w->solid->vel, w->outfit->u.amm.speed, dt);
+ /* Limit speed here. */
+ vel = MIN(w->outfit->u.amm.speed, VMOD(w->solid->vel) + w->outfit->u.amm.thrust*dt);
+ vect_pset(&w->solid->vel, vel, w->solid->dir);
+ /*limit_speed(&w->solid->vel, w->outfit->u.amm.speed, dt);*/
}
/* ========================================================
* Smart seeker brain. Much better at homing.
* ========================================================
*/
+#if 0
static void think_smart(Weapon* w, const double dt) {
Vec2 sv, tv;
double t;
@@ -168,6 +171,7 @@ static void think_smart(Weapon* w, const double dt) {
limit_speed(&w->solid->vel, w->outfit->u.amm.speed, dt);
}
+#endif
/* Update all the weapon layers. */
void weapons_update(const double dt) {
@@ -385,10 +389,11 @@ static Weapon* weapon_create(const Outfit* outfit, const double dir, const Vec2*
pilot_target->lockons++;
/* Only diff is AI. */
- if(outfit->type == OUTFIT_TYPE_MISSILE_SEEK_AMMO)
+ w->think = think_seeker; /* AI is the same atm. */
+ /*if(outfit->type == OUTFIT_TYPE_MISSILE_SEEK_AMMO)
w->think = think_seeker;
else if(outfit->type == OUTFIT_TYPE_MISSILE_SEEK_SMART_AMMO)
- w->think = think_smart;
+ w->think = think_smart;*/
break;
/* Just dump it where the player is. */