[Fix] Missiles don't go crazy when enemy has been killed.
This commit is contained in:
parent
35f35463ae
commit
d77fc45e7f
@ -118,7 +118,11 @@ static void think_seeker(Weapon* w) {
|
|||||||
if(w->target == w->parent) return; // HEY! Self harm is not allowed.
|
if(w->target == w->parent) return; // HEY! Self harm is not allowed.
|
||||||
|
|
||||||
Pilot* p = pilot_get(w->target);
|
Pilot* p = pilot_get(w->target);
|
||||||
if(p == NULL) return; // Can't do anything with no pilots.
|
if(p == NULL) {
|
||||||
|
if(VMOD(w->solid->vel) > w->outfit->u.amm.speed) // Should not go faster.
|
||||||
|
vect_pset(&w->solid->vel, w->outfit->u.amm.speed, VANGLE(w->solid->vel));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Ammo isn't locked on yet..
|
// Ammo isn't locked on yet..
|
||||||
if(SDL_GetTicks() > (w->timer + w->outfit->u.amm.lockon)) {
|
if(SDL_GetTicks() > (w->timer + w->outfit->u.amm.lockon)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user