[Fix] Bug with unlimited range turret bolts.
This commit is contained in:
parent
bbc46d0eef
commit
00fbe34b62
@ -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]);
|
||||
}
|
||||
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user