[Remove] Don't bother taking into account sprite size when creating
weapons. (It wasn't working anyway..)
This commit is contained in:
parent
24379feab3
commit
e52456d312
@ -722,7 +722,7 @@ static void weapon_hitBeam(Weapon* w, Pilot* p, WeaponLayer layer,
|
||||
*/
|
||||
static Weapon* weapon_create(const Outfit* outfit, const double dir, const Vec2* pos,
|
||||
const Vec2* vel, unsigned int parent, const unsigned int target) {
|
||||
Vec2 v, vp;
|
||||
Vec2 v;
|
||||
double mass, rdir;
|
||||
Pilot* pilot_target;
|
||||
double x, y, t, dist;
|
||||
@ -780,15 +780,11 @@ 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);
|
||||
|
||||
/* Set the position to include sprite size. */
|
||||
vect_cset(&vp, pos->x + cos(rdir)*w->outfit->u.blt.gfx_space->sx/2.,
|
||||
pos->y + sin(rdir)*w->outfit->u.blt.gfx_space->sy/2.);
|
||||
|
||||
mass = 1; /* Lasers are presumed to have unitory mass. */
|
||||
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->solid = solid_create(mass, rdir, &vp, &v);
|
||||
w->solid = solid_create(mass, rdir, pos, &v);
|
||||
w->voice = sound_playPos(w->outfit->u.blt.sound,
|
||||
w->solid->pos.x + w->solid->vel.x,
|
||||
w->solid->pos.y + w->solid->vel.y);
|
||||
|
Loading…
Reference in New Issue
Block a user