Tails ringslinger buff.

Any character with CA_FLY will now throw rings 1.5x as fast.
This commit is contained in:
Yukita Mayako 2015-05-28 03:24:55 -04:00
parent 7118925959
commit bed8dc4c7c

View file

@ -9534,7 +9534,7 @@ mobj_t *P_SPMAngle(mobj_t *source, mobjtype_t type, angle_t angle, UINT8 allowai
{ {
mobj_t *th; mobj_t *th;
angle_t an; angle_t an;
fixed_t x, y, z, slope = 0; fixed_t x, y, z, slope = 0, speed;
// angle at which you fire, is player angle // angle at which you fire, is player angle
an = angle; an = angle;
@ -9566,9 +9566,13 @@ mobj_t *P_SPMAngle(mobj_t *source, mobjtype_t type, angle_t angle, UINT8 allowai
P_SetTarget(&th->target, source); P_SetTarget(&th->target, source);
speed = th->info->speed;
if (source->player && source->player->charability == CA_FLY)
speed = FixedMul(speed, 3*FRACUNIT/2);
th->angle = an; th->angle = an;
th->momx = FixedMul(th->info->speed, FINECOSINE(an>>ANGLETOFINESHIFT)); th->momx = FixedMul(speed, FINECOSINE(an>>ANGLETOFINESHIFT));
th->momy = FixedMul(th->info->speed, FINESINE(an>>ANGLETOFINESHIFT)); th->momy = FixedMul(speed, FINESINE(an>>ANGLETOFINESHIFT));
if (allowaim) if (allowaim)
{ {
@ -9576,7 +9580,7 @@ mobj_t *P_SPMAngle(mobj_t *source, mobjtype_t type, angle_t angle, UINT8 allowai
th->momy = FixedMul(th->momy,FINECOSINE(source->player->aiming>>ANGLETOFINESHIFT)); th->momy = FixedMul(th->momy,FINECOSINE(source->player->aiming>>ANGLETOFINESHIFT));
} }
th->momz = FixedMul(th->info->speed, slope); th->momz = FixedMul(speed, slope);
//scaling done here so it doesn't clutter up the code above //scaling done here so it doesn't clutter up the code above
th->momx = FixedMul(th->momx, th->scale); th->momx = FixedMul(th->momx, th->scale);