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
1 changed files with 8 additions and 4 deletions

View File

@ -9534,7 +9534,7 @@ mobj_t *P_SPMAngle(mobj_t *source, mobjtype_t type, angle_t angle, UINT8 allowai
{
mobj_t *th;
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
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);
speed = th->info->speed;
if (source->player && source->player->charability == CA_FLY)
speed = FixedMul(speed, 3*FRACUNIT/2);
th->angle = an;
th->momx = FixedMul(th->info->speed, FINECOSINE(an>>ANGLETOFINESHIFT));
th->momy = FixedMul(th->info->speed, FINESINE(an>>ANGLETOFINESHIFT));
th->momx = FixedMul(speed, FINECOSINE(an>>ANGLETOFINESHIFT));
th->momy = FixedMul(speed, FINESINE(an>>ANGLETOFINESHIFT));
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->momz = FixedMul(th->info->speed, slope);
th->momz = FixedMul(speed, slope);
//scaling done here so it doesn't clutter up the code above
th->momx = FixedMul(th->momx, th->scale);