diff --git a/src/pilot.c b/src/pilot.c index fcbe603..3ecb6c2 100644 --- a/src/pilot.c +++ b/src/pilot.c @@ -1098,7 +1098,7 @@ void pilots_render(void) { int i; for(i = 1; i < pilot_nstack; i++) /* Skip the player. */ - if(pilot_stack[i]->render) + if(pilot_stack[i]->render != NULL) pilot_stack[i]->render(pilot_stack[i]); } diff --git a/src/weapon.c b/src/weapon.c index 329fe87..53973ed 100644 --- a/src/weapon.c +++ b/src/weapon.c @@ -127,9 +127,10 @@ static void think_seeker(Weapon* w, const double dt) { limit_speed(&w->solid->vel, w->outfit->u.amm.speed, dt); } -/* ======================================================== */ -/* Smart seeker brain. Much better at homing. */ -/* ======================================================== */ +/* ======================================================== + * Smart seeker brain. Much better at homing. + * ======================================================== + */ static void think_smart(Weapon* w, const double dt) { Vec2 sv, tv; double t; @@ -378,7 +379,7 @@ static Weapon* weapon_create(const Outfit* outfit, const double dir, const Vec2* if((rdir > 2.*M_PI) || (rdir < 0.)) rdir = fmod(rdir, 2.*M_PI); vectcpy(&v, vel); vect_cadd(&v, outfit->u.blt.speed*cos(rdir), outfit->u.blt.speed*sin(rdir)); - w->timer += outfit->u.blt.range / outfit->u.blt.speed; + w->timer = outfit->u.blt.range / outfit->u.blt.speed; w->solid = solid_create(mass, rdir, pos, &v); w->voice = sound_addVoice(VOICE_PRIORITY_BOLT, w->solid->pos.x, w->solid->pos.y,