[Fix] Fixed segfault in volatile nebulae.
This commit is contained in:
parent
31ec890d3e
commit
8f579ba9ac
11
src/pilot.c
11
src/pilot.c
@ -461,11 +461,12 @@ void pilot_hit(Pilot* p, const Solid* w, const unsigned int shooter,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Knock back effect is dependent on both damage and mass of the weapon. */
|
if(w != NULL)
|
||||||
/* should probably turn it into a partial conservative collision.. */
|
/* Knock back effect is dependent on both damage and mass of the weapon. */
|
||||||
vect_cadd(&p->solid->vel,
|
/* should probably turn it into a partial conservative collision.. */
|
||||||
knockback * (w->vel.x * (dam_mod/6. + w->mass/p->solid->mass/6.)),
|
vect_cadd(&p->solid->vel,
|
||||||
knockback * (w->vel.y * (dam_mod/6. + w->mass/p->solid->mass/6.)));
|
knockback * (w->vel.x * (dam_mod/6. + w->mass/p->solid->mass/6.)),
|
||||||
|
knockback * (w->vel.y * (dam_mod/6. + w->mass/p->solid->mass/6.)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user